PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix versendet Mails nicht



turex
08.05.05, 19:04
Hallo,

habe ein Problem mit Postfix.
Postfix will keine Mails versenden.
Es kommt die Meldung "Relay Access".

meine main.cnf:

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no

myorigin = meine-ip.internetserviceteam.com
mydomain = meine-ip.internetserviceteam.com
myhostname = meine-ip.internetserviceteam.com
mydestination = $myhostname, localhost.$mydomain, $mydomain, $transport_maps
mynetworks = 127.0.0.0/8
alias_maps = $alias_database
virtual_mailbox_limit = 20480000
virtual_mailbox_base = /var/kunden/mail/
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
transport_maps = mysql:/etc/postfix/mysql-transport.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual.cf
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
message_size_limit = 20480000


Hab schon im Forum gestöbert hat aber nichts geholfen.

mfg

tschloss
08.05.05, 20:56
Kommt die Meldung "relay access DENIED"?
"Relay Access" ist, wenn Du nicht lokal sondern per SMTP von einer externen IP auf Postfix connectest und Mails an Adressaten auf fremden Domains ablädst - dann arbeitet Postfix quasi als Relay. Und sinnvollerweise ist das i.d.R. restricted.

Überprüfe nochmals die Fehlermeldung. Und/oder probiere mal eine Mail zu versenden a) von einem lokalen Client und b) an einen lokalen Client.

Wenn das die richtige Spur ist, dann gäbe es verschieden Methoden die Beschränkung zu lockern (je nach Situation).
(http://www.postfix.org/SMTPD_ACCESS_README.html)

Greetz
Thomas

turex
09.05.05, 13:19
Hallo,

sry hab mich verschrieben "Relay access denied" ist die Fehlermeldung.
Wenn ich eine E-Mail an einen anderen Server schicken will (bsp: aon.at) kommt diese Fehlermeldung.
Wenn ich aber eine E-Mail an meinen eigenen Server schicke, funktioniert es.

danke
mfg

Tomek
09.05.05, 14:22
Ein Auszug aus dem Maillog wäre interessant.

Hast du dich am SMTP-Server angemeldet? Um Mails verschicken zu können, musst du dich mit deinem Mailclient am SMTP-Server anmelden, und zwar mit den Zugangsdaten, mit denen du dich am POP3/IMAP-Server auch anmeldest.

turex
09.05.05, 14:36
Hallo,

hier ein Teil vom Logfile, der mir wichtig erscheint:


May 9 14:49:08 meine-server-ip postfix/smtpd[2198]: connect from M1349P010.adsl.highway.telekom.at[meineIP]
May 9 14:49:09 meine-server-ip postfix/smtpd[2198]: D1E759324C: client=M1349P010.adsl.highway.telekom.at[meineIP]
May 9 14:49:09 meine-server-ip postfix/smtpd[2198]: reject: RCPT from M1349P010.adsl.highway.telekom.at[meineIP]: 554 <mein.name@aon.at>: Relay access denied; from=<webmaster@meinedomain.at> to=<mein.name@aon.at>
May 9 14:49:15 meine-server-ip postfix/smtpd[2198]: disconnect from M1349P010.adsl.highway.telekom.at[meineIP]
May 9 14:49:15 meine-server-ip courierpop3login: Connection, ip=[::ffff:meineIP]
May 9 14:49:16 meine-server-ip courierpop3login: LOGIN, user=webmaster@meinedomain.at, ip=[::ffff:meineIP]
May 9 14:49:30 meine-server-ip courierpop3login: LOGOUT, user=webmaster@meinedomain.at, ip=[::ffff:meineIP], top=0, retr=645832

nein ich habe mich nicht angemeldet, weil ich dann nicht mal auf meine Server-Mail eine E-Mail senden kann.

danke
mfg

Tomek
09.05.05, 15:45
Ohne sich am Mailserver anzumelden wirst du keine Mails verschicken können. Aktiviere also die SMTP-Authentifizierung am Mailclient und poste dann bitte das Logfile, wenn du versuchst eine Mail zu versenden.

turex
09.05.05, 15:57
hallo,

dann kommt folgendes:


May 9 16:52:06 server-ip postfix/smtpd[3105]: connect from M1349P010.adsl.highway.telekom.at[meineIP]
May 9 16:52:09 server-ip postfix/smtpd[3105]: warning: SASL authentication problem: unrecognized plaintext verifier pam?
May 9 16:52:09 server-ip postfix/smtpd[3105]: warning: M1349P010.adsl.highway.telekom.at[meineIP]: SASL LOGIN authentication failed
May 9 16:52:14 server-ip postfix/smtpd[3105]: disconnect from M1349P010.adsl.highway.telekom.at[meineIP]
May 9 16:52:15 server-ip postfix/smtpd[3105]: connect from M1349P010.adsl.highway.telekom.at[meineIP]
May 9 16:52:18 server-ip postfix/smtpd[3105]: warning: SASL authentication problem: unrecognized plaintext verifier pam?
May 9 16:52:18 server-ip postfix/smtpd[3105]: warning: M1349P010.adsl.highway.telekom.at[meineIP]: SASL LOGIN authentication failed
May 9 16:52:24 server-ip postfix/smtpd[3105]: disconnect from M1349P010.adsl.highway.telekom.at[meineIP]

mfg

tschloss
09.05.05, 19:41
Hallo,

....
Wenn ich aber eine E-Mail an meinen eigenen Server schicke, funktioniert es.

danke
mfg

Meinst DU damit, dass du eine Mail per externem SMTP-Client über dein Postfix an deinen eigenen Server versenden kannst?

Dann bist du entweder angemeldet oder es ist keine Anmeldung erforderlich. Dann hängt es wirklich nur daran, dass das SMTP relaying verboten ist.

Dann wäre es grundsätzlich interessant, wie deine Anforderungen bzgl. Offenheit bzw. Sicherheit sind:
- wenn Du mit Anmeldung arbeiten willst, dann mußt du erst mal dieses Thema in den Griff bekommen und anschließend kannst Du den SMTP-Relay einfach aufmachen (jeder angemeldete User darf alles)
- ohne Anmeldung: dann soltest Dui dir überlegen, ob die Sender oder die Zieladressen irgendwie eingrenzen kannst, sonst hast du ein offenes Mail-Relay (sofern der Server relativ "offen" im Netz hängt).

In beiden Fällen empfehle ich dir, mal in die Postfix Doku zu sehen (z.B. meinem Link oben folgend). Sender, Empfänger, Cients und Relays kann man listengesteuert aufmachen und begrenzen. Das sollte man sich mal durchgelesen haben.
Gut auch: das deutsche Postfix Buch von Kyle Dent bei O´Reilly (ca. 25 Euronen, die sich lohnen).

Greetz
Thomas

Tomek
09.05.05, 19:57
Kannst du bitte den Inhalt der Datei /etc/postfix/sasl/smtpd.conf hier posten?

Und ist das eine SysCP-Installation?

turex
09.05.05, 20:12
hallo,

smtpd.conf:

pwcheck_method: pam
mech_list: plain login
allow_plaintext: true


ja es ist eine SysCP Installation.
Das mit den sasl daten löschen hab ich gelesen.

Bei mir sind im Ordner "/usr/lib" folgende sasl daten:
libsasl.so.7 (is ne verknüpfung zu: libsasl.so.7.1.10)
libsasl.7.1.10

im ordner "/usr/lib/sasl":

meine-ip:/usr/lib/sasl# ls -lisa
insgesamt 52
602701 4 drwxr-xr-x 2 root root 4096 8. Mai 09:38 .
2003454 12 drwxr-xr-x 46 root root 12288 8. Mai 09:47 ..
602712 0 lrwxrwxrwx 1 root root 22 8. Mai 09:38 libanonymo us.so -> libanonymous.so.1.0.16
602711 0 lrwxrwxrwx 1 root root 22 8. Mai 09:38 libanonymo us.so.1 -> libanonymous.so.1.0.16
602706 8 -rw-r--r-- 1 root root 5520 13. Okt 2004 libanonymo us.so.1.0.16
602710 0 lrwxrwxrwx 1 root root 20 8. Mai 09:38 libcrammd5 .so -> libcrammd5.so.1.0.17
602709 0 lrwxrwxrwx 1 root root 20 8. Mai 09:38 libcrammd5 .so.1 -> libcrammd5.so.1.0.17
602705 12 -rw-r--r-- 1 root root 9988 13. Okt 2004 libcrammd5 .so.1.0.17
602744 0 lrwxrwxrwx 1 root root 17 8. Mai 09:38 liblogin.s o -> liblogin.so.0.0.6
602743 0 lrwxrwxrwx 1 root root 17 8. Mai 09:38 liblogin.s o.0 -> liblogin.so.0.0.6
602708 8 -rw-r--r-- 1 root root 7776 13. Okt 2004 liblogin.s o.0.0.6
602734 0 lrwxrwxrwx 1 root root 18 8. Mai 09:38 libplain.s o -> libplain.so.1.0.15
602713 0 lrwxrwxrwx 1 root root 18 8. Mai 09:38 libplain.s o.1 -> libplain.so.1.0.15
602707 8 -rw-r--r-- 1 root root 7428 13. Okt 2004 libplain.s o.1.0.15


mfg

Tomek
10.05.05, 10:01
Deine Konfiguration ist fehlerhaft. Du solltest dir das deutschsprachige HowTo für SysCP [1] durchlesen. Darin wird genau erklärt, wie die Konfiguration für Postfix auszusehen hat.

Links:
[1] http://www.syscp.de/files/documentation/isp-style_server_howto_1_2.pdf

turex
10.05.05, 19:22
Hallo,

also das mit SASL hab ich jetzt mit dem anderen SysCP Howto lösen können.
Jetzt kommt allerdings folgende Fehlermeldung: "Zeitüberschreitung am Server".

maillog:

May 10 20:20:41 serverip postfix/master[18668]: warning: process /usr/lib/postfix/smtpd pid 18877 exit status 127
May 10 20:20:41 serverip postfix/master[18668]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
May 10 20:21:41 serverip postfix/master[18668]: warning: process /usr/lib/postfix/smtpd pid 18884 exit status 127
May 10 20:21:41 serverip postfix/master[18668]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
May 10 20:22:41 serverip postfix/master[18668]: warning: process /usr/lib/postfix/smtpd pid 18891 exit status 127
May 10 20:22:41 serverip postfix/master[18668]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

master.cf:

#
# Postfix master process configuration file. Each line describes how
# a mailer component program should be run. The fields that make up
# each line are described below. A "-" field value requests that a
# default value be used for that field.
#
# Service: any name that is valid for the specified transport type
# (the next field). With INET transports, a service is specified as
# host:port. The host part (and colon) may be omitted. Either host
# or port may be given in symbolic form or in numeric form. Examples
# for the SMTP server: localhost:smtp receives mail via the loopback
# interface only; 10025 receives mail on port 10025.
#
# Transport type: "inet" for Internet sockets, "unix" for UNIX-domain
# sockets, "fifo" for named pipes.
#
# Private: whether or not access is restricted to the mail system.
# Default is private service. Internet (inet) sockets can't be private.
#
# Unprivileged: whether the service runs with root privileges or as
# the owner of the Postfix system (the owner name is controlled by the
# mail_owner configuration variable in the main.cf file).
#
# Chroot: whether or not the service runs chrooted to the mail queue
# directory (pathname is controlled by the queue_directory configuration
# variable in the main.cf file). Presently, all Postfix daemons can run
# chrooted, except for the pipe, virtual and local delivery daemons.
# The files in the examples/chroot-setup subdirectory describe how
# to set up a Postfix chroot environment for your type of machine.
#
# Wakeup time: automatically wake up the named service after the
# specified number of seconds. A ? at the end of the wakeup time
# field requests that wake up events be sent only to services that
# are actually being used. Specify 0 for no wakeup. Presently, only
# the pickup, queue manager and flush daemons need a wakeup timer.
#
# Max procs: the maximum number of processes that may execute this
# service simultaneously. Default is to use a globally configurable
# limit (the default_process_limit configuration parameter in main.cf).
# Specify 0 for no process count limit.
#
# Command + args: the command to be executed. The command name is
# relative to the Postfix program directory (pathname is controlled by
# the program_directory configuration variable). Adding one or more
# -v options turns on verbose logging for that service; adding a -D
# option enables symbolic debugging (see the debugger_command variable
# in the main.cf configuration file). See individual command man pages
# for specific command-line options, if any.
#
# In order to use the "uucp" message tranport below, set up entries
# in the transport table.
#
# In order to use the "cyrus" message transport below, configure it
# in main.cf as the mailbox_transport.
#
# SPECIFY ONLY PROGRAMS THAT ARE WRITTEN TO RUN AS POSTFIX DAEMONS.
# ALL DAEMONS SPECIFIED HERE MUST SPEAK A POSTFIX-INTERNAL PROTOCOL.
#
# DO NOT CHANGE THE ZERO PROCESS LIMIT FOR CLEANUP/BOUNCE/DEFER OR
# POSTFIX WILL BECOME STUCK UP UNDER HEAVY LOAD
#
# DO NOT CHANGE THE ONE PROCESS LIMIT FOR PICKUP/QMGR OR POSTFIX WILL
# DELIVER MAIL MULTIPLE TIMES.
#
# DO NOT SHARE THE POSTFIX QUEUE BETWEEN MULTIPLE POSTFIX INSTANCES.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (50)
# ================================================== ========================
smtp inet n - - - - smtpd
#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 nqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
flush unix n - - 1000? 0 flush
smtp unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# The Cyrus deliver program has changed incompatibly.
#
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -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=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
#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
10.05.05, 21:52
Gibt es noch weitere Meldungen im Maillog davor?

Und poste bitte die Datei /etc/postfix/main.cf.

turex
11.05.05, 16:55
Hallo,

nein nicht wirklich:
maillog:

May 11 17:51:57 serverIP courierpop3login: Connection, ip=[::ffff:meineIP]
May 11 17:51:58 serverIP courierpop3login: LOGIN, user=meine@domain.at, ip=[::ffff:meineIP]
May 11 17:51:59 serverIP courierpop3login: LOGOUT, user=meine@domain.at, ip=[::ffff:meineIP], top=0, retr=0
May 11 17:52:42 serverIP postfix/master[20552]: warning: process /usr/lib/postfix/smtpd pid 27871 exit status 127
May 11 17:52:42 serverIP postfix/master[20552]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
May 11 17:53:42 serverIP postfix/master[20552]: warning: process /usr/lib/postfix/smtpd pid 27875 exit status 127
May 11 17:53:42 serverIP postfix/master[20552]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

die main.cf hab ich bereits am anfang des thread gepostet - ist die gleiche.

mfg

turex
12.05.05, 20:36
Hat keiner ne Idee?