Can Postfix prevent duplicate in RCPT TO address

postfix

My server running opends for LDAP and postfix dovecot procmail delivery

My /etc/aliases contain the group of email address, for example :

all : a@mydomain.com, b@mydomain.com, c@mydomain.com…..

manager: a@mydomain.com, d@mydomain.com

If someone send messages to all@mydomain.com, manager@mydomain.com, the user a@mydomain.com will recieve 2 messages

I have many groups which user a@mydomain.com belong to

Is there a way for user a@mydomain.com can recieve only 1 messages!

Thank folks !

Best Answer

Try enable_original_recipient = no.

From postconf(5):

enable_original_recipient (default: yes)

Enable support for the X-Original-To message header. This header is needed for multi-recipient mailboxes.

When this parameter is set to yes, the cleanup(8) daemon performs duplicate elimination on distinct pairs of (original recipient, rewritten recipient), and generates non-empty original recipient queue file records.

When this parameter is set to no, the cleanup(8) daemon performs duplicate elimination on the rewritten recipient address only, and generates empty original recipient queue file records.

This feature is available in Postfix 2.1 and later. With Postfix version 2.0, support for the X-Original-To message header is always turned on. Postfix versions before 2.0 have no support for the X-Original-To message header.