Postfix bringt loops back

Postfix, QMail, Sendmail, Dovecot, Cyrus, Courier, Anti-Spam
emefge
Posts: 4
Joined: 2008-02-05 17:30
 

Postfix bringt loops back

Post by emefge »

Ich brauche wirklich eure Hilfe... ich weiß nicht mehr weiter!

Ich bin jetzt schon seit ca. 2 Monaten am googlen und lesen und konfigurieren aber ich komme nicht weiter.

Folgende Situation:
Ich habe eine feste IP-Adresse für meinen DSL-Anschluss: Nennen wir sie mal 85.x.x.x
Jetzt habe ich einen neuen Rechner mit opensuse 10.3 als web- und mailserver aufgesetzt.
Die DSL!Box (am Switch) leitet alle Anfragen der IP-Adresse 85.x.x.x an die lokale Netzadresse (192.168.0.2) um. Dies war nötig, da die Domains (ca. 60) über Apache2 nicht auf der Adresse 85.x.x.x reagierten.

Soweit funktioneien also alle Seiten.
Ich habe allerdings seit 2 Monaten keine Email mehr erhalten.

Ich habe postfix mit einer mysql-Datenbank verbunden, in der die einzelnen Emailadressen und Domainen stehen.
Dies wurde über ein kleines aber hilfreiches Programm (syscp) realisiert.
116.203.31
postfix erhält nun eine Email für einen dort angegeben Empfänger und stellt fest, dass der MX-Eintrag 85.x.x.x lautet - versucht nun diesen aufzulösen - findet den Provider - folgt dem Eintrag und stellt fest, dass er selbst am anderem Ende der Strippe hängt.

Code: Select all

Feb  1 10:22:16 orange-web postfix/qmgr[3466]: AEB2840DD8: from=<me@domain.tld>, size=545, nrcpt=1 (queue active)
Feb  1 10:22:16 orange-web postfix/smtpd[4137]: connect from x-x-x-85.dsl.provider.net[85.x.x.x]
Feb  1 10:22:16 orange-web postfix/smtp[4136]: warning: host domain.tld[85.x.x.x]:25 greeted me with my own hostname orange-web
Feb  1 10:22:17 orange-web postfix/smtp[4136]: warning: host domain.tld[85.x.x.x]:25 replied to HELO/EHLO with my own hostname orange-web
Feb  1 10:22:17 orange-web postfix/smtp[4136]: AEB2840DD8: to=<me@domain.tld>, relay=domain.tld[85.x.x.x]:25, delay=6442, delays=6442/0.01/0.61/0, dsn=4.4.6, status=SOFTBOUNCE (mail for domain.tld loops back to myself)
Feb  1 10:22:17 orange-web postfix/smtpd[4137]: disconnect from x-x-x-85.dsl.provider.net[85.x.x.x]
Die Email landet dann in der Schleife oder ... aber nie da, wo sie hin soll: in das entsprechende Postfach. Und dem Absender wird mitgeteilt, dass die Email nicht zugestellt werden konnte.

Bitte helft mir.
Danke
aubergine
Posts: 471
Joined: 2005-09-10 17:52
Location: Frankfurt am Main
 

Re: Postfix bringt loops back

Post by aubergine »

Sieht so aus als würde ein transport dem Postfix sagen, dass er nochmal zu sich selbst durchstellen soll.

Poste am besten mal alle Datein in /etc/postfix
User avatar
Joe User
Project Manager
Project Manager
Posts: 11184
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Postfix bringt loops back

Post by Joe User »

Nicht Alle, nur die *.cf :!:
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
emefge
Posts: 4
Joined: 2008-02-05 17:30
 

Re: Postfix bringt loops back

Post by emefge »

Die main.cf:

Code: Select all

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = orange-web
mydomain = orange-europe
mydestination = $myhostname $mydomain localhost localhost.$mydomain
mynetworks = 127.0.0.0/8, 192.168.2.0/24, 85.116.203.0/24
alias_maps = $alias_database
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
virtual_mailbox_base = /var/kunden/mail/
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
setgid_group = maildrop
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
home_mailbox = Maildir
soft_bounce = yes
Die master.cf:

Code: Select all

#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    unix  -       -       n       1000?   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
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
	-o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
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=
scache	  unix	-	-	n	-	1	scache

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
procmail  unix  -       n       n       -       -       pipe
  flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
retry     unix  -       -       n       -       -       error
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
die mysql-virtual_mailbox_maps.cf:

Code: Select all

user = geheim
password = auchgeheim
dbname = mymail
table = mail_users
select_field = maildir
where_field = email
hosts = localhost 
die mysql-virtual_mailbox_domains.cf:

Code: Select all

user = geheim
password = auchgeheim
dbname = mymail
table = mail_virtual
select_field = destination
where_field = email
additional_conditions = and destination <> '' and destination <> ' '
hosts = localhost 
die mysql-virtual_alias_maps.cf:

Code: Select all

user = geheim
password = auchgeheim
dbname = mymail
table = mail_virtual
select_field = destination
where_field = email
additional_conditions = and destination <> '' and destination <> ' '
hosts = localhost
Und vielen Dank für die Unterstützung. Meine Laune verbessert sich.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11184
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Postfix bringt loops back

Post by Joe User »

Verwende mal folgende main.cf und beachte die untenstehenden Punkte. Die anderen Configs sind IMHO OK.

Code: Select all

allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
disable_vrfy_command = yes
home_mailbox = Maildir
masquerade_exceptions = root
mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
mydomain = orange-europe
myhostname = orange-web
mynetworks = 127.0.0.0/8, 192.168.2.0/24, 85.116.203.0/24
myorigin = $mydomain
setgid_group = maildrop
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_client_hostname, permit
smtpd_data_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining, permit
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, permit
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain, permit
soft_bounce = yes
strict_rfc821_envelopes = yes
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_alias_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/kunden/mail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_uid_maps = static:2000
*) mydomain muss der Domain des Mailservers entsprechen.
*) myhostname muss dem FQDN des Mailservers entsprechen.
*) soft_bounce sollte nur temporär während der Debugphase gesetzt werden.
*) virtual_mailbox_domains darf nicht in mydestination enthalten sein.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
emefge
Posts: 4
Joined: 2008-02-05 17:30
 

Re: Postfix bringt loops back

Post by emefge »

Vielen Dank.
Diese main.cf hört sich gut an... sie erzeugt nur leider noch folgenden Fehler:

Code: Select all

fatal: chdir(/usr/libexec/postfix): No such file or directory
Ich werde jetzt mal versuchen herauszufinden, wo dieser ungültige Eintrag zu finden ist.

Zu deinen Anmerkungen:
Sie sind natürlich richtig und auch so im Einsatz. Ich habe nur (aus Verzweiflung und Ratlosigkeit) auch hier Veränderungen vorgenommen gehabt, die da nicht sein sollten und diese wurden schnell wieder entfernt.
Und von dem Debug-Modus habe ich mir ein wenig mehr versprochen. Auch dieser wurde bereits entfernt.


Ich werde auf jeden Fall weiter berichten!

Vielen Dank und bis bald
User avatar
Joe User
Project Manager
Project Manager
Posts: 11184
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Postfix bringt loops back

Post by Joe User »

Dein Postfix ist unüblich kompiliert/installiert, wenn es das offizielle Debian-Paket ist, bitte den Maintainer erschlagen...
Füge folgende Zeilen wieder in die main.cf ein:

Code: Select all

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
queue_directory = /var/spool/postfix
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
emefge
Posts: 4
Joined: 2008-02-05 17:30
 

Re: Postfix bringt loops back

Post by emefge »

Sorry, aber deine Hilfe hat leider keine Veränderung gebracht

Code: Select all

Feb  7 18:52:49 orange-web postfix/smtpd[4213]: connect from unknown[192.168.2.10] <<< mein Laptop
Feb  7 18:52:49 orange-web postfix/smtpd[4213]: 0F5AF40DD4: client=unknown[192.168.2.10]
Feb  7 18:52:49 orange-web postfix/cleanup[4218]: 0F5AF40DD4: message-id=<000601c869b2$29bb6020$0a02a8c0@orangeeurope>
Feb  7 18:52:49 orange-web postfix/qmgr[4074]: 0F5AF40DD4: from=<system@domain2.de>, size=1312, nrcpt=1 (queue active)
Feb  7 18:52:49 orange-web postfix/smtpd[4213]: disconnect from unknown[192.168.2.10]
Feb  7 18:52:49 orange-web postfix/smtp[4219]: 0F5AF40DD4: to=<system@domain1.de>, relay=none, delay=0.21, delays=0.19/0.02/0.01/0, dsn=5.4.6, status=bounced (mail for domain1.de loops back to myself)
Feb  7 18:52:49 orange-web postfix/cleanup[4218]: 54DB040DD6: message-id=<20080207175249.54DB040DD6@orange-web>
Feb  7 18:52:49 orange-web postfix/qmgr[4074]: 54DB040DD6: from=<>, size=3016, nrcpt=1 (queue active)
Feb  7 18:52:49 orange-web postfix/bounce[4220]: 0F5AF40DD4: sender non-delivery notification: 54DB040DD6
Feb  7 18:52:49 orange-web postfix/qmgr[4074]: 0F5AF40DD4: removed
Feb  7 18:52:49 orange-web postfix/smtp[4219]: 54DB040DD6: to=<system@domain2.de>, relay=none, delay=0.09, delays=0.07/0.01/0.01/0, dsn=5.4.6, status=bounced (mail for domain2.de loops back to myself)
Feb  7 18:52:49 orange-web postfix/qmgr[4074]: 54DB040DD6: removed
Vielleicht habe ich auch in den letzten Monaten zu viel eingestellt und probiert. Ich denke, ich werde den ganzen Rechner komplett neu installieren. Wochenlange Arbeit umsonst :-(
Aber ohne Email-Empfang kann ich Apache auch gleich deaktivieren.
Frust

Danke für die Hilfe