PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : (Interner) Mailserver Relay Probleme



postceck
29.08.08, 11:26
Hallo,

Mailsystem (Aufbau)

[Client]-->[Mailserver Postfix,Intern]-->[Mailserver Postfix, Extern]-->[Zielserver]-->[Client]

- Zustellung von E-Mails für Accounts die auf dem Externen Server liegen funktioniert

- Die abholung der Mails vom Externen Server wurde über Fetchmail Realiesiert und funktioniert ohne schwierigkeiten

Problem:

- Die Zustellung zum Zielserver wird vom Externen Mailserver verweigert der Client erhält folgenden Fehler


This is the mail system at host XXXX.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can delete your own text from the attached returned message.

The mail system

<abc@googlemail.com>: host mail.server.de[8X.XXX.XXX.X6] said:
554 5.7.1 <abc@googlemail.com>: Relay access denied (in reply to RCPT
TO command)


in der Logdatei (Externer Server)schaut das folgendermasen aus:


Aug 29 10:17:22 pXXX postfix/smtpd[7778]: connect from xxxxxxxxxxx.dip0.t-ipconnect.de[8X.XXX.XX.X3]
Aug 29 10:17:22 pXXX postfix/smtpd[7778]: NOQUEUE: reject: RCPT from xxxxxxxxxxx.dip0.t-ipconnect.de[8X.XXX.XX.X3]: 554 5.7.1 <abc@googlemail.com>: Relay access denied; from=<test@mail.de> to=<abc@googlemail.com> proto=ESMTP helo=<XXXX>
Aug 29 10:17:22 pXXX postfix/smtpd[7778]: disconnect from xxxxxxxxxxx.dip0.t-ipconnect.de[8X.XXX.XX.X3]


Danke für eure Zeit :-)

postceck
29.08.08, 11:39
Sry hab leider doppelt gepostet könnte man den anderen Beitrg löschen?

postceck
29.08.08, 11:54
Noch ein paar weiter infos

/etc/postfix/transport

mail.de smtp:[8X.XXX.XXX.X6]
.mail.de smtp:[8X.XXX.XXX.X6]

/etc/postfix/main.cf

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


# 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 = /etc/mailname

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

# 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 = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_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.

myhostname = XXXX
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain
relayhost = mail.de
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
message_size_limit = 102400000
transport_maps = hash:/etc/postfix/transport
virtual_maps = hash:/etc/postfix/virtualUsers, hash:/etc/postfix/localDomains


/etc/postfix/virtualUseres

test@mail.de webXXX

/etc/postfix/localDomains

mail.de postfix

/etc/postfix/master.cf

#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#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
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - 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}

postceck
29.08.08, 12:23
Ok nun habe ich folgendes gefunden


Enabling SASL authentication in the Postfix SMTP client
Turn on client-side SASL authentication, and specify a table with per-host or per-destination username and password information. The Postfix SMTP client first searches the table for an entry with the remote SMTP server hostname; if no entry is found, then the Postfix SMTP client searches the table for an entry with the next-hop destination. Usually, that is the right-hand part of an email address, but it can also be the information that is specified with the relayhost parameter or with a transport(5) table.

/etc/postfix/main.cf:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
relayhost = [mail.myisp.net]
# Alternative form:
# relayhost = [mail.myisp.net]:submission

/etc/postfix/sasl_passwd:
[mail.myisp.net] username:password
[mail.myisp.net]:submission username:password


nur wie weise ich jetzt z.B. Benutzer1 mit der email test@mail.de
und Benutzer2 mit email test2@mail.de einen anderen Login & Passwort zu?

postceck
29.08.08, 12:38
Keiner eine Idee :(

hessijens
29.08.08, 13:31
nur wie weise ich jetzt z.B. Benutzer1 mit der email test@mail.de
und Benutzer2 mit email test2@mail.de einen anderen Login & Passwort zu?

Gar nicht, es reicht wenn Du Dich mit einem x-beliebigen Nutzer am Mailserver des ISP authorisierte. Dann wird auch die Email eines anderen Benutzers angenommen (Zuminest bei Strato, 1und1 und wahrscheinlich auch bei t-ipconnect.de). Wenn Du aber unbedingt jeden User einzel authoriesieren und einpflegen möchtest, solltest Du vielleicht mal ein Blick ins Postfix Handbuch werden, da findest Du ein Beispiel http://www.postfix.org/SASL_README.html.

Noch eine Warnung: Achte bitte darauf, dass Dein Postfix kein "open Relay" ist und auch Emails aus dem Netz einfach so auf deinen ISP Mailserver weiterleitet. (z.B.: mittels smtpd_sasl_auth_enable=yes, wo wir grade bei sasl_auth sind oder aber wesentlich einfach nur interne Emails für Mailverand zulassen) Vielleicht solltest Du Dir mal http://chains.ch/docs/postfix-UCE-HOWTO-de.html
ansehen?

postceck
29.08.08, 14:25
Gar nicht, es reicht wenn Du Dich mit einem x-beliebigen Nutzer am Mailserver des ISP authorisierte. Dann wird auch die Email eines anderen Benutzers angenommen (Zuminest bei Strato, 1und1 und wahrscheinlich auch bei t-ipconnect.de). Wenn Du aber unbedingt jeden User einzel authoriesieren und einpflegen möchtest, solltest Du vielleicht mal ein Blick ins Postfix Handbuch werden, da findest Du ein Beispiel http://www.postfix.org/SASL_README.html.

Noch eine Warnung: Achte bitte darauf, dass Dein Postfix kein "open Relay" ist und auch Emails aus dem Netz einfach so auf deinen ISP Mailserver weiterleitet. (z.B.: mittels smtpd_sasl_auth_enable=yes, wo wir grade bei sasl_auth sind oder aber wesentlich einfach nur interne Emails für Mailverand zulassen) Vielleicht solltest Du Dir mal http://chains.ch/docs/postfix-UCE-HOWTO-de.html
ansehen?

Auf dem Externen Server giebt es nicht nur einen Account (wird über Confixx verwaltet) etwa so:

test@mail.de ->web1p1
test2@mail.de ->web1p2 (anderes Passwort anderer Benutzername)

wenn jetzt web1p2 eine Mail mit der Alias test2@mail.de und den Nutzerdaten von web1p1 (test@mail.de) senden möchte bekomm ich doch nenn Fehler oder?

Roger Wilco
29.08.08, 18:04
wenn jetzt web1p2 eine Mail mit der Alias test2@mail.de und den Nutzerdaten von web1p1 (test@mail.de) senden möchte bekomm ich doch nenn Fehler oder?
Nein, bei deiner aktuellen Konfiguration nicht.

http://www.postfix.org/postconf.5.html#reject_authenticated_sender_login_ mismatch
http://www.postfix.org/postconf.5.html#reject_sender_login_mismatch

postceck
29.08.08, 18:12
Nein, bei deiner aktuellen Konfiguration nicht.

http://www.postfix.org/postconf.5.html#reject_authenticated_sender_login_ mismatch
http://www.postfix.org/postconf.5.html#reject_sender_login_mismatch

Das hängt doch aber von meiner Config auf dem Externen Server ab..

Roger Wilco
29.08.08, 18:18
Ah, überlesen. Dachte das wäre die Konfiguration des externen Servers.

Du benötigst absenderspezifische Zugangsdaten für den Relayhost, sehe ich das richtig? -> http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps

postceck
29.08.08, 20:01
Ah, überlesen. Dachte das wäre die Konfiguration des externen Servers.

Du benötigst absenderspezifische Zugangsdaten für den Relayhost, sehe ich das richtig? -> http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps

Genau

Ich sag schon ma danke werds gleich am Montag probieren aber jetzt ist erst ma WE :)