Hello,
I'm experiencing an issue with duplicate suppression and recipient
address verification.
Basically I'm looking for a solution to suppress mail duplicates when a
mail is sent to more than one recipient (typically virtual aliases) and
those recipients/aliases are not disjoint, e.g. consider this alias map:
gro...@example.com us...@example.com,us...@example.com
gro...@example.com us...@example.com,us...@example.com
If someone sends a mail to group1@ and group2@ the user2@ gets two
copies of the same mail. Back then, when we used Cyrus there was a
feature called "duplicatesuppression" that did the trick, but Dovecot
does not seem to have such feature.
The solution I found on the web is to set the config option
"enable_original_recipient=no" for postfix. This seems to do the trick,
but on only if I do not use recipient address verification like this:
smtpd_recipient_restrictions =
...
reject_unverified_recipient
...
If I understand this diagram
http://www.postfix.org/ADDRESS_VERIFICATION_README.html#how
and the debug logs correctly, verify expects probe responses for the
alias addresses itself, group1@ and group2@, but the probe response is
sent for the resolved addresses, user1@/user2@/user3@.
Finally smtpd rejects the mail with a "450 4.1.1 <gro...@example.com>:
Recipient address rejected: unverified address: Address verification in
progress". Unfortunately, this state is not temporary - a later attempt
fails still/again with a 450.
Question: is this a bug in postfix in the way how verification probes
are exchanged, or is there something wrong in my setup (see below)?
Thanks,
Mathias.
In order to eliminate config issues I created this minimal main.cf which
shows the symptom (master.cf is at default):
----------------------------------------------------------------------
$ cat /etc/postfix/main.cf
mydomain = example.com
myhostname = test.$mydomain
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
alias_maps = $alias_database
virtual_alias_maps =
hash:/etc/postfix/virtual_aliases
smtpd_recipient_restrictions =
permit_mynetworks
reject_unverified_recipient
reject_unauth_destination
# suppress duplicates during alias expansion
enable_original_recipient = no
# disable caching of verification results between restarts
address_verify_map =
----------------------------------------------------------------------
$ cat /etc/postfix/virtual_aliases
gro...@example.com us...@test.example.com,us...@test.example.com
gro...@example.com us...@test.example.com,us...@test.example.com
----------------------------------------------------------------------
In the real setup I use relay_domains and LMTP towards Dovecot rather
than local delivery in the minimal setup, but the logs are similar:
----------------------------------------------------------------------
Apr 4 21:07:01 postfix-test postfix/smtpd[25370]: connect from
unknown[172.31.31.51]
Apr 4 21:07:01 postfix-test postfix/verify[25374]: cache
internal:verify full cleanup: retained=0 dropped=0 entries
Apr 4 21:07:01 postfix-test postfix/cleanup.orig[25376]: DDFC445B8:
message-id=<20150404190701.ddfc44...@test.example.com>
Apr 4 21:07:01 postfix-test postfix/qmgr[25369]: DDFC445B8:
from=<double-bou...@test.example.com>, size=237, nrcpt=2 (queue active)
Apr 4 21:07:01 postfix-test postfix/local[25377]: DDFC445B8:
to=<us...@test.example.com>, relay=local, delay=0.04,
delays=0.03/0.01/0/0, dsn=2.0.0, status=deliverable (delivers to mailbox)
Apr 4 21:07:01 postfix-test postfix/local[25377]: DDFC445B8:
to=<us...@test.example.com>, relay=local, delay=0.04,
delays=0.03/0.01/0/0, dsn=2.0.0, status=deliverable (delivers to mailbox)
Apr 4 21:07:01 postfix-test postfix/qmgr[25369]: DDFC445B8: removed
Apr 4 21:07:07 postfix-test postfix/smtpd[25370]: NOQUEUE: reject: RCPT
from unknown[172.31.31.51]: 450 4.1.1 <gro...@example.com>: Recipient
address rejected: unverified address: Address verification in progress;
from=<no-reply@domain.invalid> to=<gro...@example.com> proto=SMTP
helo=<wheezy>
Apr 4 21:07:07 postfix-test postfix/smtpd[25370]: lost connection after
RCPT from unknown[172.31.31.51]
Apr 4 21:07:07 postfix-test postfix/smtpd[25370]: disconnect from
unknown[172.31.31.51]
----------------------------------------------------------------------