[postfix-users] Problem mit doppelten Weiterleitungen

Robert Schetterer robert at schetterer.org
Sa Nov 28 10:31:25 CET 2009


Martin Sebald schrieb:
> Hallo Werner, Hallo Robert,
> 
> so, dann wollen wir mal... ;-)
> 
>> schick bitte die relevanten Konfigurationsdateien (postconf -n, Auszug
>> der master.cf, Zustellversuch inkl. Logfileauszug
> 
> Unten die gewuenschten Auszuege und Logs. Ist natuerlich ne Menge... ;-)
> 
> inet_interfaces, mydestination, mydestination, mydomain, myhostname,
> mynetworks, myorigin, permit_mx_backup_networks, relay_domains hab ich
> weggelassen. Da stehen ja nur die serverspezifischen Hostnamen/IPs etc
> drinnen.
> 
>> und ggf. noch den Eintrag für den Alias in der Datenbank).
> 
> Der Datenbankeintrag (Postfix arbeitet bei mir via MySQL) fuer die
> Weiterleitung schaut so aus:
> 
> 1) Werden Mails "ganz normal" in der Mailbox gespeichert, steht im in der
> alias Tabelle im Feld goto lediglich die Mailadresse der Mailbox.
> 
> 2) Bei Weiterleitung der Mails einer Mailbox auf eine andere Adresse steht
> im Feld goto lediglich die Zieladresse
> 
> 3) Soll die Mail an eine (oder mehrere) andere Adresse UND an die Mailbox
> gehen, steht im Feld goto "mailbox at domain.tld,alias at domain.tld"
> 
>> duerfte das gleiche oder aehnliches problem sein
>> allerdings muesste man mal deine conf sehen, manipuliert squirrelmail
>> die weiterleitung ( alias ) in einer datenbank, zb wie bei postfixadmin
>> etc?,
> 
> Ja, das Plugin von Squirrelmail veraendert den Inhalt obiger Tabelle wie
> beschrieben. Viel mehr als direkt mit Postfixadmin passiert allerdings
> nicht - wenn man davon absieht, dass man via Postfixadmin glaube ich keinen
> Forward fuer Mailboxen einrichten kann. Oder geht das sogar?

geht ohne Probleme
ist eher der standart

> 
>> oder ist das ein forward  maildrop oder eine sieve rule ?
> 
> Ich verwende maildrop.

ok dann wird da ja eine maildrop rule draus, die wiederum
wieder per sendmail versendet oder ?
wie sieht die denn aus ?

bei mir sieht das so aus

virtual_transport = maildrop
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
mailbox_command = /usr/bin/maildrop -d ${USER}


maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/bin/maildrop -w 90 -d
${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop}


letztendlich laeuft es darauf hinaus, das du rausfinden musst
wer mails eigentlich forwarded ( virtual postfix ) oder maildrop
und wo an welcher stelle die mails wieder an postfix uebergeben werden
und wie, du hast ja da auch filter drinn die koennen dann auch fuers
verdoppeln sorgen, ich wuerde sagen bei dir ist ebenfalls mind amavis

in deiner amavis zeile in der master.cf
solltest du mal

 -o
receive_override_options=no_address_mappings,no_unknown_recipient_checks,no_header_body_checks,no_milters

einfuegen das duerfte auf keinen Fall falsch sein
guggste unten im mail hab ich es nochmal reinpasted

> 
> Viele Gruesse,
> Martin
> 
> 
> -------------------------------------------------------------------
> 
> postconf -n
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> allow_min_user = yes
> anvil_rate_time_unit = 60s
> append_dot_mydomain = no
> biff = no
> broken_sasl_auth_clients = yes
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> content_filter = amavis:[127.0.0.1]:10026
> daemon_directory = /usr/lib/postfix
> delay_warning_time = 3h
> inet_protocols = ipv4, ipv6
> mail_owner = postfix
> mailbox_command = maildrop -d "$USER" -f "$SENDER" "$EXTENSION"
> mailbox_size_limit = 0
> message_size_limit = 104857600
> recipient_delimiter = +
> relayhost =
> setgid_group = postdrop
> smtp_send_xforward_command = yes
> smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
> smtp_tls_cert_file = /etc/postfix/ssl/smtpd.crt
> smtp_tls_key_file = /etc/postfix/ssl/smtpd.key
> smtp_tls_loglevel = 1
> smtp_tls_note_starttls_offer = yes
> smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
> smtp_tls_session_cache_timeout = 3600s
> smtp_use_tls = yes
> smtpd_banner = $myhostname ESMTP
> smtpd_client_message_rate_limit = 2000
> smtpd_client_restrictions = permit_mynetworks   permit_sasl_authenticated       reject_rbl_client ix.dnsbl.manitu.net     reject_rbl_client sbl-xbl.spamhaus.org  reject_rbl_client dul.dnsbl.sorbs.net   reject_rbl_client spamcop.net     check_client_access regexp:/etc/postfix/add_no-auth_header.re
> smtpd_data_restrictions = reject_unauth_pipelining      permit_mynetworks       permit_sasl_authenticated
> smtpd_recipient_restrictions = permit_mynetworks        permit_sasl_authenticated       reject_unknown_recipient_domain   reject_unauth_destination       check_policy_service inet:127.0.0.1:10031
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_authenticated_header = yes
> smtpd_sasl_local_domain = $myhostname
> smtpd_sasl_security_options = noanonymous
> smtpd_sender_restrictions = permit_mynetworks   permit_sasl_authenticated       reject_unknown_sender_domain    reject_non_fqdn_sender    check_sender_access regexp:/etc/postfix/filter_catch-all.re
> smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
> smtpd_tls_ask_ccert = no
> smtpd_tls_auth_only = no
> smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
> smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
> smtpd_tls_loglevel = 1
> smtpd_tls_received_header = yes
> smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache
> smtpd_tls_session_cache_timeout = 3600s
> smtpd_use_tls = yes
> tls_random_source = dev:/dev/urandom
> transport_maps = hash:/etc/postfix/transport
> virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
> virtual_gid_maps = mysql:/etc/postfix/mysql_virtual_gid.cf
> virtual_mailbox_base = /var/spool/mail/virtual
> virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
> virtual_mailbox_limit = 0
> virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
> virtual_transport = maildrop
> virtual_uid_maps = mysql:/etc/postfix/mysql_virtual_uid.cf
> 
> -------------------------------------------------------------------
> 
> main.cf
> 
> command_directory = /usr/sbin
> daemon_directory = /usr/lib/postfix
> program_directory = /usr/lib/postfix
> 
> smtpd_banner = $myhostname ESMTP
> setgid_group = postdrop
> biff = no
> 
> append_dot_mydomain = no
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> relayhost =
> inet_protocols = ipv4, ipv6
> mailbox_command = maildrop -d "$USER" -f "$SENDER" "$EXTENSION"
> mailbox_size_limit = 0
> virtual_mailbox_limit = 0
> message_size_limit = 104857600
> recipient_delimiter = +
> virtual_maps = hash:/etc/postfix/virtual
> mail_owner = postfix
> 
> content_filter = amavis:[127.0.0.1]:10026
> 
> smtp_send_xforward_command = yes
> 
> virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
> virtual_mailbox_base = /var/spool/mail/virtual
> virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
> virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
> virtual_transport = maildrop
> maildrop_destination_recipient_limit = 1
> virtual_uid_maps = mysql:/etc/postfix/mysql_virtual_uid.cf
> virtual_gid_maps = mysql:/etc/postfix/mysql_virtual_gid.cf
> 
> smtpd_client_message_rate_limit = 2000
> anvil_rate_time_unit = 60s
> 
> transport_maps = hash:/etc/postfix/transport
> 
> mailman_destination_recipient_limit = 1
> 
> smtp_use_tls = yes
> smtp_tls_note_starttls_offer = yes
> smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
> smtp_tls_key_file = /etc/postfix/ssl/smtpd.key
> smtp_tls_cert_file = /etc/postfix/ssl/smtpd.crt
> smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
> smtp_tls_session_cache_timeout = 3600s
> smtp_tls_loglevel = 1
> smtpd_tls_auth_only = no
> smtpd_use_tls = yes
> smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
> smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
> smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
> smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache
> smtpd_tls_received_header = yes
> smtpd_tls_session_cache_timeout = 3600s
> smtpd_tls_ask_ccert = no
> smtpd_tls_loglevel = 1
> tls_random_source = dev:/dev/urandom
> 
> delay_warning_time = 3h
> 
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_authenticated_header = yes
> 
> allow_min_user = yes
> 
> smtpd_sasl_local_domain = $myhostname
> 
> smtpd_sasl_security_options = noanonymous
> 
> broken_sasl_auth_clients = yes
> 
> smtpd_client_restrictions =
>         permit_mynetworks
>         permit_sasl_authenticated
>         reject_rbl_client ix.dnsbl.manitu.net
>         reject_rbl_client sbl-xbl.spamhaus.org
>         reject_rbl_client dul.dnsbl.sorbs.net
>         reject_rbl_client spamcop.net
>         check_client_access regexp:/etc/postfix/add_no-auth_header.re
> 
> smtpd_sender_restrictions =
>         permit_mynetworks
>         permit_sasl_authenticated
>         reject_unknown_sender_domain
>         reject_non_fqdn_sender
>         check_sender_access regexp:/etc/postfix/filter_catch-all.re
> 
> smtpd_recipient_restrictions =
>         permit_mynetworks
>         permit_sasl_authenticated
>         reject_unknown_recipient_domain
>         reject_unauth_destination
>         check_policy_service inet:127.0.0.1:10031
> 
> smtpd_data_restrictions =
>         reject_unauth_pipelining
>         permit_mynetworks
>         permit_sasl_authenticated
> 
> -------------------------------------------------------------------
> 
> master.cf
> 
> # ==========================================================================
> # service type  private unpriv  chroot  wakeup  maxproc command + args
> #               (yes)   (yes)   (yes)   (never) (100)
> # ==========================================================================
> smtp      inet  n       -       -       -       -       smtpd
> smtps     inet  n       -       -       -       -       smtpd -o smtpd_tls_wrappermode=yes
> submission inet n       -       -       -       -       smtpd -o smtpd_enforce_tls=yes
> pickup    fifo  n       -       -       60      1       pickup
> cleanup   unix  n       -       -       -       0       cleanup
> qmgr      fifo  n       -       -       300     1       qmgr
> rewrite   unix  -       -       -       -       -       trivial-rewrite
> bounce    unix  -       -       -       -       0       bounce
> defer     unix  -       -       -       -       0       bounce
> flush     unix  n       -       -       1000?   0       flush
> proxymap  unix  -       -       n       -       -       proxymap
> smtp      unix  -       -       -       -       -       smtp
>     -o smtp_bind_address=x.x.x.x
>     -o smtp_bind_address6=2a01:198:42b::1
> relay     unix  -       -       -       -       -       smtp
> showq     unix  n       -       -       -       -       showq
> error     unix  -       -       -       -       -       error
> local     unix  -       n       n       -       -       local
> virtual   unix  -       n       n       -       -       virtual
> lmtp      unix  -       -       n       -       -       lmtp
> 
> maildrop  unix  -       n       n       -       -       pipe
>   flags=DRhu user=vmail argv=/usr/bin/maildrop -w 90 -d ${recipient}
> cyrus     unix  -       n       n       -       -       pipe
>   flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m "${extension}" ${user}
> uucp      unix  -       n       n       -       -       pipe
>   flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
> ifmail    unix  -       n       n       -       -       pipe
>   flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
> bsmtp     unix  -       n       n       -       -       pipe
>   flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
> scalemail-backend unix  -       n       n       -       2       pipe
>   flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
> 
> trace     unix  -       -       -       -       0       bounce
> verify    unix  -       -       -       -       1       verify
> 
> amavis unix - - n - 4 smtp
>     -o smtp_data_done_timeout=1200
>     -o disable_dns_lookups=yes

----------------------------------------------guggst du

> 
> 127.0.0.1:10025 inet n - n - - smtpd
>     -o content_filter=

 -o
receive_override_options=no_address_mappings,no_unknown_recipient_checks,no_header_body_checks,no_milters

>     -o smtpd_data_restrictions=
>     -o local_recipient_maps=
>     -o relay_recipient_maps=
>     -o smtpd_restriction_classes=
>     -o smtpd_client_restrictions=
>     -o smtpd_helo_restrictions=
>     -o smtpd_sender_restrictions=
>     -o smtpd_recipient_restrictions=permit_mynetworks,reject
>     -o mynetworks=127.0.0.0/8,[::1]/128

loesch das da
>     -o strict_rfc821_envelopes=yes 

evtl noch

-o smtpd_authorized_xforward_hosts=127.0.0.0/8

--------------------------------------------------------------

> tlsmgr    unix  -       -       -       1000?   1       tlsmgr
> anvil     unix  -       -       -       -       1       anvil
> scache    unix  -       -       -       -       1       scache
> discard   unix  -       -       -       -       -       discard
> retry     unix  -       -       -       -       -       error
> 
> mailman   unix  -       n       n       -       -       pipe
>   flags=FR user=list
>   argv=/var/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${mailbox}
> 
> -------------------------------------------------------------------
> 
> Nov 28 00:10:19 mailserver postfix/smtpd[6920]: E817AA4C111: client=mailsendeclient.domain.tld[2a01:198:2b4::2], sasl_method=CRAM-MD5, sasl_username=sender at domain.tld
> Nov 28 00:10:20 mailserver postfix/cleanup[18333]: E817AA4C111: message-id=<669487799.20091128001018 at mailserver.domain.tld>
> Nov 28 00:10:20 mailserver postfix/qmgr[2843]: E817AA4C111: from=<sender at domain.tld>, size=853, nrcpt=2 (queue active)
> Nov 28 00:10:20 mailserver postfix/smtpd[18353]: connect from localhost[127.0.0.1]
> Nov 28 00:10:20 mailserver postfix/smtpd[18353]: 256D9A4C112: client=localhost[127.0.0.1]
> Nov 28 00:10:20 mailserver postfix/cleanup[18333]: 256D9A4C112: message-id=<669487799.20091128001018 at mailserver.domain.tld>
> Nov 28 00:10:20 mailserver postfix/qmgr[2843]: 256D9A4C112: from=<sender at domain.tld>, size=1771, nrcpt=3 (queue active)
> Nov 28 00:10:20 mailserver amavis[19965]: (19965-01) Passed, <sender at domain.tld> -> <alias at domain.tld>,<mailbox at domain.tld>, quarantine VGwnBzPRjc5m, Message-ID: <669487799.20091128001018 at mailserver.domain.tld>, Hits: -
> Nov 28 00:10:20 mailserver postfix/smtpd[6920]: disconnect from mailsendeclient.domain.tld[2a01:198:2b4::2]
> Nov 28 00:10:20 mailserver postfix/smtp[21892]: E817AA4C111: to=<alias at domain.tld>, orig_to=<mailbox at domain.tld>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.26, delays=0.09/0.04/0.01/0.13, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=19965-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 256D9A4C112)
> Nov 28 00:10:20 mailserver postfix/smtp[21892]: E817AA4C111: to=<mailbox at domain.tld>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.26, delays=0.09/0.04/0.01/0.13, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=19965-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 256D9A4C112)
> Nov 28 00:10:20 mailserver postfix/qmgr[2843]: E817AA4C111: removed
> Nov 28 00:10:20 mailserver postfix/pipe[21894]: 256D9A4C112: to=<alias at domain.tld>, relay=maildrop, delay=0.04, delays=0.01/0.01/0/0.03, dsn=2.0.0, status=sent (delivered via maildrop service)
> Nov 28 00:10:20 mailserver postfix/pipe[21894]: 256D9A4C112: to=<mailbox at domain.tld>, relay=maildrop, delay=0.07, delays=0.01/0.04/0/0.03, dsn=2.0.0, status=sent (delivered via maildrop service)
> Nov 28 00:10:20 mailserver postfix/pipe[21898]: 256D9A4C112: to=<alias at domain.tld>, orig_to=<mailbox at domain.tld>, relay=maildrop, delay=0.08, delays=0.01/0.05/0/0.02, dsn=2.0.0, status=sent (delivered via maildrop service)
> Nov 28 00:10:20 mailserver postfix/qmgr[2843]: 256D9A4C112: removed
> 
> -------------------------------------------------------------------
> 
> _______________________________________________
> postfix-users mailing list
> postfix-users at de.postfix.org
> http://de.postfix.org/cgi-bin/mailman/listinfo/postfix-users


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Mehr Informationen über die Mailingliste postfix-users