Hallo liebes Ubuntuusers-Forum,
herzlichen Dank fuer die Moeglichkeit dieser Platform. Viele Stunden habe ich mich hier schon an vielen Tagen immer wieder aufgehalten und von all den Posts anderer viel gelernt.
Und, um ganz ehrlich zu sein ducke ich mich bezueglich meinem Anliegen schon ein bisschen weg: es gibt soooooo viele Posts bezueglich der fehlerhaften Konfiguration von Postfix, und unzahelige davon zu "Relay access denied" aber meine Konstellation finde ich leider nicht.
Folgendes ist der Fall: Postfix zusammen mit Dovecot laeuft auf meinem Server ueber eine statische IP, DNS und reverse DNS sind eingerichtet. MX Eintraege auch. Das senden von Emails funktioniert super. Das Empfangen leider nicht. Anbei die Dateien:
> /var/log/mail.log <¶
1 2 3 4 | Jun 1 22:40:31 server-wohnzimmer postfix/smtpd[5621]: connect from mail-wm0-f68.google.com[74.125.82.68] Jun 1 22:40:31 server-wohnzimmer postfix/smtpd[5621]: Untrusted TLS connection established from mail-wm0-f68.google.com[74.125.82.68]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Jun 1 22:40:31 server-wohnzimmer postfix/smtpd[5621]: NOQUEUE: reject: RCPT from mail-wm0-f68.google.com[74.125.82.68]: 454 4.7.1 <c****r@b****e.com>: Relay access denied; from=<s****l@googlemail.com> to=<c****r@b****e.com> proto=ESMTP helo=<mail-wm0-f68.google.com> Jun 1 22:40:31 server-wohnzimmer postfix/smtpd[5621]: disconnect from mail-wm0-f68.google.com[74.125.82.68] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7 |
> /etc/postfix/main.cf <¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ## These are all default Postfix settings that we won't change alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes inet_interfaces = all mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -m "${EXTENSION}" mailbox_size_limit = 0 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_sasl_auth_enable = yes smtpd_sasl_authenticated_header = yes smtpd_sasl_path = private/dovecot-auth smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = b****e.com ## $myhostname smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache tls_random_source = dev:/dev/urandom ## Settings below this line are things we're modifying or adding ## Your mail server identity options myhostname = b****e.com mydestination = b****e.com, localhost.b****e.com, localhost mynetworks = 127.0.0.0/8 192.168.178.0/24 [::ffff:127.0.0.0]/104 [::1]/128 mydomain = b****e.com ## Customized smtpd paramters smtpd_banner = b****e.com ESMTP smtpd_helo_required = yes smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname, permit smtpd_recipient_restrictions = reject_unknown_client_hostname, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, reject_invalid_hostname, reject_non_fqdn_sender smtpd_sender_restrictions = reject_unknown_sender_domain, reject_sender_login_mismatch smtpd_sender_login_maps = $virtual_mailbox_maps smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination ## Dealing with rejection: use permanent 550 errors to stop retries unknown_address_reject_code = 550 unknown_hostname_reject_code = 550 unknown_client_reject_code = 550 ## customized TLS parameters smtpd_tls_ask_ccert = yes smtpd_tls_cert_file = /etc/ssl/certs/b****e.crt smtpd_tls_key_file = /etc/ssl/private/b****e.key smtpd_tls_CAfile = /etc/ssl/certs/b****e.pem smtpd_tls_ciphers = high smtpd_tls_loglevel = 1 smtpd_tls_security_level = may smtpd_tls_session_cache_timeout = 3600s ## Customized Dovecot and virtual user-specific settings canonical_maps = hash:/etc/postfix/canonical home_mailbox = Maildir/ message_size_limit = 104857600 virtual_alias_maps = hash:/etc/postfix/virtual virtual_mailbox_domains = hash:/etc/postfix/virtual-mailbox-domains virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox-users virtual_transport = dovecot ## This setting will generate an error if you restart Postfix before ## adding the appropriate service definition in master.cf, so make ## sure to get that taken care of! dovecot_destination_recipient_limit = 1 ## Customized milter settings milter_default_action = accept milter_connect_macros = j {daemon_name} v {if_name} _ non_smtpd_milters = $smtpd_milters smtpd_milters = unix:/spamass/spamass.sock unix:/clamav/clamav-milter.ctl unix:/opendkim/opendkim.sock ## Other customized mail server settings default_destination_concurrency_limit = 5 disable_vrfy_command = yes relay_destination_concurrency_limit = 1 smtp_tls_note_starttls_offer = yes smtp_tls_security_level = may |
> /etc/postfix/master.cf <¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master" or # on-line: http://www.postfix.org/master.5.html). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (no) (never) (100) # ========================================================================== smtp inet n - y - - smtpd #smtp inet n - y - 1 postscreen #smtpd pass - - y - - smtpd #dnsblog unix - - y - 0 dnsblog #tlsproxy unix - - y - 0 tlsproxy submission inet n - y - - smtpd # -o syslog_name=postfix/submission # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_reject_unlisted_recipient=no # -o smtpd_client_restrictions=$mua_client_restrictions # -o smtpd_helo_restrictions=$mua_helo_restrictions # -o smtpd_sender_restrictions=$mua_sender_restrictions # -o smtpd_recipient_restrictions= # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #smtps inet n - y - - smtpd # -o syslog_name=postfix/smtps # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_reject_unlisted_recipient=no # -o smtpd_client_restrictions=$mua_client_restrictions # -o smtpd_helo_restrictions=$mua_helo_restrictions # -o smtpd_sender_restrictions=$mua_sender_restrictions # -o smtpd_recipient_restrictions= # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #628 inet n - y - - qmqpd pickup unix n - y 60 1 pickup cleanup unix n - y - 0 cleanup qmgr unix n - n 300 1 qmgr #qmgr unix n - n 300 1 oqmgr tlsmgr unix - - y 1000? 1 tlsmgr rewrite unix - - y - - trivial-rewrite bounce unix - - y - 0 bounce defer unix - - y - 0 bounce trace unix - - y - 0 bounce verify unix - - y - 1 verify flush unix n - y 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - y - - smtp relay unix - - y - - smtp # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - y - - showq error unix - - y - - error retry unix - - y - - error discard unix - - y - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - y - - lmtp anvil unix - - y - 1 anvil scache unix - - y - 1 scache # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # Many of the following services use the Postfix pipe(8) delivery # agent. See the pipe(8) man page for information about ${recipient} # and other message envelope options. # ==================================================================== # # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} # # ==================================================================== # # Recent Cyrus versions can use the existing "lmtp" master.cf entry. # # Specify in cyrus.conf: # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4 # # Specify in main.cf one or more of the following: # mailbox_transport = lmtp:inet:localhost # virtual_transport = lmtp:inet:localhost # # ==================================================================== # # Cyrus 2.1.5 (Amos Gouaux) # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - n n - - pipe # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} # # ==================================================================== # Old example of delivery via Cyrus. # #old-cyrus unix - n n - - pipe # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} # # ==================================================================== # # See the Postfix UUCP_README file for configuration details. # uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # 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 -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} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user} dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} |
> /etc/postfix/virtual <¶
1 2 3 4 5 6 7 8 9 | c****r@b****e.com c****r@b****e.com r****t@b****e.com r****t@b****e.com postbot@b****e.com postbot@b****e.com webmaster@b****e.com webmaster@b****e.com postmaster@b****e.com webmaster@b****e.com root@mail.b****e.com webmaster@b****e.com root@b****e.com webmaster@b****e.com abuse@b****e.com webmaster@b****e.com hostmaster@b****e.com webmaster@b****e.com |
> /etc/postfix/virtual-mailbox-domains <¶
1 | b****e.com OK
|
> /etc/postfix/virtual-mailbox-users <¶
1 2 3 4 | c****r@b****e.com c****r@b****e.com r****t@b****e.com r****t@b****e.com postbot@b****e.com postbot@b****e.com webmaster@b****e.com webmaster@b****e.com |
Fuer alle besteht eine aktuelle .db.
SMTP Verbindung von extern via MUA ist kein problem. Das Versenden der Emails an diverse Adressen funktioniert auch problemlos. Ich vermute, dass der Googlemailserver abgelehnt wird, weil Postfix glaubt, die Adresse @b****e.com ist keine Zieladresse auf meinem Server und eine Weiterleitung in der Konfig abgelehnt wird. Allerdings habe ich doch myhostname etc. klar angegeben.
Naja, ich freu mich wirlich sehr ueber einen Tipp oder eine Loesung.
Vielen Dank fuer die Muehe ☺
Gute Nacht, Chris
Moderiert von misterunknown:
Emailadressen und Domains anonymisiert.