procmail
[Top] [All Lists]

Re: err msg in log file from pipe cmd, to notify sender of rejected msg

2005-03-25 09:20:17
Thanks for the swift reply!

1) What happened to the h-flag from the example you showed in
   the man page?  I think you want the h-flag here.

   Not sure..  I think my logic was that the originating rule
needed the header and body, and formail did too.  Not sure WHY
that was my logic, but knowing me, that's what I thought.

2) No reason to lock the sendmail process.  Get rid of the
   lockfile colon and name.

  OOC, why not?  Is this because no actual file/mailbox is being
manipulated?  I always thought it was better safe than sorry, but
if that is the case, I understand why it is not needed.

3) Is formail in /usr/bin?  Why are you stating a path at all?
   Just write "formail" and let the compiled-in path work as intended.

  Yes, it is in /usr/bin.  I added the path out of habit.  When I
write bash scripts and the like, I always spec paths for executables.
The only exceptions to this rule are mv and cp.  Just a habit I
got in to. (=

3) Why are you cloning (c-flag) the message only to write the
   cloned copy to /dev/null?

  I guess I was thinking that I had to send it somewhere after
it was pumped through formail, but I see that is silly since it's
being sent already.

 Why are you putting a lockfile on
   /dev/null?  Heaven forfend we should have a race condition
   writing to /dev/null -- why, we might corrupt the resulting
   mail file and not be able to read it later!  :-) :-)

  As a programmer, I understand what lockfiles are for and how
they should be used... but for some reason, the procmail lockfile
stuff has always seemed magical to me.. like it doesn't follow
the traditional rules of file locking..  my brain keeps telling
me "lock everything for good measure!", so I do.

  Then again, procmail recipes in general appear magical to me,
and even though I've got an OK grasp of them, it's obvious I'm
missing alot from the things you've pointed out.  I greatly
appreciate the heads up and, honestly, I'd hate to show you my
whole /etc/procmailrc file.  It's a mess. (^=

   :0 h
   | ( formail -r -A "X-Loop: ourdomain.com" ; \
       cat /etc/messagetoobig.txt ) | $SENDMAIL $SENDMAILFLAGS -t

  This rule is no longer untested.  Not only is it tested, but it
works great! No error in the log file, the "too big" message is
sent, and I am happy. (=

  Again, I appreciate the input into the logic and such.  Once I
had that rule mostly working, I didn't want to mess with it too
much, since the machine is a production box.

  But, I learned today, and that's half the battle (GI Joe).

Duck/Brad



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail