Postfix: Mails werden nicht lokal abgelegt

Hi, ich setze gerade meinen Mailserver neu auf. Er hat mir jetzt locker 3 Jahre gedient ohne, dass ich irgendwas machen musste und demnach habe ich auch keine Ahnung mehr wie ich das damals gemacht habe ... Ich folge jetzt also dem Tutorial von Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Wheezy) | HowtoForge - Linux Howtos and Tutorials

Soweit lieft es ganz gut durch, aber auf Seite 3 unten soll ich mit mailx eine Testmail senden damit die Mailbox angelegt wird.

Code:
root@mail:~# mailx <user>@<domain>
Subject: asdasd
asdas
EOT
root@mail:~#

Jetzt sollte eingentlich in /home/vmail etwas passiert sein, aber

Code:
root@mail:~# 
root@mail:~# find /home/vmail/
/home/vmail/
/home/vmail/.bashrc
/home/vmail/.profile
/home/vmail/.bash_logout
root@mail:~#

Meanwhile in /var/log/mail.log:

Code:
root@mail:~# Oct 24 07:07:47 mail postfix/pickup[3787]: E5E21BFE00: uid=0 from=<root>
Oct 24 07:07:47 mail postfix/pickup[3787]: E5E21BFE00: uid=0 from=<root>
Oct 24 07:07:47 mail postfix/cleanup[3806]: E5E21BFE00: message-id=<20131024110747.E5E21BFE00@mail.domain>
Oct 24 07:07:47 mail postfix/cleanup[3806]: E5E21BFE00: message-id=<20131024110747.E5E21BFE00@mail.domain>
Oct 24 07:07:47 mail postfix/qmgr[3788]: E5E21BFE00: from=<root@domain>, size=443, nrcpt=1 (queue active)
Oct 24 07:07:47 mail postfix/qmgr[3788]: E5E21BFE00: from=<root@domain>, size=443, nrcpt=1 (queue active)
Oct 24 07:07:48 mail postfix/smtpd[3812]: connect from localhost[127.0.0.1]
Oct 24 07:07:48 mail postfix/smtpd[3812]: connect from localhost[127.0.0.1]
Oct 24 07:07:48 mail postfix/smtpd[3812]: 110FCBFE03: client=localhost[127.0.0.1]
Oct 24 07:07:48 mail postfix/smtpd[3812]: 110FCBFE03: client=localhost[127.0.0.1]
Oct 24 07:07:48 mail postfix/cleanup[3806]: 110FCBFE03: message-id=<20131024110747.E5E21BFE00@mail.domain>
Oct 24 07:07:48 mail postfix/cleanup[3806]: 110FCBFE03: message-id=<20131024110747.E5E21BFE00@mail.domain>
Oct 24 07:07:48 mail postfix/qmgr[3788]: 110FCBFE03: from=<root@domain>, size=854, nrcpt=1 (queue active)
Oct 24 07:07:48 mail postfix/qmgr[3788]: 110FCBFE03: from=<root@domain>, size=854, nrcpt=1 (queue active)
Oct 24 07:07:48 mail amavis[1969]: (01969-01) Passed CLEAN {RelayedInbound}, <root@domain> -> <user@domain>, Message-ID: <20131024110747.E5E21BFE00@mail.domain>, mail_id: 23IWqf8MZe5p, Hits: -, size: 443, queued_as: 110FCBFE03, 138 ms
Oct 24 07:07:48 mail amavis[1969]: (01969-01) Passed CLEAN {RelayedInbound}, <root@domain> -> <user@domain>, Message-ID: <20131024110747.E5E21BFE00@mail.domain>, mail_id: 23IWqf8MZe5p, Hits: -, size: 443, queued_as: 110FCBFE03, 138 ms
Oct 24 07:07:48 mail postfix/smtp[3810]: E5E21BFE00: to=<user@domain>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.18, delays=0.03/0.01/0.01/0.14, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 110FCBFE03)
Oct 24 07:07:48 mail postfix/smtp[3810]: E5E21BFE00: to=<user@domain>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.18, delays=0.03/0.01/0.01/0.14, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 110FCBFE03)
Oct 24 07:07:48 mail postfix/qmgr[3788]: E5E21BFE00: removed
Oct 24 07:07:48 mail postfix/qmgr[3788]: E5E21BFE00: removed
Oct 24 07:07:48 mail postfix/smtp[3815]: 110FCBFE03: to=<user@domain>, relay=none, delay=0.04, delays=0.01/0.02/0.02/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.domain type=AAAA: Host not found)
Oct 24 07:07:48 mail postfix/smtp[3815]: 110FCBFE03: to=<user@domain>, relay=none, delay=0.04, delays=0.01/0.02/0.02/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.domain type=AAAA: Host not found)
Oct 24 07:07:48 mail postfix/cleanup[3806]: 1F548BFE04: message-id=<20131024110748.1F548BFE04@mail.domain>
Oct 24 07:07:48 mail postfix/cleanup[3806]: 1F548BFE04: message-id=<20131024110748.1F548BFE04@mail.domain>
Oct 24 07:07:48 mail postfix/qmgr[3788]: 1F548BFE04: from=<>, size=2900, nrcpt=1 (queue active)
Oct 24 07:07:48 mail postfix/qmgr[3788]: 1F548BFE04: from=<>, size=2900, nrcpt=1 (queue active)
Oct 24 07:07:48 mail postfix/bounce[3816]: 110FCBFE03: sender non-delivery notification: 1F548BFE04
Oct 24 07:07:48 mail postfix/bounce[3816]: 110FCBFE03: sender non-delivery notification: 1F548BFE04
Oct 24 07:07:48 mail postfix/qmgr[3788]: 110FCBFE03: removed
Oct 24 07:07:48 mail postfix/qmgr[3788]: 110FCBFE03: removed
Oct 24 07:07:48 mail postfix/smtp[3815]: 1F548BFE04: to=<root@domain>, relay=none, delay=0.03, delays=0/0/0.02/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.domain type=AAAA: Host not found)
Oct 24 07:07:48 mail postfix/smtp[3815]: 1F548BFE04: to=<root@domain>, relay=none, delay=0.03, delays=0/0/0.02/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.domain type=AAAA: Host not found)
Oct 24 07:07:48 mail postfix/qmgr[3788]: 1F548BFE04: removed
Oct 24 07:07:48 mail postfix/qmgr[3788]: 1F548BFE04: removed

Kann es sein, dass er sich garnicht dafuer verantworlich fuehlt und schaut wohin er die Mail weiterleiten kann?

Ich habe uebrigens Usernamen durch "user" und die Domain durch "domain" ersetzt. Das ist also nicht der Fehler ;)

Gruesse
serow
 
Code:
status=bounced (Host or domain name not found. Name service error for name=mail.domain type=AAAA: Host not found)
sagt dir, dass die Mail festhängt, weil mail.domain nicht aufgelöst werden kann und entsprechend die Empfängerseite nicht zu finden ist. Wie ist denn der Hostname der Maschine und wie ist in der main.cf von Postfix myhostname und mydestination belegt?

/Edit:

Ist denn die Datenbank schon richtig befüllt und stimmen alle DNS-Einträge?
 
Hi, also der mail server sitzt hinter einem router, welcher eine public IP auf die interene Umsetzt und umgekehrt.

Code:
root@mail:~# hostname
mail

root@mail:~# cat /etc/resolv.conf 
domain <domain>
search <domain>
nameserver 8.8.8.8

root@mail:~# cat /etc/hosts
127.0.0.1    localhost
10.173.20.4    mail.<domain>    mail

root@mail:~# cat /etc/mailname 
mail.<domain>
root@mail:~# cat /etc/postfix/main.cf | grep -E "^myhostname|^mydestination"
myhostname = mail.<domain>
mydestination = <domain>, localhost, localhost.localdomain
root@mail:~#
Datenbank:

Code:
mysql> select * from domains;
+---------------+
| domain        |
+---------------+
| <domain> |
+---------------+
1 row in set (0.00 sec)

mysql> select * from forwardings;
+-----------------------+-----------------------------+
| source                | destination                 |
+-----------------------+-----------------------------+
| contact@<domain> | <user>@<domain> |
+-----------------------+-----------------------------+
1 row in set (0.00 sec)

mysql> select * from transport;
+---------------+-------------------------+
| domain        | transport               |
+---------------+-------------------------+
| <domain> | smtp:mail.<domain> |
+---------------+-------------------------+
1 row in set (0.00 sec)

mysql> select * from users;
+-----------------------------+---------------+----------+
| email                       | password      | quota    |
+-----------------------------+---------------+----------+
| <user>@<domain> | .8y7t5N92WykE | 10485760 |
+-----------------------------+---------------+----------+
1 row in set (0.00 sec)

mysql>

Die oeffentlichen A und MX records zeigen noch voellig falsch, weil ich gerade dabei bin das gestern kaputt gegangene System neu aufzusetzen.
 
Schaut soweit eigentlich richtig aus. Das die Queries die richtigen Ergebnisse liefern hast du sicherlich getestet. Was mir noch spontan anhand der Meldung einfällt: IPv6 beim Postfix abstellen (inet_protocols=ipv4) oder entsprechend für korrekte Auflösung von mail.<domain> auf IPv6 sorgen. Letzteres wäre mit "host -t AAAA mail.<domain>" prüfbar. Wie du dies aber in der hosts setzt... gute Frage, aber Google hilft dir sicherlich ;)
 
Also DNS auf mail.<domain> funktioniert nicht so richtig:

Code:
root@mail:~# nslookup mail.<domain>
Server:        8.8.8.8
Address:    8.8.8.8#53

** server can't find mail.<domain>: NXDOMAIN

root@mail:~#

Ping allerdings schon:

Code:
root@mail:~# ping mail.<domain>
PING mail.<domain> (10.173.10.5) 56(84) bytes of data.
64 bytes from mail.<domain> (10.173.10.5): icmp_req=1 ttl=64 time=0.034 ms
64 bytes from mail.<domain> (10.173.10.5): icmp_req=2 ttl=64 time=0.039 ms
^C
--- mail.<domain>t ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.034/0.036/0.039/0.006 ms
root@mail:~#

Ich verstehe auch nicht ganz warum er das ueberhaupt versucht. Er sollte doch eigentlich sagen "Hey du schickst an @<domain>, das bin ja ich! Also speicher ich das mal in der lokalen Mailbox ab" oder nicht?

Gruesse
serow

EDIT: Ja die Queries funktionieren alle - gerade getestet:

Code:
mysql> show tables;
+----------------+
| Tables_in_mail |
+----------------+
| domains        |
| forwardings    |
| transport      |
| users          |
+----------------+
4 rows in set (0.00 sec)

mysql> SELECT domain AS virtual FROM domains WHERE domain='<domain>'
    -> ;
+---------------+
| virtual       |
+---------------+
| <domain> |
+---------------+
1 row in set (0.00 sec)

mysql> SELECT email FROM users WHERE email='<user>@<domain>';
+-----------------------------+
| email                       |
+-----------------------------+
| <user>@<domain> |
+-----------------------------+
1 row in set (0.00 sec)

mysql> SELECT destination FROM forwardings WHERE source='contact@<domain>'
    -> ;
+-----------------------------+
| destination                 |
+-----------------------------+
| <user>@<domain> |
+-----------------------------+
1 row in set (0.00 sec)

mysql> SELECT CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') FROM users WHERE email='<user>@<domain>'
    -> ;
+----------------------------------------------------------------------------+
| CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') |
+----------------------------------------------------------------------------+
| <domain>/<user>/                                               |
+----------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT quota FROM users WHERE email='<user>@<domain>';
+----------+
| quota    |
+----------+
| 10485760 |
+----------+
1 row in set (0.00 sec)

mysql> SELECT transport FROM transport WHERE domain='<user>@<domain>';
Empty set (0.01 sec)

mysql> 
mysql> SELECT transport FROM transport WHERE domain='<domain>';
+-------------------------+
| transport               |
+-------------------------+
| smtp:mail.<domain> |
+-------------------------+
1 row in set (0.00 sec)

mysql>
 
Zuletzt bearbeitet:
Sollte, richtig, deshalb ja die Frage ob die Datenbankabfragen geprüft wurden. Ich hab mal fix das Tutorial durchgesehen und da ist der Teil nicht drin...

Was sagt denn

Code:
postmap -q <domain> proxy:mysql:/etc/postfix/mysql-virtual_domains.cf

/Edit: Datenbankabfragen direkt in der Datenbank sollten funktionieren, das ist klar. Wichtig ist, ob Postfix richtig abfragen kann.
 
Laeuft:

Code:
root@mail:~# postmap -q <domain> proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
<domain>
root@mail:~#

EDIT: Oh man, ich sitz hier und drueck alle 30sec F5 weil meine Mails ja nicht funktionieren :D Damn!
 
Zuletzt bearbeitet:
Hm, also dann steh ich auch erstmal auf dem Schlauch. Hat denn die Änderung auf rein IPv4 zu Änderungen im Logfile geführt?
 
Ist der Mailserver ggf. nur an das Loopback-Interface gebunden? Wird die hosts-Datei in der nsswitch.conf vor dem DNS abgearbeitet?

Das Problem ist auf jeden Fall, dass nslookup den Namen nicht auflösen kann. Genau die gleiche Art der Namensauflösung verwendet nämlich auch Postfix.
 
Hi, ich habe mir eben einen Bind aufgesetzt um das Problem temporaer zu loesen:

Code:
root@mail:~# nslookup mail.<domain>
Server:        10.173.10.2
Address:    10.173.10.2#53

Name:    mail.<domain>
Address: 10.173.10.5

root@mail:~#

root@mail:~# Oct 24 09:21:00 mail postfix/pickup[5349]: 6B3EFBFB76: uid=0 from=<root>
Oct 24 09:21:00 mail postfix/cleanup[5368]: 6B3EFBFB76: message-id=<20131024132100.6B3EFBFB76@mail.<domain>>
Oct 24 09:21:00 mail postfix/qmgr[5350]: 6B3EFBFB76: from=<root@mail.<domain>>, size=449, nrcpt=1 (queue active)
Oct 24 09:21:00 mail postfix/smtpd[5374]: connect from localhost[127.0.0.1]
Oct 24 09:21:00 mail postfix/trivial-rewrite[5370]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 09:21:00 mail postfix/smtpd[5374]: 8B182BFB75: client=localhost[127.0.0.1]
Oct 24 09:21:00 mail postfix/cleanup[5368]: 8B182BFB75: message-id=<20131024132100.6B3EFBFB76@mail.<domain>>
Oct 24 09:21:00 mail postfix/qmgr[5350]: 8B182BFB75: from=<root@mail.<domain>>, size=860, nrcpt=1 (queue active)
Oct 24 09:21:00 mail postfix/trivial-rewrite[5370]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 09:21:00 mail postfix/smtpd[5374]: disconnect from localhost[127.0.0.1]
Oct 24 09:21:00 mail amavis[1969]: (01969-02) Passed CLEAN {RelayedInbound}, <root@mail.<domain>> -> <<user>@<domain>>, Message-ID: <20131024132100.6B3EFBFB76@mail.<domain>>, mail_id: okojSiMtl3la, Hits: -, size: 449, queued_as: 8B182BFB75, 122 ms 
Oct 24 09:21:00 mail postfix/smtp[5372]: 6B3EFBFB76: to=<<user>@<domain>>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.18, delays=0.04/0.01/0.01/0.12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 8B182BFB75)
Oct 24 09:21:00 mail postfix/qmgr[5350]: 6B3EFBFB76: removed
Oct 24 09:21:00 mail postfix/smtp[5377]: 8B182BFB75: to=<<user>@<domain>>, relay=none, delay=0.03, delays=0.01/0.02/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 09:21:00 mail postfix/cleanup[5368]: 92F46BFC0B: message-id=<20131024132100.92F46BFC0B@mail.<domain>>
Oct 24 09:21:00 mail postfix/qmgr[5350]: 92F46BFC0B: from=<>, size=2806, nrcpt=1 (queue active)
Oct 24 09:21:00 mail postfix/bounce[5378]: 8B182BFB75: sender non-delivery notification: 92F46BFC0B
Oct 24 09:21:00 mail postfix/qmgr[5350]: 8B182BFB75: removed
Oct 24 09:21:00 mail postfix/smtp[5377]: 92F46BFC0B: to=<root@mail.<domain>>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 09:21:00 mail postfix/qmgr[5350]: 92F46BFC0B: removed
^C
root@mail:~# ls /home/vmail/
root@mail:~# ls -al /home/vmail/
total 20
drwxr-xr-x 2 vmail vmail 4096 Oct 24 07:07 .
drwxr-xr-x 4 root  root  4096 Oct 24 05:43 ..
-rw-r--r-- 1 vmail vmail  220 Dec 29  2012 .bash_logout
-rw-r--r-- 1 vmail vmail 3392 Dec 29  2012 .bashrc
-rw-r--r-- 1 vmail vmail  675 Dec 29  2012 .profile
root@mail:~#

Wie man sieht wird die Mailbox (nichtmal der Domain Ordner) nicht angelegt.

Gruesse
serow
 
Code:
mail for mail.<domain> loops back to myself

Dein Postfix erkennt nicht, dass es sich dabei um eine lokale Domain handelt. Ist die Domain in mydestination eingetragen?
 
Hi, das ist meine aktuelle main.cf:

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
myorigin = /etc/mailname

inet_protocols=ipv4
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

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

#debug_peer_list = 127.0.0.1

myhostname = mail.<domain>
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = <domain>, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy: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_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
#virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
#virtual_mailbox_limit_override = yes
#virtual_maildir_limit_message = "The user you are trying to reach is over quota."
#virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
receive_override_options = no_address_mappings
content_filter = amavis:[127.0.0.1]:10024
#virtual_maildir_limit_message = "The user you are trying to reach is over quota."

Die Domain ist eingetragen.
 
Selbst wenn nicht, sollten sie lokal dem User zugestellt werden, sofern vorhanden. Allerdings fehlt dazu mail.<domain> bei mydestinations. <domain> kann stattdessen aus mydestinations entfernt werden, weil dies ja über die Datenbank kommt.
 
Nein, aendert aber scheinbar auch nichts:

Code:
root@mail:~# cat /etc/postfix/main.cf | grep -E "^mydest"
mydestination = mail.<domain>, <domain>, localhost, localhost.localdomain
root@mail:~# postfix reload
postfix/postfix-script: refreshing the Postfix mail system
Oct 24 10:05:33 mail postfix/postfix-script[5734]: refreshing the Postfix mail system
Oct 24 10:05:33 mail postfix/postfix-script[5734]: refreshing the Postfix mail system
root@mail:~# Oct 24 10:05:33 mail postfix/master[5635]: reload -- version 2.9.6, configuration /etc/postfix
Oct 24 10:05:33 mail postfix/master[5635]: reload -- version 2.9.6, configuration /etc/postfix

root@mail:~# tail -n 0 -f /var/log/mail.log
^Z
[3]+  Stopped                 tail -n 0 -f /var/log/mail.log
root@mail:~# bg
[3]+ tail -n 0 -f /var/log/mail.log &
root@mail:~# mailx <user>@<domain>
Subject: test
test
EOT
root@mail:~# Oct 24 10:05:46 mail postfix/pickup[5738]: 3E254BFC0B: uid=0 from=<root>
Oct 24 10:05:46 mail postfix/pickup[5738]: 3E254BFC0B: uid=0 from=<root>
Oct 24 10:05:46 mail postfix/pickup[5738]: 3E254BFC0B: uid=0 from=<root>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 3E254BFC0B: message-id=<20131024140546.3E254BFC0B@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 3E254BFC0B: message-id=<20131024140546.3E254BFC0B@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 3E254BFC0B: message-id=<20131024140546.3E254BFC0B@mail.<domain>>
Oct 24 10:05:46 mail postfix/qmgr[5739]: 3E254BFC0B: from=<root@mail.<domain>>, size=443, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 3E254BFC0B: from=<root@mail.<domain>>, size=443, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 3E254BFC0B: from=<root@mail.<domain>>, size=443, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/smtpd[5750]: connect from localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/smtpd[5750]: connect from localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/smtpd[5750]: connect from localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/smtpd[5750]: 5AD88BFB76: client=localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/smtpd[5750]: 5AD88BFB76: client=localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/smtpd[5750]: 5AD88BFB76: client=localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/cleanup[5744]: 5AD88BFB76: message-id=<20131024140546.3E254BFC0B@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 5AD88BFB76: message-id=<20131024140546.3E254BFC0B@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 5AD88BFB76: message-id=<20131024140546.3E254BFC0B@mail.<domain>>
Oct 24 10:05:46 mail postfix/qmgr[5739]: 5AD88BFB76: from=<root@mail.<domain>>, size=854, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 5AD88BFB76: from=<root@mail.<domain>>, size=854, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 5AD88BFB76: from=<root@mail.<domain>>, size=854, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/smtpd[5750]: disconnect from localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/smtpd[5750]: disconnect from localhost[127.0.0.1]
Oct 24 10:05:46 mail postfix/smtpd[5750]: disconnect from localhost[127.0.0.1]
Oct 24 10:05:46 mail amavis[1968]: (01968-04) Passed CLEAN {RelayedInbound}, <root@mail.<domain>> -> <<user>@<domain>>, Message-ID: <20131024140546.3E254BFC0B@mail.<domain>>, mail_id: YxAoXd2sn8bQ, Hits: -, size: 443, queued_as: 5AD88BFB76, 113 ms
Oct 24 10:05:46 mail amavis[1968]: (01968-04) Passed CLEAN {RelayedInbound}, <root@mail.<domain>> -> <<user>@<domain>>, Message-ID: <20131024140546.3E254BFC0B@mail.<domain>>, mail_id: YxAoXd2sn8bQ, Hits: -, size: 443, queued_as: 5AD88BFB76, 113 ms
Oct 24 10:05:46 mail amavis[1968]: (01968-04) Passed CLEAN {RelayedInbound}, <root@mail.<domain>> -> <<user>@<domain>>, Message-ID: <20131024140546.3E254BFC0B@mail.<domain>>, mail_id: YxAoXd2sn8bQ, Hits: -, size: 443, queued_as: 5AD88BFB76, 113 ms
Oct 24 10:05:46 mail postfix/smtp[5748]: 3E254BFC0B: to=<<user>@<domain>>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.16, delays=0.03/0.01/0/0.12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5AD88BFB76)
Oct 24 10:05:46 mail postfix/smtp[5748]: 3E254BFC0B: to=<<user>@<domain>>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.16, delays=0.03/0.01/0/0.12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5AD88BFB76)
Oct 24 10:05:46 mail postfix/smtp[5748]: 3E254BFC0B: to=<<user>@<domain>>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.16, delays=0.03/0.01/0/0.12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 5AD88BFB76)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 3E254BFC0B: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 3E254BFC0B: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 3E254BFC0B: removed
Oct 24 10:05:46 mail postfix/smtp[5753]: 5AD88BFB76: to=<<user>@<domain>>, relay=none, delay=0.03, delays=0.01/0.02/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 10:05:46 mail postfix/smtp[5753]: 5AD88BFB76: to=<<user>@<domain>>, relay=none, delay=0.03, delays=0.01/0.02/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 10:05:46 mail postfix/smtp[5753]: 5AD88BFB76: to=<<user>@<domain>>, relay=none, delay=0.03, delays=0.01/0.02/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 10:05:46 mail postfix/cleanup[5744]: 632B6BFDC7: message-id=<20131024140546.632B6BFDC7@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 632B6BFDC7: message-id=<20131024140546.632B6BFDC7@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 632B6BFDC7: message-id=<20131024140546.632B6BFDC7@mail.<domain>>
Oct 24 10:05:46 mail postfix/qmgr[5739]: 632B6BFDC7: from=<>, size=2800, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 632B6BFDC7: from=<>, size=2800, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 632B6BFDC7: from=<>, size=2800, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/bounce[5754]: 5AD88BFB76: sender non-delivery notification: 632B6BFDC7
Oct 24 10:05:46 mail postfix/bounce[5754]: 5AD88BFB76: sender non-delivery notification: 632B6BFDC7
Oct 24 10:05:46 mail postfix/bounce[5754]: 5AD88BFB76: sender non-delivery notification: 632B6BFDC7
Oct 24 10:05:46 mail postfix/qmgr[5739]: 5AD88BFB76: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 5AD88BFB76: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 5AD88BFB76: removed
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/cleanup[5744]: 66F37BFB76: message-id=<20131024140546.632B6BFDC7@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 66F37BFB76: message-id=<20131024140546.632B6BFDC7@mail.<domain>>
Oct 24 10:05:46 mail postfix/cleanup[5744]: 66F37BFB76: message-id=<20131024140546.632B6BFDC7@mail.<domain>>
Oct 24 10:05:46 mail postfix/qmgr[5739]: 66F37BFB76: from=<>, size=2937, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 66F37BFB76: from=<>, size=2937, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 66F37BFB76: from=<>, size=2937, nrcpt=1 (queue active)
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/trivial-rewrite[5746]: warning: do not list domain <domain> in BOTH mydestination and virtual_mailbox_domains
Oct 24 10:05:46 mail postfix/local[5756]: 632B6BFDC7: to=<root@mail.<domain>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 66F37BFB76)
Oct 24 10:05:46 mail postfix/local[5756]: 632B6BFDC7: to=<root@mail.<domain>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 66F37BFB76)
Oct 24 10:05:46 mail postfix/local[5756]: 632B6BFDC7: to=<root@mail.<domain>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 66F37BFB76)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 632B6BFDC7: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 632B6BFDC7: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 632B6BFDC7: removed
Oct 24 10:05:46 mail postfix/smtp[5753]: 66F37BFB76: to=<<user>@<domain>>, orig_to=<root@mail.<domain>>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 10:05:46 mail postfix/smtp[5753]: 66F37BFB76: to=<<user>@<domain>>, orig_to=<root@mail.<domain>>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 10:05:46 mail postfix/smtp[5753]: 66F37BFB76: to=<<user>@<domain>>, orig_to=<root@mail.<domain>>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.<domain> loops back to myself)
Oct 24 10:05:46 mail postfix/qmgr[5739]: 66F37BFB76: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 66F37BFB76: removed
Oct 24 10:05:46 mail postfix/qmgr[5739]: 66F37BFB76: removed
^C
root@mail:~# ls -l /home/vmail/
total 0
root@mail:~#

Gruesse
serow

EIDIT: warum taucht eigentlich jede Message 3 Mal auf?
 
<domain> noch aus mydestinations entfernen, sagt doch schon die Warnung im Log.

Außerdem findet hast du für <domain> in deiner Datenbank einen Transport angelegt. Nach kurzer Recherche ergibt sich daraus, das <domain> weitergeleitet wird über mail.<domain> womit wir wieder am Anfang wären. Du hast dir also mit deinen Transporten einen Deadlock gebaut.
Mach mal aus dem smtp:mail.<domain> ein local:<domain> oder so ähnlich. (oder am besten ganz löschen!)

/edit: Das erklärt auch die versuchte Namensauflösung, da laut Doku bei einem FQDN diese gemacht wird.
 
Super das hat geholfen! Danke! Da waere ich nie drauf gekommen. Glaube diese MySQL Geschichte hatte ich damals nicht gemacht.

Also hier ist was funktioniert:

1. Mail senden mit mailx:

Code:
root@mail:~# mailx mathias.ewald@vxpertise.net
Subject: test
testtest
EOT
root@mail:~# Oct 24 10:54:29 mail postfix/pickup[5994]: 7420FBFDC7: uid=0 from=<root>
Oct 24 10:54:29 mail postfix/cleanup[6195]: 7420FBFDC7: message-id=<20131024145429.7420FBFDC7@mail.vxpertise.net>
Oct 24 10:54:29 mail postfix/qmgr[5995]: 7420FBFDC7: from=<root@mail.vxpertise.net>, size=447, nrcpt=1 (queue active)
Oct 24 10:54:29 mail postfix/smtpd[6201]: connect from localhost[127.0.0.1]
Oct 24 10:54:29 mail postfix/smtpd[6201]: 9113FBFB76: client=localhost[127.0.0.1]
Oct 24 10:54:29 mail postfix/cleanup[6195]: 9113FBFB76: message-id=<20131024145429.7420FBFDC7@mail.vxpertise.net>
Oct 24 10:54:29 mail postfix/qmgr[5995]: 9113FBFB76: from=<root@mail.vxpertise.net>, size=858, nrcpt=1 (queue active)
Oct 24 10:54:29 mail postfix/smtpd[6201]: disconnect from localhost[127.0.0.1]
Oct 24 10:54:29 mail amavis[1969]: (01969-05) Passed CLEAN {RelayedInbound}, <root@mail.vxpertise.net> -> <mathias.ewald@vxpertise.net>, Message-ID: <20131024145429.7420FBFDC7@mail.vxpertise.net>, mail_id: SgNnDB1oxEl0, Hits: -, size: 447, queued_as: 9113FBFB76, 110 ms
Oct 24 10:54:29 mail postfix/smtp[6199]: 7420FBFDC7: to=<mathias.ewald@vxpertise.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.17, delays=0.04/0.01/0.01/0.12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9113FBFB76)
Oct 24 10:54:29 mail postfix/qmgr[5995]: 7420FBFDC7: removed
Oct 24 10:54:29 mail postfix/virtual[6203]: 9113FBFB76: to=<mathias.ewald@vxpertise.net>, relay=virtual, delay=0.04, delays=0.01/0.03/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Oct 24 10:54:29 mail postfix/qmgr[5995]: 9113FBFB76: removed
^C
root@mail:~#
2. Mail abholen mit Thunderbird:

- Server: <IP>
- Port: 143
- STARTTLS
- Normal Password

Was noch nicht laeuft ist das verschicken einer Mail von Thunderbird aus. Momentan ist TB so konfiguriert:

- Server: <IP>
- Port: 25
- SSL/TLS

Die Mail schicke ich an <user>@<domain> und bekomme von Thunderbird gesagt, dass das Passwort wohl nicht stimmt. Im Log steht

Code:
Oct 24 11:06:44 mail postfix/smtpd[6525]: connect from p54AFFF8E.dip0.t-ipconnect.de[*************]
Oct 24 11:06:44 mail postfix/smtpd[6525]: warning: SASL authentication failure: Password verification failed
Oct 24 11:06:44 mail postfix/smtpd[6525]: warning: p54AFFF8E.dip0.t-ipconnect.de[[*************]]: SASL PLAIN authentication failed: authentication failure
Oct 24 11:06:44 mail postfix/smtpd[6525]: warning: p54AFFF8E.dip0.t-ipconnect.de[[*************]]: SASL LOGIN authentication failed: authentication failure
Als ich vorhin die SQL Queries gepostet habe, stand auch der Passwort-Hash mit im Output. Mir faellt gerade nur ein, dass vltl der falsche Hashing Algorithmus verwendet wird. Wie kann man das pruefen?

Hier die sasl/smtp.conf:

Code:
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: **************
sql_database: mail
sql_select: select password from users where email = '%u@%r'
 
Tja, hier steig ich dann wohl mal aus, da ich das ganze über Dovecot mache und mich schonmal böse mit saslauthd rumgeärgert habe.

Um zumindest in der Kommunikation Verschlüsselungsprobleme auszuschließen, solltest du erstmal deinen Thunderbird auf die einfachste Variante ohne irgendwas stellen.

Und hilfreich wäre auch, wie sich der Server bei einem ehlo meldet, denn dort sagt er dir, was er wirklich unterstützt. (Seite 4 deines Tutorials Abschnitt "12 Test Postfix")

/Edit: Da die Anmeldung ja an der gleichen Datenbank mit vermutlich den gleichen Queries passiert, solltest du für das Verschicken dann evtl auch nur STARTTLS und normales Passwort verwenden.
 
Hi, dann danke fuer die Hilfe schonmal! Das eigentliche Topic ist ja auch geloest! Ich spiel mal noch ein bisschen rum und mach dann bei Bedarf einen neuen Thread.
 
Zurück
Oben