[Postfixbuch-users] Duplikate bei Verwendung von Aliasen underdrücken

Mathias Jeschke postfixbuch-users at 0xaffe.de
Fr Mär 13 09:37:35 CET 2015


Hallo,

Patrick Westenberg schrieb:

>> wie realisiert ihr es bei euren Systemen, dass Mails die sowohl direkt
>> an einen Empfänger als auch an einen Alias (bzw. zwei Aliase) gehen,
>> doppelt in der Inbox landen?
>
> -o receive_override_options=no_address_mappings
>
> hat mir geholfen.

Leider funktionieren beide Optionen nicht zusammen der 
Adress-Verifikation (gegen Dovecot via LMTP).

Ich habe das mal auf einem Testsystem (Debian Wheezy) nachgestellt - 
master.cf ist unverändert, die main.cf sieht so aus:
----------------------------------------------------------------------
$ cat /etc/postfix/main.cf
mydomain = example.com
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,

# Variante 1:
enable_original_recipient = no
# Variante 2:
#receive_override_options = no_address_mappings
----------------------------------------------------------------------
$ cat /etc/postfix/virtual_aliases
muster at postfix-test.example.com root at postfix-test.example.com
test at postfix-test.example.com   root at postfix-test.example.com
----------------------------------------------------------------------
Auf dem Testsystem erfolgt die Zustellung lokal nach /var/mail/root.

Ohne reject_unverified_recipient wird bei beiden Varianten _eine_ Mail 
zugestellt, ohne enable_original_recipient bzw. receive_override_options 
erfolgt die Adress-Verifikation, aber wie eingangs erwähnt erhalte ich 
dabei _zwei_ Mails.

Wenn ich die Adress-Verifikation aktiviere und 
"enable_original_recipient = no" setze, bekommt der Sender immer ein 450 
Fehler: "Recipient address rejected: unverified address: Address 
verification in progress"

> Mar 13 09:30:01 postfix-test postfix/smtpd[9667]: connect from unknown[172.31.31.51]
> Mar 13 09:30:01 postfix-test postfix/verify[9671]: cache btree:/var/lib/postfix/verify_cache full cleanup: retained=0 dropped=0 entries
> Mar 13 09:30:01 postfix-test postfix/cleanup[9672]: 8F30D3837: message-id=<20150313083001.8F30D3837 at postfix-test.example.com>
> Mar 13 09:30:01 postfix-test postfix/qmgr[9666]: 8F30D3837: from=<double-bounce at postfix-test.example.com>, size=259, nrcpt=1 (queue active)
> Mar 13 09:30:01 postfix-test postfix/local[9673]: 8F30D3837: to=<root at postfix-test.example.com>, relay=local, delay=0.06, delays=0.03/0.01/0/0.02, dsn=2.0.0, status=deliverable (delivers to mailbox)
> Mar 13 09:30:01 postfix-test postfix/qmgr[9666]: 8F30D3837: removed
> Mar 13 09:30:07 postfix-test postfix/smtpd[9667]: NOQUEUE: reject: RCPT from unknown[172.31.31.51]: 450 4.1.1 <muster at postfix-test.example.com>: Recipient address rejected: unverified address: Address verification in progress; from=<sender at example.invalid> to=<muster at postfix-test.example.com> proto=SMTP helo=<wheezy>
> Mar 13 09:30:07 postfix-test postfix/smtpd[9667]: lost connection after RCPT from unknown[172.31.31.51]
> Mar 13 09:30:07 postfix-test postfix/smtpd[9667]: disconnect from unknown[172.31.31.51]

Wenn ich stattdessen "receive_override_options = no_address_mappings" 
setze, kommt es zu Bounces:

> Mar 13 09:33:41 postfix-test postfix/smtpd[9797]: connect from unknown[172.31.31.51]
> Mar 13 09:33:41 postfix-test postfix/verify[9801]: cache btree:/var/lib/postfix/verify_cache full cleanup: retained=0 dropped=0 entries
> Mar 13 09:33:41 postfix-test postfix/cleanup[9802]: 8A5E43837: message-id=<20150313083341.8A5E43837 at postfix-test.example.com>
> Mar 13 09:33:41 postfix-test postfix/qmgr[9796]: 8A5E43837: from=<double-bounce at postfix-test.example.com>, size=259, nrcpt=1 (queue active)
> Mar 13 09:33:41 postfix-test postfix/local[9803]: 8A5E43837: to=<root at postfix-test.example.com>, orig_to=<muster at postfix-test.example.com>, relay=local, delay=0.07, delays=0.05/0.01/0/0.02, dsn=2.0.0, status=deliverable (delivers to mailbox)
> Mar 13 09:33:41 postfix-test postfix/qmgr[9796]: 8A5E43837: removed
> Mar 13 09:33:44 postfix-test postfix/smtpd[9797]: 8B3F83837: client=unknown[172.31.31.51]
> Mar 13 09:33:44 postfix-test postfix/cleanup[9804]: 90B4638B9: message-id=<20150313083344.90B4638B9 at postfix-test.example.com>
> Mar 13 09:33:44 postfix-test postfix/qmgr[9796]: 90B4638B9: from=<double-bounce at postfix-test.example.com>, size=259, nrcpt=1 (queue active)
> Mar 13 09:33:44 postfix-test postfix/local[9803]: 90B4638B9: to=<root at postfix-test.example.com>, orig_to=<test at postfix-test.example.com>, relay=local, delay=0.07, delays=0.05/0/0/0.02, dsn=2.0.0, status=deliverable (delivers to mailbox)
> Mar 13 09:33:44 postfix-test postfix/qmgr[9796]: 90B4638B9: removed
> Mar 13 09:33:47 postfix-test postfix/cleanup[9802]: 8B3F83837: message-id=<5502a0e5.Esnx2uXCcEAkCtsY%sender at example.invalid>
> Mar 13 09:33:47 postfix-test postfix/qmgr[9796]: 8B3F83837: from=<sender at example.invalid>, size=512, nrcpt=2 (queue active)
> Mar 13 09:33:47 postfix-test postfix/smtpd[9797]: disconnect from unknown[172.31.31.51]
> Mar 13 09:33:47 postfix-test postfix/local[9803]: 8B3F83837: to=<muster at postfix-test.example.com>, relay=local, delay=6.2, delays=6.2/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "muster")
> Mar 13 09:33:48 postfix-test postfix/local[9805]: 8B3F83837: to=<test at postfix-test.example.com>, relay=local, delay=7.4, delays=6.2/0.01/0/1.2, dsn=5.1.1, status=bounced (unknown user: "test")
> Mar 13 09:33:48 postfix-test postfix/cleanup[9804]: DD23038BD: message-id=<20150313083348.DD23038BD at postfix-test.example.com>
> Mar 13 09:33:48 postfix-test postfix/qmgr[9796]: DD23038BD: from=<>, size=2655, nrcpt=1 (queue active)
> Mar 13 09:33:48 postfix-test postfix/bounce[9806]: 8B3F83837: sender non-delivery notification: DD23038BD
> Mar 13 09:33:48 postfix-test postfix/qmgr[9796]: 8B3F83837: removed
> Mar 13 09:33:48 postfix-test postfix/smtp[9808]: DD23038BD: to=<sender at example.invalid>, relay=none, delay=0.07, delays=0.02/0.01/0.04/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=example.invalid type=AAAA: Host not found)
> Mar 13 09:33:48 postfix-test postfix/qmgr[9796]: DD23038BD: removed

Hat jemand eine Idee wie ich die Duplikate verhindern kann und trotzdem 
Adress-Verifikation durchführen kann?

Vielen Dank,
Mathias.




Mehr Informationen über die Mailingliste Postfixbuch-users