Sorry for the load of failed messages

Matthew Carpenter matt
Mon May 17 11:48:16 PDT 2004


Apparently it wasn't done, since I bounced a lot of emails over the last 30 hours.  I apologize to those of you who got bounce messages from me when sending to the list over the last day.

What I thought was interesting yesterday had me poopstuck and firebreathing today.  I'm not quite so amused but I hope that you will be.  Some of you will doubtless shake your head and say to yourselves "what a moron.  He should have known 'x' about Postfix and Procmail."  Please, refrain from the "Matt is dumb" emails :)

Background:
I have run COL311 for my mail server for a year or so and have been very pleased with it.  Sendmail with STARTTLS and RBL support compiled in, IMAPD, Procmail, and fetchmail all working very well.  Still, the technologies were getting older and I wanted to investigate LDAP integration of email so when SuSE offered their SLOX server (SuSE Linux OpeneXchange Server) for a $20 NFR Demo version I jumped on it.  
Migrating from COL311 to SLOX was not a cakewalk, since the default technologies were shifting from Sendmail/Imap2000/procmail to Postfix/CyrusImap/Sieve.  My Procmail rules were tuned and working well.  Furthermore I wasn't sure about this new Cyrus Data Store for the email and wasn't wanting to lock myself in.  I like to think of myself as a fairly decent hacker so I figured that I could make use of Procmail to deliver both to my current mail files as well as throw a carbon copy (procmail terminology) to the Cyrus "Deliver" agent.  All is not as simple as it may seem...  
First off my MTA (Mail Transfer Agent) knowledge is primarily with Sendmail with a bit of GroupWise experience.  Procmail was acting very strangely for me and I never did completely figure out why until yesterday... with more learning today.  But I hacked through the fact that Postfix won't let Procmail run as the recipient user or Root by default (and I'm still a bit hazy as to how that all works...  Anyone ever heard of "man master.cf"???) so filesystem rights became an issue.  I ended up making the "mail" group part owner of ALL mail files, including the ones in my home directory, and assigning Group RW to all of them...  Yech!  But, we're talking about a pilot/test period, not the long run.  The real goal is to make sure that my old mail files get updated with all my mail during the test, so this was acceptible (personal email hints to this problem are welcome)
Next, I had to come up with a way to determine what user the recipient IS!  Every time procmail got run, "mail" was the user running it.  Therefore, all mail not explicitly delivered by procmail rules ended up in "mail"'s mail file!  Not funny.  This is a benefit of Postfix as it is geared to be independent of pam.d or /etc/passwd, so LDAP configuration is well integrated.  Anyway, this problem was finally worked out by having Postfix hand off the recipient as a parameter to procmail.  Procmail wasn't working QUITE as expected but it was delivering to my inbox... good enough for government work.
Finally, yesterday I noticed that while my emails were being delivered to me, the emails I was relaying through this server were ALSO getting delivered...  to /var/mail/<emailaddress> on the local maching.  Well, it turns out that the Postfix configuration used by SLOX calls procmail for spam filtering by the SMTPD daemon.  When I replaced the Procmail config file with my own, the Postfix system was delivering the mail through Procmail instead of relaying the message on.  "That's easy" I told myself, as I removed the call to procmail for SMTP...  What it took me a while to figure out was that I was bouncing mail because procmail wasn't being called anymore and the local delivery agent didn't have a clue who "matt at eisgr.com" was.
Solution?  Make Procmail the LMTP agent.  We'll see if this incantation works when I check back on it tomorrow.  Until then, I'll just pray that this actually gets to you. 
The good thing is that this is the final destination email host for my network but I also keep a backup just before it gets here.  So I was able to re-deliver the mail that bounced to my inbox.  

Moral of this story:  Not sure yet but I'll let you know if I get any revelations...  PRobably at this point, stick with Sendmail and imapd until you're ready to take the plunge into something completely different.

On Mon, 9 Jun 2003 13:43:04 -0400 (EDT)
Net Llama! <netllama at linux-sxs.org> wrote:

> On Mon, 9 Jun 2003, Matthew Carpenter wrote:
> > Sorry for the load of failed messages.
> >
> > I have had an email issue that I had been unaware of for a week or so where my
> > emails were not being sent.  Interesting story if you're interested.  Has to
> > do with SuSE Linux OpeneXchange Server, Postfix and Procmail
> 
> does it also involve fire breathing Llamas?  anyway, share.
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Lonni J Friedman				netllama at linux-sxs.org
> Linux Step-by-step & TyGeMo		     http://netllama.ipfox.com
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users


-- 
Matthew Carpenter
matt at eisgr.com                          http://www.eisgr.com/

Enterprise Information Systems
*Network Consulting, Integration & Support
*Web Development and E-Business


More information about the Linux-users mailing list