• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Postfix-SMTP Frage

Status
Für weitere Antworten geschlossen.

isnick

Newbie
Hallo zusammen,

seit einigen Tagen habe ich einen Postfix E-Mail Server im einsatz (Fetchmail, Postfix, Cyrus-IMAP). Der Server läuft im lokalen Netz.
Es sollte eigentlich nach folgendes Schema funktionieren:

Incoming mails:
fetchmail -> postfix -> cyrus-imap -> eMailClient.
(und das funktioniert einwandfrei, ich bekomme alle mails von außen!)

Lokale mails kann ich empfangen und senden, funktioniert auch ohne weiteres...

Outgoing mails:
eMail-Client -> postfix -> Relay-Host
(funktioniert nicht :- ( )
Ich bekomme ständig eine Meldung:
(Auszug aus mail.info)

Feb 18 09:25:53 MAIL-SRV postfix/smtp[11743]: 5EB6D2AF3C: to=<xxx@web.de>, relay=authmailonline.kundenserver.de[212.227.15.164], delay=26, status=bounced (host authmailonline.kundenserver.de[212.227.15.164] said: 530 Authentication required (in reply to MAIL FROM command))
Feb 18 09:25:53 MAIL-SRV postfix/cleanup[11739]: C57482AF44: message-id=<20050218082553.C57482AF44@MAIL-SRV.ITRACO-NET.de>
Feb 18 09:25:53 MAIL-SRV postfix/qmgr[7849]: C57482AF44: from=<>, size=2497, nrcpt=1 (queue active)
Feb 18 09:25:53 MAIL-SRV postfix/qmgr[7849]: 5EB6D2AF3C: removed
Feb 18 09:25:53 MAIL-SRV postfix/pipe[11748]: C57482AF44: to=<yyy@mydomain.de>, orig_to=<yyy@ITRACO.de>, relay=cyrus, delay=0, status=sent (MAIL-SRV.mydomain.de)
Feb 18 09:25:53 MAIL-SRV postfix/qmgr[7849]: C57482AF44: removed



Und die test-mail kommt zurück:
..........
<xxxx@web.de>: host authmailonline.kundenserver.de[212.227.15.164] said: 530
Authentication required (in reply to MAIL FROM command)
..........

meine main.cf :
.....
mydestination = $myhostname, localhost.$mydomain, $mydomain, mysql:/etc/postfix/mysql-mydestination.cf
defer_transports =
disable_dns_lookups = no
relayhost = auth.mail.onlinehome.de
relay_domains = $mydestination
content_filter =
mailbox_command =
mailbox_transport = cyrus
#
##SMTP-AUTH
#
smtp_sasl_auth_enable = no
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtp_always_send_ehlo = yes
smtp_tls_note_starttls_offer = no
smtp_use_tls = no
smtp_starttls_timeout = 10s
#
##SMTPD
#
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_security_options = noanonymous
smtpd_sasl_auth_enable = yes
smtpd_use_tls = no
#
strict_rfc821_envelopes = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
broken_sasl_auth_clients = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
........



Vielen Dank im Voraus!!!
 

pft

Advanced Hacker
Hi,

Dein Mail-Relay verlangt eine Authentifizierung, sonst könnte da ja jeder ...

Die Anleitung foindest Du z.B. bei suse unter
http://portal.suse.com/sdb/de/2002/11/rsimai_slox_smtp_auth.html

Gruß
 
OP
I

isnick

Newbie
Hallo liebe experten,

hat jemand eine idee, warum die authentifizierung nicht funktioniert?
ich brauche Ihre hilfe....

Gruß, nick
 
A

Anonymous

Gast
Einfach so können wir dir auch nicht helfen.
Schick uns doch mal deine aktuelle Konfigurationen sodass wir mögliche Fehler finden können.

Mfg. Mercedesdriver :)
 
OP
I

isnick

Newbie
hallo Mercedesdriver,

hier ist die Daten:
meine master.cf
==========================================================================
smtp inet n - n - - smtpd -v
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes -o smtpd_etrn_restrictions=reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
smtp unix - n n - 10 smtp
anvil unix - - n - 1 anvil
localhost:10026 inet n - n - 20 smtpd -o content_filter=
#
# 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}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan unix - n n - 10 pipe
user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

==================================================

die main.cf:

sample_directory = /usr/share/doc/packages/postfix/samples

# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/packages/postfix/README_FILES
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
#sender_canonical_maps = hash:/etc/postfix/sender_canonical
sender_canonical_maps = mysql:/etc/postfix/mysql-canonical.cf
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
program_directory = /usr/lib/postfix
myhostname = MAIL-SRV.IT-NET.de
mydomain = IT-NET.de
inet_interfaces = all
mynetworks = 192.168.100.0/24, 127.0.0.0/8
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain, $mydomain, mysql:/etc/postfix/mysql-mydestination.cf
defer_transports =
disable_dns_lookups = no
relayhost = [auth.mail.onlinehome.de]
relay_domains = $mydestination
content_filter =
mailbox_command =
mailbox_transport = cyrus
#
##SMTP-AUTH
#
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_always_send_ehlo = yes
smtp_tls_note_starttls_offer = no
smtp_use_tls = no
smtp_starttls_timeout = 10s
##SMTPD
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_use_tls = no
#
strict_rfc821_envelopes = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
broken_sasl_auth_clients = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

Gruß, nick
 

pft

Advanced Hacker
jemand hat mal behauptet, dass Leute, die zuviel vor dem Computer sitzen mit dem verlust ihrer Kommmunikationsfähigkeit rechnen müssen, oder so ähnlich - scheint was dran zu sein.

Mensch, laß dir doch nicht alles aus der Nase ziehen! Du willst Hilfe von uns und nicht umgekehrt!!!

Also:
Hast Du in sasl-Passwd alles riuhtig eingetragen?
hast du daraus die "hash"-datei erzeugt?
Hast Du postfix danach neu gestartet bzw. ein reload durchgeführt?

Was passiert nun?
Geht nicht recht nicht. Irgendeine Reaktion bekommt man fast immer.

Poste mal endlich die relevanten Log-Ausgaben. Oder glaubst Du wir sind hier alle Hellseher.
 
OP
I

isnick

Newbie
hallo zusammen,
war leider lange Zeit unterwegs...
jetzt zurück zur sache:

Hast Du in sasl-Passwd alles riuhtig eingetragen?

-> ja
# sasl_passwd
# Syntax:
# domain username:password
# Example:
# foo.com username:password
# See /usr/share/doc/packages/postfix/README_FILES/SASL_README
# for more details
smtp.1und1.de yyyy:xxxx

(in der Datei stehen natürlich richtige Name und Paßwort)

hast du daraus die "hash"-datei erzeugt?

-> ja, mit postmap sasl_passwd

Hast Du postfix danach neu gestartet bzw. ein reload durchgeführt?

-> den postfix neu gestartet...

hier ist mein letzter versuch:

Feb 23 18:45:59 MAIL-SRV postfix/smtpd[10893]: watchdog_stop: 0x566398
Feb 23 18:45:59 MAIL-SRV postfix/smtpd[10893]: watchdog_start: 0x566398
Feb 23 18:46:11 MAIL-SRV postfix/smtp[10904]: DC4012AF54: to=<ntsis@web.de>, relay=authmailonline.kundenserver.de[212.227.15.164], delay=12, status=bounced (host authmailonline.kundenserver.de[212.227.15.164] said: 530 Authentication required (in reply to MAIL FROM command))
Feb 23 18:46:11 MAIL-SRV postfix/cleanup[10900]: 4C3562AF5A: message-id=<20050223174611.4C3562AF5A@MAIL-SRV.IT-NET.de>
Feb 23 18:46:11 MAIL-SRV postfix/qmgr[5216]: 4C3562AF5A: from=<>, size=2513, nrcpt=1 (queue active)
Feb 23 18:46:11 MAIL-SRV postfix/qmgr[5216]: DC4012AF54: removed
Feb 23 18:46:11 MAIL-SRV postfix/pipe[10909]: 4C3562AF5A: to=<test@IT-NET.de>, orig_to=<test@IT.de>, relay=cyrus, delay=0, status=sent (MAIL-SRV.IT-NET.de)
Feb 23 18:46:11 MAIL-SRV postfix/qmgr[5216]: 4C3562AF5A: removed
Feb 23 18:46:59 MAIL-SRV postfix/smtpd[10893]: watchdog_stop: 0x566398
Feb 23 18:46:59 MAIL-SRV postfix/smtpd[10893]: watchdog_start: 0x566398

meine configuration:

alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain, $mydomain, mysql:/etc/postfix/mysql-mydestination.cf
mydomain = IT-NET.de
myhostname = MAIL-SRV.IT-NET.de
mynetworks = 192.168.100.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = $mydestination
relayhost = [auth.mail.onlinehome.de]
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = mysql:/etc/postfix/mysql-canonical.cf
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_always_send_ehlo = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sender_restrictions = hash:/etc/postfix/access
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

Also Leute, ich kann zur Information natürlich alles posten, sagt nur was konkretes. Ich habe vieles ausprobiert, ehrlich gesagt bin verzweifelt...

Gruß, nick
 

dermichel

Advanced Hacker
relayhost = [auth.mail.onlinehome.de]

das muss auch in deine sasl_passwd rein. dort steht aber "smtp.1und1.de" drin! wenn also eine mail richtung auth.mail.onlinehome.de unterwegs ist, findet der keinen passenden eintrag zu diesem relayhost in der sasl_passwd. also wird auch kein passwort gesendet. naja... sollte einem aber sofort auffallen wenn man die logmeldung auswertet. lass deinen server besser managen ;-)
 
OP
I

isnick

Newbie
Hallo dermichel,

wie ich weiß, die authentifizierung kann man über auth.mail.onlinehome.de, smtp.1und1.de oder smtp.1und1.com machen. Das habe ich getestet...

Gruß, nick
 

dermichel

Advanced Hacker
das ist ja schoen - aber dein postfix versucht das stur ueber den auth.mail.onlinehome.de.

schreibs doch einfach mal in die sasl_passwd und probiers aus.
 
OP
I

isnick

Newbie
die Fehlermeldung:
Feb 24 09:35:02 MAIL-SRV postfix/smtpd[5063]: watchdog_stop: 0x566398
Feb 24 09:35:02 MAIL-SRV postfix/smtpd[5063]: watchdog_start: 0x566398
Feb 24 09:35:03 MAIL-SRV postfix/smtp[5074]: 59D7A2AF5B: to=<ntsis@web.de>, relay=authmailonline.kundenserver.de[212.227.15.164], delay=1, status=bounced (host authmailonline.kundenserver.de[212.227.15.164] said: 550 won't deliver to <ntsis@web.de> (in reply to RCPT TO command))
Feb 24 09:35:04 MAIL-SRV postfix/cleanup[5070]: 177FA2AF60: message-id=<20050224083504.177FA2AF60@MAIL-SRV.IT-NET.de>
Feb 24 09:35:04 MAIL-SRV postfix/qmgr[3951]: 177FA2AF60: from=<>, size=2523, nrcpt=1 (queue active)
Feb 24 09:35:04 MAIL-SRV postfix/qmgr[3951]: 59D7A2AF5B: removed
Feb 24 09:35:04 MAIL-SRV postfix/pipe[5079]: 177FA2AF60: to=<test@IT-NET.de>, orig_to=<test@IT.de>, relay=cyrus, delay=0, status=sent (MAIL-SRV.IT-NET.de)
Feb 24 09:35:04 MAIL-SRV postfix/qmgr[3951]: 177FA2AF60: removed
Feb 24 09:36:02 MAIL-SRV postfix/smtpd[5063]: watchdog_stop: 0x566398
Feb 24 09:36:02 MAIL-SRV postfix/smtpd[5063]: watchdog_start: 0x566398
 

dermichel

Advanced Hacker
an der authentifizierung liegt es auch nicht mehr - du darfst ganz einfach nicht ueber das relay senden (error 550) - warum?

nimmt der nur absender der eigenen domaine oder so?
 

pft

Advanced Hacker
auf jeden Fall hat sich ja schon mal die Fehlermeldung verändert (530->550).
Betrachten wir das mal als Fortschritt.

Was genau jetzt noch das Problem ist kann ich im Moment nicht sagen.

Hier zwei Vorschläge:

1. Offensichtlich ist in Deiner Mail der "From" Eintrag leer. Das wird vom Relay u.U. als noch schlimmer als einen Eintrag aus einer fremden Domain bewertet. Also konfigurier doch mal deinen Client so, daß er hier etwas sinnvolles einträgt. Kann durchaus sein das 1und1 hier etwaspingelig ist - macht ja auch Sinn heutzutage. Eine Prüfung auf fremde Domains kann ich mir schwer vorstellen, da man ja nicht auf "1und1.de" prüfen müßte, sondern auf alle von 1und1 im Auftrag der Kunden verwaltete Domains, was eine große und v.a. sehr dynamische Liste ergibt.

2. Ich arbeite eigentlich mit der gleichen Konfiguration und auch mit 1und1. Allerdings ohne Probleme. Ich werde mal versuche dein Problem nachzuvollziehen bzw. zu widerlegen. Das wird aber später heute!
 
Status
Für weitere Antworten geschlossen.
Oben