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

Postfix empfängt keine Mails

Status
Für weitere Antworten geschlossen.

rigo

Newbie
Hi,

ich habe jetzt endlich meinen neuen Server (SuSE 9.1, Apache2, Postfix, Webmin etc., bei Hetzner) und habe folgendes Problem:

Meine Portalsoftware (Postnuke) kann zwar Emails verschicken (wird auch im mail-Log angezeigt) allerdings verschwinden Emails, die ich an meine Domain schicke. Die Mail kommen nicht zurück und es erscheint auch nichts in den Maillogs, dass etwas unzustellbares angekommen ist. Heute habe ich allerdings einige der folgenden Mails bekommen:
This message was created automatically by mail delivery software (Exim).

A message that you sent has not yet been delivered to one or more of its
recipients after more than 48 hours on the queue on moutng.kundenserver.de.

The message identifier is: 1C0yNl-0005ok-00
The date of the message is: Sat, 28 Aug 2004 10:04:56 +0200
The subject of the message is: dies ist ein test 3

The address to which the message has not yet been delivered is:

test@meinedomain.de

No action is required on your part. Delivery attempts will continue for
some time, and this warning may be repeated at intervals if the message
remains undelivered. Eventually the mail delivery software will give up,
and when that happens, the message will be returned to you.
Dies war eine Mail, die ich über 1und1 an meine neue Domain geschickt habe.

In Webmin habe ich bei Postfix unter "Virtuelle Domänen" folgende Angaben gemacht:
Domains to perform virtual mapping for: meinedomain1.de meinedomain2.com
Name: meindomain1.de
Wird verknüpft mit...: DOMAIN
Name: @meinedomain1.de
Wird verknüpft mit...: meinmail@gmx.de
Ich möchte also quasi ALLE ankommenden Mails an meinen GMX-Account weiterleiten.

Unter Aliases habe ich "info" und "admin" angelegt und unter "Alias to..." jeweils "Address meinemail@gmx.de" angelegt.

Postfix habe ich natürlich neu gestartet und vorher die Alias.db neu erstellt. Was muss ich noch alles machen? Docs habe ich schon gelesen; vielleicht habe ich ja etwas überlesen.

Über Hilfe freue ich mich.

Bis dann
rigo
 

dermichel

Advanced Hacker
webmin ist eine sache fuer sich. poste mal die

"main.cf"
"master.cf"
"/etc/aliases"
"virtual"

mal sehen wo der fehler steckt...
 

LH

Member
Ich würde auch sagen, vergiss Webmin. Damit machst du dir das Leben nur schwerer.

Du brauchst nur einen virtual_maps = hash:/etc/postfix/virtual Eintrag in der main.cf (oder einen anderen Dateinamen für /etc/postfix/virtual, woauch immer du das haben möchtest)

Und in der Datei speicherst du dann die Weiterleitungen:

@meinedomain.de externe@emailadresse.de
@meinedomain2.de externe@emailadresse.de

Diese einzelne Zeile sollte eigentlich genügen.
Wenn du mehrere Domains hast, diese dort eintragen.

Vieleicht brauchst du auch noch mydestination = meinedomain1.de, meinedomain2.de,...

So funktioniert es zumindest bei mir sehr gut :)
 
OP
R

rigo

Newbie
Das habe ich alles genau so. virtual_maps heisst bei mir allerdings virtual_alias_maps. Hab's mal umbenannt, funktioniert trotzdem nicht :(

Anbei mal die Dateien (gekürzt):
main.cf
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
unknown_local_recipient_reject_code = 450
luser_relay = meinemail@gmx.de

debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
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
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
inet_interfaces = 127.0.0.1 ::1
mydestination = $myhostname, localhost.$mydomain, $mydomain, meinedomain1.de, meinedomain2.com
defer_transports =
disable_dns_lookups = no
mailbox_command =
mailbox_transport =
smtpd_sender_restrictions = hash:/etc/postfix/access
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
virtual_alias_domains = meinedomain1.de meinedomain2.com
virtual_alias_maps = hash:/etc/postfix/virtual
myhostname = mail.meinedomain1.de
mydomain = meinedomain1.de
debug_peer_list = meinedomain1.de
myorigin = $mydomain
master.cf
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#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
#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
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
anvil unix - - n - 1 anvil
#localhost:10025 inet n - n - - 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}
virtual
meinedomain2.com DOMAIN
@meinedomain2.com meinemail@gmx.de
meinedomain1.de DOMAIN
@meinedomain1.de meinemail@gmx.de
aliases
postmaster: root
mailer-daemon: postmaster

# amavis
virusalert: root

# General redirections for pseudo accounts in /etc/passwd.
administrator: root
daemon: root
lp: root
news: root
uucp: root
games: root
man: root
at: root
postgres: root
mdom: root
amanda: root
ftp: root
wwwrun: root
squid: root
msql: root
gnats: root
nobody: root
# "bin" used to be in /etc/passwd
bin: root

# Further well-known aliases for dns/news/ftp/mail/fax/web/gnats.
newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
hostmaster: root
mail: postmaster
postman: postmaster
post_office: postmaster
# "abuse" is often used to fight against spam email
abuse: postmaster
spam: postmaster
faxadm: root
faxmaster: root
webmaster: root
gnats-admin: root
mailman: root
mailman-owner: mailman

info: meinemail@gmx.de
admin: meinemail@gmx.de

Bis dann
rigo
 

oc2pus

Ultimate Guru
dermichel schrieb:
webmin ist eine sache fuer sich. poste mal die
"main.cf"
"master.cf"
"/etc/aliases"
"virtual"
mal sehen wo der fehler steckt...

sind diese Daten geheim bei dir ?
Poste doch mal diese Infos und dir kann geholfen werden .....
 

oc2pus

Ultimate Guru
ok, dann schauen wir mal ...

wir senden eine email in deinen Postfix (öffne eine Konsole) und gib ein:
telnet <dein-server> 25
220 <dein-server> ESMTP <= sowas Ähnliches sollte als Ergebnis erscheinen

dann gibst du ein:
helo irgendetwas
mail from: <name>@deinedomain.de
rcpt to: <name>@deinedomain.de
data
Subject: Hello World!
.
quit

in einer zweiten Konsole tail -f /var/log/mail beobachten
in einer dritten Konsole tail -f /var/log/messages beobachten

Das was dann in den logfiles steht gibt Aufschluss warum dein postfix keine emails annimmt, bzw wo sie dann landen ...
 

dermichel

Advanced Hacker
@oc2pus: tach commander!!!

wie gehts? urlaub schon rum? :)


bin grad bei ner firma und stelle von mbox auf cyrus um....

bis nachher...
 
OP
R

rigo

Newbie
Hi oc2pus,

vielen Dank für deine Hilfe. Also

oc2pus schrieb:
telnet <dein-server> 25
220 <dein-server> ESMTP <= sowas Ähnliches sollte als Ergebnis erscheinen
Und hier hängt's schon.
Verbindungsaufbau zu meinedomain1.de...Es konnte keine Verbindung mit dem Host hergestellt werden, auf Port 25: Verbinden fehlgeschlagen

"nmap -v localhost" auf auf meinem Server gibt u.a.:
Wie geht's weiter?

Bis dann
rigo
 
OP
R

rigo

Newbie
"netstat -lntp" auf meinem Server ergibt:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 1294/perl
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1375/xinetd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 19546/master
tcp 0 0 :::80 :::* LISTEN 2146/httpd2-prefork
tcp 0 0 :::22 :::* LISTEN 1499/sshd
tcp 0 0 ::1:25 :::* LISTEN 19546/master

Bis dann
rigo
 

oc2pus

Ultimate Guru
dann trag in inet_interfaces zusätzlich deine extern sichtbare ip ein...

und/oder probier den telnet test mit telnet localhost 25 ;)
 
OP
R

rigo

Newbie
Aha, telnet localhost 25 funktioniert.
220 mail.meinedomain1.de ESMTP Postfix
In inet_interfaces steht jetzt 123.45.67.89 127.0.0.1::1.
Und siehe da, es tut sich schon mal etwas.
Eine Mail kommt zurück mit folgendem Text:
This is the Postfix program at host mail.meinedomain1.de.

I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

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 message returned below.

The Postfix program

<meinemail@gmx.de>: host mx0.gmx.de[213.165.64.100] said: 553 5.7.1 {mx010} The
recipient does not accept mails from 'gmx.de' over foreign mailservers (in
reply to RCPT TO command)
Es ist jetzt ja schon mal schön, dass Postfix sich überhaupt dazu mal äußert ;)

AHA. Jetzt kommen Mails an. Und zwar an die Benutzer, die ich unter Aliases angelegt habe. Alle anderen kommen zurück.
[EDIT]<= Stimmt übrigens nicht. Ich habe gerade einen neuen Alias angelegt, postalias /etc/aliases ausgeführt und Postfix neu gestartet. Die Mail an den neuen Alias kommt zurück.

Naja, fast genau so habe ich mir das vorgestellt.

Vielen, vielen Dank für eure Hilfe!!!
Besonderen Dank an oc2pus!!

[EDIT] Wie funktioniert denn jetzt ein Catch-all?

Bis dann
rigo
 
Status
Für weitere Antworten geschlossen.
Oben