Chuck Williams <[EMAIL PROTECTED]> wrote: > I'm using default mail delivery to ./Maildir in each user's home > directory, and I've got several distribution lists set up up as > multiple-recipient aliases (defined in Webadmin). If a specific > recipient occurs directly or indirectly in a message, that recpient > recieves multiple copies of the same message. E.g., sending a message > addressed like > > To: user1 > Cc: all > > where all is an alias that sends to all users (including user1), causes > user1 to receive the message twice. > > Is there a way to configure Courier to consolidate recipient addresses > so that in this case user1 would only receive the message once?
Note that it is not the various recipient headers but the envelope "RCPT TO" recipient commands that are authoritative for where the message is delivered. Even if you looked at the envelope recipients, what you are trying to do is generally impossible, because in the end it is not the delivered-to _recipient_address_ that counts (as you already noticed) but the delivered-to _mailbox_, which cannot be easily determined at an early phase. For instance, take the following case: RCPT TO: <[EMAIL PROTECTED]> RCPT TO: <[EMAIL PROTECTED]> Even though <[EMAIL PROTECTED]> might be an alias to <[EMAIL PROTECTED]> (which would be part of the <[EMAIL PROTECTED]> distribution list), and both domains might even be hosted on the same machine, Courier doesn't know until delivery actually happens. The best thing you can do is writing a Maildrop script that normalizes messages (e.g. by simply taking the "Message-ID:" header for a very crude implementation, or by removing all the "Return-Path:", "Received:", and some other headers, and then computing an MD5 checksum of the remaining message), keeps a database of delivered messages (in normalized form), and drops duplicate messages for any given mailbox. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
