PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix kann nicht an externe Adressen versenden/Relay Access denied



Eyeless
21.06.10, 08:08
Hallo zusammen,
ich hab schlage mich seit einer geraumen Weile mit dem Fehler herum, dass ich von extern nicht über meinen Mailserver Emails verschicken kann. Lokal, also über Webfrontend geht es problemlos, nur wenn ich versuche mich extern anzumelden wird mir mitgeteilt, dass das Versenden schief geht. Ich habe einige Ansätze, die Google mir präsentiert hat bereits ausprobiert aber nichts scheint zu funktionieren. In meiner mail.log steht:

[CODE][Jun 21 08:59:17 vserver3083 postfix/smtpd[8467]: NOQUEUE: reject: RCPT from unknown[89.204.137.99]: 554 5.7.1 <***@gmx.de>: Relay access denied; from=<***@mein-server.de> to=<***@gmx.de> proto=ESMTP helo=<Inbox>
Jun 21 08:59:17 vserver3083 postfix/smtpd[8467]: generic_checks: name=reject_unauth_destination status=2
Jun 21 08:59:17 vserver3083 postfix/smtpd[8467]: > unknown[89.204.137.99]: 554 5.7.1 <***@gmx.de>: Relay access denied
Jun 21 08:59:18 vserver3083 postfix/smtpd[8467]: < unknown[89.204.137.99]: QUIT
/CODE]

postconf -n:

[CODE][alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
mydestination = mein-server.de, www.mein-server.de, localhost
mydomain = mein-server.de
myhostname = www.mein-server.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128,109.73.50.88
myorigin = /etc/mailname
owner_request_special = no
readme_directory = no
recipient_delimiter = +
relay_domains = $mydestination
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_sasl_local_domain = $myhostname
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = no
transport_maps = hash:/etc/postfix/transport
/CODE]

Weiß da irgendwer weiter? Wäre über jede Hilfe dankbar!

Gruß Eyeless

muell200
21.06.10, 08:33
Weiß da irgendwer weiter? Wäre über jede Hilfe dankbar!


relayhost angeben...

Eyeless
21.06.10, 08:55
ok danke, ich hab den Relayhost nach Postfix.org (http://www.postfix.org/postconf.5.html#relayhost)mit :

relayhost = server-ip gesetzt, der Fehler bleibt gleich, wie muss ich dass denn sonst setzen? Also ich hab entsprechend dem Tutorial unter SMTP-Server auch das setzen auf meine Domain probiert, doch auch das war erfolglos.

Gruß Eyeless

muell200
21.06.10, 08:58
relayhost = server-ip gesetzt, der Fehler bleibt gleich, wie muss ich dass denn sonst setzen? Also ich hab entsprechend dem Tutorial unter SMTP-Server auch das setzen auf meine Domain probiert, doch auch das war erfolglos.


ES GEHT NICHT - IST KEINE FEHLERMELDUNG

log dateien
config

Eyeless
21.06.10, 11:27
ES GEHT NICHT - IST KEINE FEHLERMELDUNG

Tschuldigung, diesmal genauer:

mail.log:


Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: generic_checks: name=permit_mynetworks status=0
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: generic_checks: name=reject_unauth_destination
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: reject_unauth_destination: ***@gmx.de
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: permit_auth_destination: ***@gmx.de
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: ctable_locate: leave existing entry key ***@gmx.de
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: NOQUEUE: reject: RCPT from unknown[89.204.153.99]: 554 5.7.1 <***@gmx.de>: Relay access denied; from=<ich@mein-server.de> to=<***@gmx.de> proto=ESMTP helo=<Inbox>
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: generic_checks: name=reject_unauth_destination status=2
Jun 21 12:25:47 vserver3083 postfix/smtpd[8903]: > unknown[89.204.153.99]: 554 5.7.1 <***@gmx.de>: Relay access denied
Jun 21 12:25:48 vserver3083 postfix/smtpd[8903]: < unknown[89.204.153.99]: QUIT
Jun 21 12:25:48 vserver3083 postfix/smtpd[8903]: > unknown[89.204.153.99]: 221 2.0.0 Bye



postconf -n:

root@vserver3083:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
mydestination = mein-server.de, www.mein-server.de, localhost
mydomain = mein-server.de
myhostname = www.mein-server.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128,109.73.50.88
myorigin = /etc/mailname
owner_request_special = no
readme_directory = no
recipient_delimiter = +
relay_domains = $mydestination
relayhost = 109.73.50.88
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_sasl_local_domain = $myhostname
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = no
transport_maps = hash:/etc/postfix/transport


main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
mydomain = mein-server.de

# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
myorigin = $mydomain

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
myhostname = www.mein-server.de
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
owner_request_special = no
mydestination = mein-server.de, www.mein-server.de, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128,109.73.50.88
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all


master.cf:

# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd -v
#submission inet n - - - - smtpd
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - n - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 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}
#
# 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}




Schonmal danke im voraus!
Gruß Eyeless

muell200
21.06.10, 11:47
Schonmal danke im voraus!


du musst dich am relayserver anmelden.

Eyeless
21.06.10, 12:18
du musst dich am relayserver anmelden.
Wie? Also ich bin ja schon angemeldet, Postfix und relayserver sind ja physisch die gleichen Maschinen und imo bin ich per SASL angemeldet. Versuchsweise habe ich auch als relayhost direkt localhost eingestellt. Jedoch führt dies zu keinerlei Änderung.

Jun 21 13:13:45 vserver3083 postfix/smtpd[9121]: generic_checks: name=permit_sasl_authenticated
Jun 21 13:13:45 vserver3083 postfix/smtpd[9121]: generic_checks: name=permit_sasl_authenticated status=0

Oder versteh ich da grad was grundsätzliches nicht?

Gruß Eyeless

Roger Wilco
21.06.10, 12:22
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128,109.73.50.88
# [...]
relayhost = 109.73.50.88
Das ist Bloedsinn. Lass mich raten: 109.73.50.88 ist die IP-Adresse deines Virtual-Servers. Die sollte dann natuerlich nicht als relayhost eingetragen werden.

Die Fehlermeldung im ersten Beitrag kommt einfach, weil du dich nicht richtig bei deinem MTA authentifiziert hast, aber trotzdem versuchst, E-Mails an einen externen Server (gmx.de) zu schicken. Das wird sinnvollerweise abgelehnt.

Eyeless
21.06.10, 15:40
Hi,
du hast recht, hab's grad überprüft.....ich schau es mir nachher noch an...
Gruß Eyeless

Eyeless
25.06.10, 09:02
Juhuu, alle läuft, danke ! :)


Wie setze ich den den Threadtitel auf "gelöst"? Wenn ich das erste Post editiere wird es nicht übernommen....