Problem mit Postfix u.a

Postfix, QMail, Sendmail, Dovecot, Cyrus, Courier, Anti-Spam
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Problem mit Postfix u.a

Post by fireandrescue »

Hallo,

ich habe nach diesen Howto http://debianhowto.de/doku.php/de:howto ... irenschutz

Postfix u.a Installiert. Nu hänge ich beim Test telnet servername 25 fest.
Bei ehlo servername kommt
250-mailtest
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250-AUTH=LOGIN PLAIN DIGEST-MD5 CRAM-MD5 250 8BIT
bei mail from: <meinemailadresse> kommt nix es tut sich nix.
Nu habe ich folgende Einträge:

Code: Select all

Dec 18 23:09:02 ks32964 postfix/trivial-rewrite[20797]: warning: connect to mysql server 127.0.0.1: #HY000Host 'localhost.localdomain' is not allowed to connect to this MySQL server
Dec 18 23:09:02 ks32964 postfix/trivial-rewrite[20797]: fatal: mysql:/etc/postfix/mysql-virtual_forwardings.cf(0,100): table lookup problem
Dec 18 23:09:03 ks32964 postfix/smtpd[6858]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Dec 18 23:09:03 ks32964 postfix/smtpd[6858]: warning: problem talking to service rewrite: Success
Dec 18 23:09:03 ks32964 postfix/smtpd[2847]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Dec 18 23:09:03 ks32964 postfix/smtpd[2847]: warning: problem talking to service rewrite: Connection reset by peer
Dec 18 23:09:03 ks32964 postfix/master[10712]: warning: process /usr/lib/postfix/trivial-rewrite pid 20797 exit status 1
Dec 18 23:09:03 ks32964 postfix/master[10712]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Mir ist bekannt das da was nicht Stimmt ich weiß nur nicht was. Hier mal meine main.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

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

myhostname = XXXXXXXX.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = XXXXXXX.com, XXXXXXX.com, , localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
Ich hoffe das Ihr ein Tipp für mich habt, ich bin zur zeit mit meinem Latein am Boden. Die Diensta laufen alle.

Gruß
Fireand...
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Problem mit Postfix u.a

Post by Roger Wilco »

Dein Postfix hat Probleme mit der Datenbankverbindung, siehe erster Eintrag in deinen Logs. Überprüfe die Zugangsdaten und versuche ggf. die Queries mal von Hand auszuführen.
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Re: Problem mit Postfix u.a

Post by fireandrescue »

Hallo Roger,

Die Verbindungsdaten sind Korregt und kann mich so über pma einloggen.
die Queries mal von Hand auszuführen.
Sorry bin etwas neben der Spur wie meinst du es genau ? bzw welche Queries ?

Gruß
Firean...
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
 

Re: Problem mit Postfix u.a

Post by rootsvr »

Typischer Fall von Copy/Paste Unwissen?

mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf

z.B. die Datein anschauen und prüfen ob du mit den Queries/Usernamen etc. auf die Datenbank kommst.
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Re: Problem mit Postfix u.a

Post by fireandrescue »

Hallo Rootsrv
Typischer Fall von Copy/Paste Unwissen?
neee die Texte habe ich schon gelesen so ist es nicht.
mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
Die Daten die in der Datei sind, sind Korrekt, sprich ich kann mich damit einloggen und die DB, Spalten etc sind auch vorhanden.
jetze habe ich nur noch dieses in der Log stehen.
Dec 19 03:17:13 ks32964 postfix/trivial-rewrite[1916]: fatal: mysql:/etc/postfix/mysql-virtual_forwardings.cf(0,100): table lookup problem
Dec 19 03:17:21 ks32964 postfix/smtpd[6858]: fatal: watchdog timeout
Dec 19 03:18:14 ks32964 postfix/trivial-rewrite[5492]: fatal: mysql:/etc/postfix/mysql-virtual_forwardings.cf(0,100): table lookup problem
Gruß
Fireandrescue
taurin
Posts: 44
Joined: 2003-11-30 23:41
 

Re: Problem mit Postfix u.a

Post by taurin »

Was sagt denn Dein MySQL-Log? Der fehlgeschlagene Anmeldeversuch von Postfix sollte ab einem gewissen Debug-Level ja auftauchen. Das dürfte das Problem lösen.

Ich hatte mal den dummen Effekt auf einer Mandriva Installation, dass der Zugriff auf MySQL von Postfix über 127.0.0.1 nicht möglich war. Erst nachdem ich "skip-networking" aus der my.cnf rausgenommen und die Zugriffe auf die IP von eth0 umkonfiguriert habe, hat es funktioniert. Hab tagelang versucht das mit 127.0.0.1 hinzubekommen, hat aber warum auch immer nicht geklappt.
Vielleicht hast Du ein ähnliches Problem?
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Re: Problem mit Postfix u.a

Post by fireandrescue »

Was sagt denn Dein MySQL-Log? Der fehlgeschlagene Anmeldeversuch von Postfix sollte ab einem gewissen Debug-Level ja auftauchen.
Die Mysql Log ist leer wie die Wüste ;)
in der Log von Postfix bleib es das gleiche.

in der Conf von mysql ist "skip-networking" erst garnicht drinne.
und die Zugriffe auf die IP von eth0 umkonfiguriert habe, hat es funktioniert.
in welcher Datei kann ich dies ändern ? hosts?

Gruß
Dennis
taurin
Posts: 44
Joined: 2003-11-30 23:41
 

Re: Problem mit Postfix u.a

Post by taurin »

fireandrescue wrote:
Was sagt denn Dein MySQL-Log? Der fehlgeschlagene Anmeldeversuch von Postfix sollte ab einem gewissen Debug-Level ja auftauchen.
Die Mysql Log ist leer wie die Wüste ;)
Dann schraub am debug level?!
fireandrescue wrote:
und die Zugriffe auf die IP von eth0 umkonfiguriert habe, hat es funktioniert.
in welcher Datei kann ich dies ändern ? hosts?
In Deiner mysql-virtual_forwardings.cf. Da steht sowas in der Art drin

Code: Select all

#
# mysql config file for alias lookups on postfix
# comments are ok.
#

# the user name and password to log into the mysql server
hosts = 192.168.0.1
user = dein_benutzer
password = dein_pass

# the database name on the servers
dbname = mail

# the table name
table = virtual

#
select_field = dest
where_field = alias
additional_conditions = and status = '1'
Und bei Hosts kannst Du ja mal versuchshalber die IP der eth0 des betreffenden Rechners eintragen, im Beispiel 192.168.0.1
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Re: Problem mit Postfix u.a

Post by fireandrescue »

Dec 19 12:39:17 ks32964 postfix/trivial-rewrite[21689]: warning: connect to mysql server 213.251.164.75: Can't connect to MySQL server on '213.251.164.75' (111)
Dec 19 12:39:17 ks32964 postfix/trivial-rewrite[21689]: fatal: mysql:/etc/postfix/mysql-virtual_forwardings.cf(0,100): table lookup problem
Dec 19 12:39:18 ks32964 postfix/smtpd[15460]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Dec 19 12:39:18 ks32964 postfix/smtpd[15460]: warning: problem talking to service rewrite: Success
Dec 19 12:39:18 ks32964 postfix/smtpd[6579]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Dec 19 12:39:18 ks32964 postfix/smtpd[6579]: warning: problem talking to service rewrite: Connection reset by peer
Dec 19 12:39:18 ks32964 postfix/master[12810]: warning: process /usr/lib/postfix/trivial-rewrite pid 21689 exit status 1
Dec 19 12:39:18 ks32964 postfix/master[12810]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
So wie man sehen kann in der syslog kann keine Verbindung zum Mysql Server aufgebaut werden. Die Mysql Log bleibt weiterhin leer.

meine hosts sieht so aus:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
213.251.XXX.XX XXXXX.XXXXXX.com
# The following lines are desirable for IPv6 capable hosts
#(added automatically by netbase upgrade)
::1 ip6-localhost ip6-loopback
feo0::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Beim Ersten eintrag habe ich mal die IP abgeändert in die Server IP jedoch ohne erfolg.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Problem mit Postfix u.a

Post by Roger Wilco »

Schönes Rumgerate hier...

Trag in deiner Postfix-Konfiguration bei hosts "localhost" ein. Und stell sicher, dass der Benutzer/Host auf die Datenbank zugreifen darf. Das kann er nämlich laut Logs im ersten Beitrag nicht ("Host 'localhost.localdomain' is not allowed to connect to this MySQL server").
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Re: Problem mit Postfix u.a

Post by fireandrescue »

ich Frage leiber nochmal nach.

@wilco

du meinst die main.cf wenn ja wo ? habe mehrere in der main wo host bei ist.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Problem mit Postfix u.a

Post by Roger Wilco »

fireandrescue wrote:du meinst die main.cf wenn ja wo ? habe mehrere in der main wo host bei ist.
Ich meine alle Konfigurationsdateien von Postfix, in denen du die Zugangsdaten für MySQL eingetragen hast. Dürfte /etc/postfix/mysql*.cf sein.
sledge0303
Posts: 695
Joined: 2005-09-16 00:06
Location: Berlin-Reinickendorf
 

Re: Problem mit Postfix u.a

Post by sledge0303 »

Wenn du Postfix unter Debian zu laufen hast, denke dran dass das Teil im chroot läuft. Am besten ist es, du läßt Postfix via TCP/IP auf die Datenbank zugreifen.
fireandrescue
Posts: 17
Joined: 2006-12-18 23:11
 

Re: Problem mit Postfix u.a

Post by fireandrescue »

@Roger, habe ich gemacht jetze

Also dies habe ich gemacht aber ohne erfolg.

@sledge0303 wie meinst du es genau ?

Local bei mir @home lief es ja soweit, daher verstehe iche s nicht warum es hier nicht geht.