"Todd A. Jacobs" <[EMAIL PROTECTED]> writes: > On 6 Nov 2002, Tim Legant wrote: > > > DELIVERY = "|procmail -f '$SENDER' ~/.procmail-tmda" > > This doesn't work, because SENDER won't get expanded. However, by > reversing the strong and weak quotes: > > DELIVERY = '|procmail -f "$SENDER" ~/.procmail-tmda' > > it will (mostly) work,
Right. Too late last night :) You definitely want double-quotes. > but the FROM line is often empty instead of saying "MAILER-DAEMON" > as it does the first time through procmail. I don't know how procmail generates the From_ line. But as far as I know, no MTA sets the envelope sender to MAILER-DAEMON. It's only used in the From header field. The envelope sender for bounces is always empty - <>. Perhaps the first time through, when you're not explicitly setting the sender with the '-f' flag, procmail will use either the envelope sender or, if it's empty, the From field contents. Setting the sender explicitly may disable that behavior. > At least the mail gets delivered, but it won't be able to match > procmail expressions designed to catch MAILER-DAEMON, and may cause other > problems that I haven't thought of yet. I don't know why it wouldn't work. The 'MAILER-DAEMON' text should still be in the From field, which TMDA doesn't touch. And like I mentioned above, the bounce envelope sender is empty, so procmail could never have matched 'MAILER-DAEMON' in Return-Path. Unless your MTA does something really wacky with envelope senders for bounces.... > Skipping the -f doesn't work at all with mbox format, since no FROM line > is created. It *will* get appended to the mbox, but can't be read by mailx > or pine, and may in fact cause mbox corruption. I need to think about this and check with Jason. TMDA could optionally generate the From_ header based on a configuration variable, which might provide a simple solution. > It might work with maildir, but I can't say for sure. The From_ line is an mbox separator. Since, in the case of maildirs, each message is stored in a unique file, there's no need for 'separators'. Tim _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
