PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix und gmx als relay



dsplauen
24.04.05, 17:20
Hallo, folgendes Problem.

Ich möchte mit Postfix mails über gmx als RelayServer schicken.

Ich habe schon viele sach gefunden. Aber funken tuts trotzdem ned.

Mein aktueller Stand.

Debian Sarge.
Postfix und Postfix-tls (für SASL)

Ich habe auch eine SASLpasswd erstelt mit folgendeminhalt

mail.gmx.net mail@gmx.de:meinpassword





Testweise nehme ich sogar schon immer als absender meine gmx adresse wobei ich nicht genau weiss ob dies notwendig ist.

In der log steht folgendes:

Apr 24 17:18:39 tux postfix/smtpd[8667]: connect from localhost.localdomain[127.0.0.1]
Apr 24 17:19:11 tux postfix/smtpd[8667]: B2FAEEEE96: client=localhost.localdomain[127.0.0.1]
Apr 24 17:19:16 tux postfix/cleanup[8669]: B2FAEEEE96: message-id=<20050424151845.B2FAEEEE96@tux.rz>
Apr 24 17:19:16 tux postfix/qmgr[8499]: B2FAEEEE96: from=<daniel-schaedlich@gmx.de>, size=362, nrcpt=1 (queue active)
Apr 24 17:19:18 tux postfix/smtp[8670]: warning: mail.gmx.net[213.165.64.20] offered AUTH option multiple times
Apr 24 17:19:18 tux postfix/smtp[8670]: warning: SASL authentication failure: No worthy mechs found
Apr 24 17:19:18 tux postfix/smtp[8670]: B2FAEEEE96: to=<daniel.schaedlich@gmx.de>, relay=mail.gmx.net[213.165.64.20], delay=33, status=deferred (Authentication failed: cannot SASL authenticate to server mail.gmx.net[213.165.64.20]: no mechanism available)

Aso main.cf inhalt


# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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

myhostname = tux.rz
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = tux.rz, localhost, localhost.localdomain, localhost
relayhost = mail.gmx.net
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
#smtp_use_tls = yes
#smtp_tls_note_starttls_offer = yes
#smtpd_tls_auth_only = no
relayhost = [mail.gmx.net]



Ich hoffe es hat schon jemand erfolgreiche erfahrungen mit gmx als Relay gemacht hat und evtl diesen Fehler schon behoben hat.


Danke
Pinguin

Tomek
24.04.05, 17:24
Hast du auch postmap /etc/postfix/deinepasswortdatei ausgeführt?

Poste bitte noch die Datei /etc/postfix/main.cf.

dsplauen
24.04.05, 17:25
postmap /etc/postfix/deinepasswortdatei

mienst damit sie SASL Pass datei. Ja habe ich gemacht.

Config habe ich oben hinzugefügt.

Tomek
24.04.05, 17:37
Versuch mal folgendes: Ändere in der /etc/postfix/master.cf die beiden Zeilen mit:

smtp unix - - n - - smtp
relay unix - - n - - smtp
in:

smtp unix - - n - - smtp -v
relay unix - - n - - smtp -v
Danach Postfix neustarten und nochmal versuchen eine Mail zu versenden. Nun sollten im Logfile mehr Informationen zu sehen sein, die du dann hier wieder posten möchtest.

dsplauen
24.04.05, 17:45
Apr 24 17:44:16 tux postfix/qmgr[9093]: 451ECEEE97: from=<daniel-schaedlich@gmx.de>, size=351, nrcpt=1 (queue active)
Apr 24 17:44:16 tux postfix/smtp[9095]: fatal: invalid option: ?
Apr 24 17:44:16 tux postfix/qmgr[9093]: 75795EEE98: from=<daniel-schaedlich@gmx.de>, size=359, nrcpt=1 (queue active)
Apr 24 17:44:17 tux postfix/master[9090]: warning: process /usr/lib/postfix/smtp pid 9095 exit status 1
Apr 24 17:44:17 tux postfix/master[9090]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
Apr 24 17:44:22 tux postfix/smtpd[9097]: connect from localhost.localdomain[127.0.0.1]
Apr 24 17:44:34 tux postfix/smtpd[9097]: 4F49EEEE99: client=localhost.localdomain[127.0.0.1]
Apr 24 17:44:38 tux postfix/cleanup[9099]: 4F49EEEE99: message-id=<20050424154432.4F49EEEE99@tux.rz>
Apr 24 17:44:38 tux postfix/qmgr[9093]: 4F49EEEE99: from=<daniel-schaedlich@gmx.de>, size=351, nrcpt=1 (queue active)
Apr 24 17:44:40 tux postfix/smtpd[9097]: disconnect from localhost.localdomain[127.0.0.1]




das steht jetzt in der /var/log/mail.log

Tomek
24.04.05, 17:48
Apr 24 17:44:16 tux postfix/smtp[9095]: fatal: invalid option: ?
Du hast irgendwo einen Fehler oder Tippser eingebaut. Poste deine aktuelle /etc/postfix/master.cf bitte.

dsplauen
24.04.05, 17:49
Fehler gefunden hatte in y genommen statt einem v.

Gleich ändern



smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
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
smtp unix - - - - - smtp -y
relay unix - - - - - smtp -y
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
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}

# only used by postfix-tls
#tlsmgr fifo - - n 300 1 tlsmgr
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587 inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

Tomek
24.04.05, 17:50
flush unix n - - 1000? 0 flush
Dieses Fragezeichen nach der Zahl kommt nicht so gut. ;)

dsplauen
24.04.05, 17:57
Oki hier mal die Log mit dem -v statt y :-)



Apr 24 17:55:49 tux postfix/smtpd[9979]: connect from localhost.localdomain[127.0.0.1]
Apr 24 17:56:29 tux postfix/smtpd[9979]: 391F0EED98: client=localhost.localdomain[127.0.0.1]
Apr 24 17:56:34 tux postfix/cleanup[9983]: 391F0EED98: message-id=<20050424155558.391F0EED98@tux.rz>
Apr 24 17:56:34 tux postfix/qmgr[9821]: 391F0EED98: from=<daniel-schaedlich@gmx.de>, size=361, nrcpt=1 (queue active)
Apr 24 17:56:34 tux postfix/smtp[9984]: name_mask: dns
Apr 24 17:56:34 tux postfix/smtp[9984]: host name lookup methods: dns
Apr 24 17:56:34 tux postfix/smtp[9984]: dict_open: hash:/etc/postfix/sasl_passwd
Apr 24 17:56:34 tux postfix/smtp[9984]: match_string: fast_flush_domains ~? debug_peer_list
Apr 24 17:56:34 tux postfix/smtp[9984]: match_string: fast_flush_domains ~? fast_flush_domains
Apr 24 17:56:34 tux postfix/smtp[9984]: watchdog_create: 0x8066578 18000
Apr 24 17:56:34 tux postfix/smtp[9984]: watchdog_stop: 0x8066578
Apr 24 17:56:34 tux postfix/smtp[9984]: watchdog_start: 0x8066578
Apr 24 17:56:34 tux postfix/smtp[9984]: connection established
Apr 24 17:56:34 tux postfix/smtp[9984]: master_notify: status 0
Apr 24 17:56:34 tux postfix/smtp[9984]: deliver_request_initial: send initial status
Apr 24 17:56:34 tux postfix/smtp[9984]: send attr status = 0
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: flags
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: flags
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 3
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: queue_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: queue_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: active
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: queue_id
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: queue_id
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 391F0EED98
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: offset
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: offset
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 287
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: size
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: size
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 361
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: nexthop
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: nexthop
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: [mail.gmx.net]
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: encoding
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: encoding
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: (end)
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: sender
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: sender
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: daniel-schaedlich@gmx.de
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: errors-to
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: errors-to
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: daniel-schaedlich@gmx.de
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: return-receipt
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: return-receipt
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: (end)
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: time
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: time
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 1114358158
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: client_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: client_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: localhost.localdomain
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: client_address
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: client_address
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 127.0.0.1
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: protocol_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: protocol_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: SMTP
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: helo_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: helo_name
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: (end)
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: offset
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: offset
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 259
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: original_recipient
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: original_recipient
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: daniel.schaedlich@gmx.de
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: recipient
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: recipient
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: daniel.schaedlich@gmx.de
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp socket: wanted attribute: offset
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute name: offset
Apr 24 17:56:34 tux postfix/smtp[9984]: input attribute value: 0
Apr 24 17:56:34 tux postfix/smtp[9984]: deliver_request_get: file active/3/391F0EED98
Apr 24 17:56:34 tux postfix/smtp[9984]: deliver_message: from daniel-schaedlich@gmx.de
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp_parse_destination: [mail.gmx.net] smtp
Apr 24 17:56:34 tux postfix/smtp[9984]: connecting to mail.gmx.net port 25
Apr 24 17:56:34 tux postfix/smtp[9984]: smtp_addr_one: host mail.gmx.net
Apr 24 17:56:35 tux postfix/smtp[9984]: inet_addr_local: configured 2 IPv4 addresses
Apr 24 17:56:35 tux postfix/smtp[9984]: inet_addr_local: configured 2 IPv6 addresses
Apr 24 17:56:35 tux postfix/smtp[9984]: smtp_find_self: not found
Apr 24 17:56:35 tux postfix/smtp[9984]: begin mail.gmx.net address list
Apr 24 17:56:35 tux postfix/smtp[9984]: pref 0 host mail.gmx.net/213.165.64.20
Apr 24 17:56:35 tux postfix/smtp[9984]: end mail.gmx.net address list
Apr 24 17:56:35 tux postfix/smtp[9984]: smtp_connect_addr: trying: mail.gmx.net[213.165.64.20] port 25...
Apr 24 17:56:35 tux postfix/smtp[9984]: maps_find: smtp_tls_per_site: mail.gmx.net: not found
Apr 24 17:56:35 tux postfix/smtp[9984]: maps_find: smtp_tls_per_site: ail.gmx.net: not found
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 220 {mp005} GMX Mailservices ESMTP
Apr 24 17:56:35 tux postfix/smtp[9984]: > mail.gmx.net[213.165.64.20]: EHLO tux.rz
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 250-{mp005} GMX Mailservices
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 250-8BITMIME
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 250-ENHANCEDSTATUSCODES
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 250-AUTH=LOGIN CRAM-MD5 PLAIN
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 250-AUTH CRAM-MD5 LOGIN PLAIN
Apr 24 17:56:35 tux postfix/smtp[9984]: < mail.gmx.net[213.165.64.20]: 250 STARTTLS
Apr 24 17:56:35 tux postfix/smtp[9984]: warning: mail.gmx.net[213.165.64.20] offered AUTH option multiple times
Apr 24 17:56:35 tux postfix/smtp[9984]: server features: 0x33 size 0
Apr 24 17:56:35 tux postfix/smtp[9984]: maps_find: smtp_sasl_passwd: hash:/etc/postfix/sasl_passwd(0,100): mail.gmx.net = daniel-schaedlich@gmx.de:meinpasswort
Apr 24 17:56:35 tux postfix/smtp[9984]: smtp_sasl_passwd_lookup: host `mail.gmx.net' user `daniel-schaedlich@gmx.de' pass `meinpasswort`
Apr 24 17:56:35 tux postfix/smtp[9984]: starting new SASL client
Apr 24 17:56:35 tux postfix/smtp[9984]: smtp_sasl_authenticate: mail.gmx.net[213.165.64.20]: SASL mechanisms CRAM-MD5 LOGIN PLAIN
Apr 24 17:56:35 tux postfix/smtp[9984]: warning: SASL authentication failure: No worthy mechs found
Apr 24 17:56:35 tux postfix/smtp[9984]: connect to subsystem private/defer
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr nrequest = 0
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr flags = 0
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr queue_id = 391F0EED98
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr original_recipient = daniel.schaedlich@gmx.de
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr recipient = daniel.schaedlich@gmx.de
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr offset = 259
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr status = 4.0.0
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr action = delayed
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr reason = Authentication failed: cannot SASL authenticate to server mail.gmx.net[213.165.64.20]: no mechanism available
Apr 24 17:56:35 tux postfix/smtp[9984]: private/defer socket: wanted attribute: status
Apr 24 17:56:35 tux postfix/smtp[9984]: input attribute name: status
Apr 24 17:56:35 tux postfix/smtp[9984]: input attribute value: 0
Apr 24 17:56:35 tux postfix/smtp[9984]: private/defer socket: wanted attribute: (list terminator)
Apr 24 17:56:35 tux postfix/smtp[9984]: input attribute name: (end)
Apr 24 17:56:35 tux postfix/smtp[9984]: 391F0EED98: to=<daniel.schaedlich@gmx.de>, relay=mail.gmx.net[213.165.64.20], delay=37, status=deferred (Authentication failed: cannot SASL authenticate to server mail.gmx.net[213.165.64.20]: no mechanism available)
Apr 24 17:56:35 tux postfix/smtp[9984]: flush_add: site gmx.de id 391F0EED98
Apr 24 17:56:35 tux postfix/smtp[9984]: match_hostname: gmx.de ~? tux.rz
Apr 24 17:56:35 tux postfix/smtp[9984]: match_hostname: gmx.de ~? localhost
Apr 24 17:56:35 tux postfix/smtp[9984]: match_hostname: gmx.de ~? localhost.localdomain
Apr 24 17:56:35 tux postfix/smtp[9984]: match_hostname: gmx.de ~? localhost
Apr 24 17:56:35 tux postfix/smtp[9984]: match_list_match: gmx.de: no match
Apr 24 17:56:35 tux postfix/smtp[9984]: flush_add: site gmx.de id 391F0EED98 status 4
Apr 24 17:56:35 tux postfix/smtp[9984]: name_mask: resource
Apr 24 17:56:35 tux postfix/smtp[9984]: name_mask: software
Apr 24 17:56:35 tux postfix/smtp[9984]: disposing SASL state information
Apr 24 17:56:35 tux postfix/smtp[9984]: deliver_request_final: send: "Authentication failed: cannot SASL authenticate to server mail.gmx.net[213.165.64.20]: no mechanism available" -1
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr reason = Authentication failed: cannot SASL authenticate to server mail.gmx.net[213.165.64.20]: no mechanism available
Apr 24 17:56:35 tux postfix/smtp[9984]: send attr status = 4294967295
Apr 24 17:56:35 tux postfix/smtp[9984]: master_notify: status 1
Apr 24 17:56:35 tux postfix/smtp[9984]: connection closed
Apr 24 17:56:35 tux postfix/smtp[9984]: watchdog_stop: 0x8066578
Apr 24 17:56:35 tux postfix/smtp[9984]: watchdog_start: 0x8066578
Apr 24 17:56:36 tux postfix/smtpd[9979]: disconnect from localhost.localdomain[127.0.0.1]

Tomek
24.04.05, 18:01
Öhm, habe da so eine Idee. Mache mal folgendes:

apt-get install libsasl2 libsasl2-modules libsasl-digestmd5 libsasl-modules-plain libsasl2-modules-gssapi-heimdal libsasl2-modules-kerberos-heimdal libsasl7
Danach Postfix neustarten und nochmal versuchen die Mail zu senden.

Und: Benutze bitte die CODE-Tags, wenn du Konfigurationsdateien oder Logauszüge postest.

dsplauen
24.04.05, 18:12
Daaaanke.

Ich habe folgende Libs noch installiert

libsasl2-modules
libsasl2-modules-gssapi-heimdal


die anderen die du angegeben hast hat er nicht gefunden.

Aber die Mails kommen jetzt an.
Juhu wieder einen schritt weiter.

Danke

dsplauen
24.04.05, 18:18
Mal ne andere Frage. Es ist jetzt zwar kein openRelay mehr (wenn ich das richtig verstehe) aber im prinzio kann trotzdem jeder ein Telnet auf die 25 machen und mails verschicken. Der absender muss nur die richtige Mailadresse sein. Oder??

Tomek
24.04.05, 18:23
Nein. Lies bitte die Dokumentation: http://www.postfix.org/SMTPD_ACCESS_README.html

dsplauen
24.04.05, 18:29
Aso verstehe, man kann berechtigungen vergeben wer drauf darf und wer nicht.

Danke