PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix - Bekomme das empfangen von eMails nicht hin



abalorio
01.11.07, 09:04
Hi, ich hab vor ein paar Tagen postfix mit sasl installiert. Das versenden von eMails klappt mittlerweile wunderbar mit folgender Konfiguration:



alias_maps = hash:/etc/aliases
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
debug_peer_list = testdomain.de, testdomain2.de, testdomain3.de, 127.0.0.1, 82.xx.xx.xx
defer_transports =
disable_dns_lookups = no
inet_interfaces = all
local_recipient_maps =
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = testdomain.de, testdomain2.de, testdomain3.de
masquerade_exceptions = root
message_size_limit = 104857600
mydestination = $myhostname, localhost.$mydomain, 82.xx.xx.xx
myhostname = ns1.servername.de
mynetworks = 82.xx.xx.xx, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_banner = Postfix-Server
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport


Leider bekomme ich es nicht hin, dass postfix auch eMails annimmt und in ein Postfach speichert was wiederum abgerufen werden kann. Was muss ich tun? Hab diverse Hinweise im Internet gefunden aber wenn ich diese Konfiguration einbaue, funktioniert der Postausgang nicht mehr - bin langsam ratlos und überlege wieder auf sendmail zu setzen. Sendmail hatte ich bisher im Einsatz und ich finde... DAS ist wesentlich leicher :-(.

Danke für JEDE Hilfe!!

himbeere
01.11.07, 09:12
Was sagt das LogFile?

bla!zilla
01.11.07, 10:35
Bitte poste die Fehlermeldungen. Zu finden unter /var/log/mail, /var/log/mail.info und / oder /var/log/mail.error.

abalorio
01.11.07, 14:17
In der mail.err steht:


Oct 31 20:23:04 ns3 postfix/trivial-rewrite[4276]: fatal: open database /etc/postfix/transport.db: Invalid argument

??

mail.warn ist leer, mail.info



...
Oct 31 20:20:28 ns3 postfix/postfix-script: refreshing the Postfix mail system
Oct 31 20:20:28 ns3 postfix/master[3471]: reload configuration /etc/postfix
Oct 31 20:20:33 ns3 postfix/smtpd[4103]: connect from xx.customers.online.com[70.187.112.172]
Oct 31 20:21:02 ns3 postfix/master[3471]: terminating on signal 15
Oct 31 20:21:02 ns3 postfix/postfix-script: starting the Postfix mail system
Oct 31 20:21:02 ns3 postfix/master[4181]: daemon started -- version 2.2.9, configuration /etc/postfix
Oct 31 20:21:02 ns3 postfix/qmgr[4190]: ED0AB10107A0: from=<user@domain.de>, size=113766, nrcpt=1 (queue active
)
Oct 31 20:21:06 ns3 postfix/smtpd[4201]: connect from xx.customers.online.com[70.187.112.172]
Oct 31 20:22:21 ns3 postfix/postfix-script: refreshing the Postfix mail system
Oct 31 20:22:21 ns3 postfix/master[4181]: reload configuration /etc/postfix
Oct 31 20:22:26 ns3 postfix/smtpd[4241]: connect from xx.customers.online.com[70.187.112.172]
Oct 31 20:24:03 ns3 postfix/master[4181]: terminating on signal 15
Oct 31 20:24:04 ns3 postfix/postfix-script: starting the Postfix mail system
Oct 31 20:24:04 ns3 postfix/master[4370]: daemon started -- version 2.2.9, configuration /etc/postfix
Oct 31 20:24:04 ns3 postfix/qmgr[4383]: ED0AB10107A0: from=<user@domain.de>, size=113766, nrcpt=1 (queue active
)
Oct 31 20:24:34 ns3 postfix/smtp[4394]: connect to deutsche-domain.de[70.8.177.26]: Connection timed out (port 25)
Oct 31 20:24:34 ns3 postfix/smtp[4394]: ED0AB10107A0: to=<user@deutsche-domain.de>, relay=none, delay=19763, status=deferred
(connect to deutsch-domain.de[70.8.177.26]: Connection timed out)
Oct 31 20:25:15 ns3 postfix/master[4370]: terminating on signal 15
Oct 31 20:25:16 ns3 postfix/postfix-script: starting the Postfix mail system
Oct 31 20:25:16 ns3 postfix/master[4538]: daemon started -- version 2.2.9, configuration /etc/postfix
Oct 31 20:25:17 ns3 postfix/qmgr[4547]: ED0AB10107A0: from=<user@domain.de>, size=113766, nrcpt=1 (queue active
)
Oct 31 20:25:20 ns3 postfix/smtpd[4559]: connect from xx.customers.online.com[70.187.112.172]
Oct 31 20:25:21 ns3 postfix/smtpd[4559]: 3ADA510107A9: client=xx.customers.online.com[70.187.112.172], sasl_method=PL
AIN, sasl_username=web-team
Oct 31 20:25:22 ns3 postfix/smtpd[4559]: 742C710107A9: client=xx.customers.online.com[70.187.112.172], sasl_method=PL
AIN, sasl_username=web-team
Oct 31 20:25:23 ns3 postfix/cleanup[4561]: 742C710107A9: message-id=<4728E596.7090802@domain.de>
Oct 31 20:25:23 ns3 postfix/qmgr[4547]: 742C710107A9: from=<user@domain.de>, size=1003, nrcpt=1 (queue active)
Oct 31 20:25:23 ns3 postfix/smtp[4562]: 742C710107A9: to=<user@domain.de>, relay=ns10.domain.de[70.165.44.65], delay=1, status=sent
(250 2.0.0 l9VKTeoR022021 Message accepted for delivery)
Oct 31 20:25:23 ns3 postfix/qmgr[4547]: 742C710107A9: removed
Oct 31 20:25:23 ns3 postfix/smtpd[4559]: disconnect from xx.customers.online.com[70.187.112.172]
Oct 31 20:25:47 ns3 postfix/smtp[4558]: connect to deutsche-domain.de[70.8.177.26]: Connection timed out (port 25)
Oct 31 20:25:47 ns3 postfix/smtp[4558]: ED0AB10107A0: to=<user@deutsche-domain.de>, relay=none, delay=19836, status=deferred
(connect to deutsche-domain.de[70.8.177.26]: Connection timed out)
Oct 31 20:26:35 ns3 postfix/master[4538]: terminating on signal 15
Oct 31 20:26:38 ns3 postfix/postfix-script: starting the Postfix mail system
Oct 31 20:26:38 ns3 postfix/master[4664]: daemon started -- version 2.2.9, configuration /etc/postfix
...

Ich hab im Moment aber auch keinen User/eMail-Adresse mehr angelegt, weil das immer zur Folge hatte, dass ich keine eMails mehr verschicken konnte. Hat jemand eine Idee wie ich das machen muss, dass der Server auch eMails annimmt und diese in ein Postfach schiebt? DANKE!!!

bla!zilla
01.11.07, 14:39
Verschicke deine Mails über ein Mailrelay bei deinem ISP. Du wirst kaum eine Mail abgesetzt bekommen, wenn du direkt auslieferst. Zumindest dann, wenn du versucht Mails per SMTP Verbindung mit einer dynamischen IP zu verschicken. Sollte es sich um einen Root-Server handelt, bitte mehr Infos.

abalorio
02.11.07, 00:34
Das versenden von eMails funktioniert doch prima mit der Konfiguration. Ich kann bloß keine auf dem System empfangen!!! Die Mail-Konfiguration mit sendmail ist ja kein Problem "virutalusertable - Anlage von *eMail@domain.de user* fertig. Aber bei postfix bekomme ich es nicht hin. Ja, es ist ein root-Server (suse linux 10.1) und welche Informationen möchtest du haben?

zyrusthc
02.11.07, 00:53
Ein Rootserver, und man muss dich auf Logs hinweisen und Du fragst noch welche Infos?
Lass lieber die Finger von Postfix wenn Du davon nichts verstehst, und nimm lieber sendmail wenn Du damit wie geschrieben "kein Problem" hast!

AhJa... http://www.root-und-kein-plan.ath.cx


Greeez Oli

abalorio
02.11.07, 09:49
Ein Rootserver, und man muss dich auf Logs hinweisen und Du fragst noch welche Infos?
Lass lieber die Finger von Postfix wenn Du davon nichts verstehst, und nimm lieber sendmail wenn Du damit wie geschrieben "kein Problem" hast!

AhJa... http://www.root-und-kein-plan.ath.cx


Greeez Oli


Also so einen hilfreichen Beitrag habe ich schon lange nicht mehr gelesen. Wo steht, dass mich jemand auf meine Logs hinweisen musste? Mein Problem ist doch ein ANDERES? Richtig, bisher hab ich mit Postfix keine Erfahrungen, weil ich immer sendmail im Einsatz hatte. UND genau DESHALB bin ich hier, weil ich auf Hilfe mit dem Umgang eines neuen Programms hoffe um selbst zu lernen. Ist eigentlich der SINN von einem Forum, oder?

Nur, weil ich bisher sendmail eingesetzt hatte bedeutet das doch nicht, dass ich ewig bei diesem Programm bleiben muss, wenn es offensichtlich ein sicheres/besseres gibt.

Schönen Tag noch ;-)

zyrusthc
02.11.07, 16:31
Wo steht, dass mich jemand auf meine Logs hinweisen musste?
Hmm warum existieren dann #2 (http://www.linuxforen.de/forums/showpost.php?p=1587878&postcount=2) und #3 (http://www.linuxforen.de/forums/showpost.php?p=1587894&postcount=3)?

Richtig, bisher hab ich mit Postfix keine Erfahrungen, weil ich immer sendmail im Einsatz hatte.
Seid wann dient ein Rootserver als Sandkasten?


Zum eigentlichen Problem:

mydestination = $myhostname, localhost.$mydomain, 82.xx.xx.xx
kannst Du mal in

mydestination = $myhostname, localhost.$mydomain, 82.xx.xx.xx, testdomain.de, testdomain2.de, testdomain3.de
abändern.
Danach erneut mal eine Mail an eine der 3 Domains absetzen und den Bounce (http://de.wikipedia.org/wiki/Bounce_Message) dazu hier posten.
Desweiteren hast Du das ganze mal am Relay selbst mittels telnet getestet?


Greeez Oli

abalorio
03.11.07, 11:59
So, dass empfangen von eMails habe ich gestern hinbekommen. Letztendlich lag es an der davorgeschalteten Cisco-Firewall :-(. Nun habe ich aber folgendes Problem: Ich bekomme die Umstellung auf "maildir" nicht hin und so wie ich das sehe ist die Konfig korrekt. Wo ist der Fehler? Kann da jemand helfen?

postconf -n sagt:


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
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
debug_peer_list = 127.0.0.1, 82.xx.xx.xx
defer_transports =
disable_dns_lookups = no
home_mailbox = Maildir/
inet_interfaces = all
local_recipient_maps =
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = domain.de
masquerade_exceptions = root
message_size_limit = 104857600
mydestination = $myhostname, localhost.$mydomain, domain.de
myhostname = servername.de
mynetworks = 82.xx.xx.xx, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_banner = PostfixServer
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 450

' home_mailbox = Maildir/ ' ist also gesetzt aber postfix speichert alle eingehenden eMails in /var/spool/mail/user-post-datei .

Danke für jede Info!

zyrusthc
03.11.07, 13:15
Steht vielleicht in den Logs was dazu?


Greeez Oli

abalorio
03.11.07, 14:20
Nein, überhaupt nichts. Kann es an der Zusammenarbeit mit Spamassassin und procmail liegen?

In den Logs von procmail steht:


From user@domain.de Sat Nov 3 14:16:34 2007
Subject: test
Folder: /var/spool/mail/system-user 1474


In home-Verzeichnis des Users liegt .procmailrc mit folgendem Inhalt:


DROPPRIVS=yes
LOGFILE=/var/log/procmail.log
#VERBOSE=ON
SHELL=/bin/sh

:0fw
* < 256000
| spamassassin

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
/dev/null

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0:
* ^X-Spam-Status: Yes
/home/system-user/spam

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0 H
* ! ^From[ ]
* ^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "

:0 fhw
| sed -e 's/^rom /From /'
}

abalorio
04.11.07, 14:53
Jip, meine Vermutung war korrekt. Einfach in procmail folgendes setzen:


MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR

und es klappt auch mit Maildir ;-).