procmail
[Top] [All Lists]

Re: A question about using procmail to filter duplicate emails inpostfix smtpd

2003-03-13 13:36:54
At 14:35 2003-03-13 -0500, Richard Bates did say:

in postfix main.cf, I have the following line
mailbox_command = /usr/local/bin/procmail -o -a $DOMAIN -d $LOGNAME

I have a alias
        "alias1" = bates

Okay, I can't help you at all with your postfix config (both because I'm not a postfix admin, and this isn't a postfix list). For the time being, let's make the huge assumption that your above config is correct, and that you properly restarted postfix to make it recognize the changes (along with hash rebuilds if they were necessary).

I have a default procmailrc in /usr/local/etc/procmailrc

FYI - unless you've modified the procmail source (or perhaps, that's a link to /etc/procmairc), that's not the path procmail looks for a "default" procmailrc.

#### FInd the duplicate message and wipe it out
:0 Whc: msgid.lock
| formail -D 8192 msgid.cache

FTR, this would be _TOTALLY_ a hosed thing to do in /etc/procmailrc, since messages copied to multiple _separate_ users on the system would be dumped.

:0 a:
duplicates
## Will be changed to /dev/null when correct

I send a email to bates,alias1,user2

the first user bates gets only one email. (This is great)
the "user2" doesn't get any mail.

Re-read the above commentary about hosed-ness, and then inspect your logfile with VERBOSE=ON.

hint: "duplicates" will contain two copies of the message.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>