On Tue, 23 Jan 2007 00:08:27 +0300, Alexey Loukianov wrote:
> AFAIK, that's it. Qmail will not sort/uniq the recipients of the 
> message, it will simply forward it, resulting in dupes. If you need 
> another behavior, you will have either to write a custom patch for 
> ezmlm, implementing "sublists" feature, or to find/create another 
> mailing list software with the "sublists" feature.

It is true, if multiple email addresses resolve to the same user qmail will 
deliver multiple emails. I discovered the same thing (People frequently CC mail 
to quinn@, support@, and hello@ and I receive 3 mails). 

My solution is to use a procmail and formail trick:

1. To use procmail with a qmailtoaster user you need to create a domain-level 
qmail file that will pipe the message correctly to procmail. Here, be sure to 
replace "username" with actual local user, and "example.com" with domain, and 
ensure path is correct, as well as ensure the ownership is chown 
vpopmail:vchkpw. The file should exist at: 

        /home/vpopmail/domains/0/example.com/.qmail-username

and contains (all on one line!):

        | preline procmail -p -m 
/home/vpopmail/domains/0/example.com/username/.procmailrc | 
/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox


2. Create the procmailrc file at:

        /home/vpopmail/domains/0/example.com/username/.procmailrc

3. Containing one of the following rules. First, one for testing -- this will 
move duplicate messages into a folder called "duplicates":

        :0 Whc: msgid.lock
        | formail -D 8192 ./msgid.cache
        :0 a:
        .duplicates/

And this one will just delete the messages:

        :0 Wh: msgid.lock
        | formail -D 8192 ./msgid.cache

Duplicate emails will then be deleted. This trick would not work system-wide of 
course - it needs to be installed for each user. 

See my tool for assisting in the use of procmail scripts here:
http://www.mail-archive.com/[email protected]/msg08919.html

Quinn

---------------------------------------------------------------------
     QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to