"Todd A. Jacobs" <[EMAIL PROTECTED]> writes:

> On 6 Nov 2002, Tim Legant wrote:
> 
> > DELIVERY = "|/usr/local/bin/procmail -f $SENDER /home/<user>/.procmail-tmda"
> > 
> > In other words, fully specify both paths.  I don't think the '~' gets
> > expanded when TMDA runs the command, although I'm not entirely sure.
> 
> It should, since the command is being passed to the shell. Isn't it?

I had thought that, at one point, we had deliberately recoded this
*not* to use a function that calls the shell, because of security
issues.  Turns out that the Python library function we use does, in
fact, use /bin/sh.  So, yes, it will be properly expanded.

> > Finally, do you have LOGFILE_INCOMING and LOGFILE_DEBUG enabled?
> 
> Yes, but those don't help in instances where TMDA isn't generating an 
> error. As I said, TMDA is convinced the email is being delivered to 
> procmail.

After thinking about this a bit and reading the man page, I think the
problem is that, because $SENDER is empty for bounce messages, what
you're actually passing on your procmail command line is this:

    procmail -f ~/.procmail-tmda

This is only true when passing bounce messages to procmail, which fits
your symptoms of procmail working in every other case.  There are two
possible solutions that I can see.

1) Don't bother passing the '-f' parameter.  Make your MTA create the
   initial 'From ' line.

2) Use this for DELIVERY:

   DELIVERY = "|procmail -f '$SENDER' ~/.procmail-tmda"

   which will, in the case of bounce messages, call procmail like
   this:

   procmail -f '' ~/.procmail-tmda


Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to