451 Temporary lookup failure

Xoon
Posts: 4
Joined: 2010-03-26 10:21

451 Temporary lookup failure

Post by Xoon »

Hallo,

Ich habe hier ein Gespann aus Postfix, Dovecot, Postfixadmin und Mysql am laufen.
Bei nicht existierenden Postfächern/Aliasen bekomme ich ein
"451 Temporary lookup failure" statt ein "550 Recipient address rejected: User unknown in virtual mailbox table", dies produziert leider Backscatter :-(

Wie kann das Problem lösen?

Ein telnet auf die 25 ergibt:

Code: Select all

220 mail.der-mailserver.tld ESMTP Postfix (Debian/GNU)
ehlo der-mailserver.tld
250-mail.der-mailserver.tld
250-PIPELINING
250-SIZE 40000000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<dort@example.tld>
250 2.1.0 Ok
rcpt to:<nixgueltiges@der-mailserver.tld>
451 4.3.0 <nixgueltiges@der-mailserver.tld>: Temporary lookup failure
rcpt to:<gueltiges@der-mailserver.tld>
250 2.1.5 Ok

Das Verhalten ist reproduzierbar, ein vorhandener Alias wird immer korrekt aufgelöst, ohne Aliaseintrag gibts einen 451 statt 550. Ein überlasteter Mysqlserver ist ausschließbar.

ein postmap ergibt folgendes:

Code: Select all

postmap -qv nixgueltiges@der-mailserver.tld mysql:/etc/postfix/mysql_virtual_alias_maps.cf
...
postmap: dict_open: mysql:/etc/postfix/mysql_virtual_alias_maps.cf
postmap: dict_mysql_get_active: attempting to connect to host 127.0.0.1
postmap: dict_mysql: successful connection to host 127.0.0.1
postmap: dict_mysql: successful query from host 127.0.0.1
postmap: dict_mysql_lookup: retrieved 0 rows

postmap -qv gueltiges@der-mailserver.tld mysql:/etc/postfix/mysql_virtual_alias_maps.cf
postmap: dict_open: mysql:/etc/postfix/mysql_virtual_alias_maps.cf
postmap: dict_mysql_get_active: attempting to connect to host 127.0.0.1
postmap: dict_mysql: successful connection to host 127.0.0.1
postmap: dict_mysql: successful query from host 127.0.0.1
postmap: dict_mysql_lookup: retrieved 1 rows



das logfile:

Code: Select all

Mar 26 12:00:50 localhost postfix/smtpd[21738]: maps_find: virtual_alias_maps: @der-mailserver.tld: not found                         
Mar 26 12:00:50 localhost postfix/smtpd[21738]: mail_addr_find: nix@der-mailserver.tld -> (not found)                                 
Mar 26 12:00:50 localhost postfix/smtpd[21738]: maps_find: virtual_mailbox_maps: nix@der-mailserver.tld: search aborted               
Mar 26 12:00:50 localhost postfix/smtpd[21738]: mail_addr_find: nix@der-mailserver.tld -> (try again)       



die virtual_alias_maps.cf:

Code: Select all

user = einuser
password = einpassword
hosts = 127.0.0.1
dbname = postfix
table = alias
select_field = goto
where_field = address
additional_conditions = and active = '1'

#query = SELECT goto FROM alias WHERE address='%s' AND active = '1'


und postconf -n

Code: Select all

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = /usr/bin/maildrop
mailbox_size_limit = 0
message_size_limit = 40000000
mydestination = mail.der-mailserver.tld, localhost, localhost.der-mailserver.tld
myhostname = mail.der-mailserver.tld
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
permit_mx_backup_networks = x.x.x.x
recipient_delimiter = +
relay_domains = $mydestination, mysql:/etc/postfix/mysql_relay_domains_maps.cf
relay_recipient_maps =
relayhost =
smtp_tls_cert_file = /etc/postfix/cert.pem
smtp_tls_key_file = /etc/postfix/key.pem
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_enforce_tls = no
smtpd_recipient_restrictions = permit_mynetworks,       permit_sasl_authenticated,      permit_mx_backup,       reject_unlisted_recipient,   reject_unauth_destination,      reject_unverified_recipient,    permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/postfix/cert.pem
smtpd_tls_key_file = /etc/postfix/key.pem
smtpd_tls_loglevel = 3
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 512000000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1001
virtual_transport = dovecot
virtual_uid_maps = static:1001
                                                                           
Top

User avatar
Joe User
Project Manager
Project Manager
Posts: 11518
Joined: 2003-02-27 01:00
Location: Hamburg

Re: 451 Temporary lookup failure

Post by Joe User »

Nimm mal maildrop und/oder amavis raus.
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.
Top

Xoon
Posts: 4
Joined: 2010-03-26 10:21

Re: 451 Temporary lookup failure

Post by Xoon »

Danke für die Tipps.
Weder ein entferntes maildrop noch amavis haben am Verhalten etwas geändert.
Geholfen hat den smtpd nicht im chroot laufen zu lassen. Warum prüf ich noch.
Last edited by Xoon on 2010-03-27 08:05, edited 1 time in total.
Top

User avatar
Joe User
Project Manager
Project Manager
Posts: 11518
Joined: 2003-02-27 01:00
Location: Hamburg

Re: 451 Temporary lookup failure

Post by Joe User »

War der MySQL-Socket nicht im Chroot vorhanden?
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.
Top

Xoon
Posts: 4
Joined: 2010-03-26 10:21

Re: 451 Temporary lookup failure

Post by Xoon »

Nein, war er nicht. Sollt er auch nicht, postfix und MySQL unterhalten sich per TCP/IP - sollten sie zumindest ;-)
Warum der MySQL-Socket benutzt wird prüf ich noch.
Top

User avatar
Joe User
Project Manager
Project Manager
Posts: 11518
Joined: 2003-02-27 01:00
Location: Hamburg

Re: 451 Temporary lookup failure

Post by Joe User »

Wenn Du für MySQL-Verbindungen localhost angibst, wird automatisch der Socket verwendet.
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.
Top

Xoon
Posts: 4
Joined: 2010-03-26 10:21

Re: 451 Temporary lookup failure

Post by Xoon »

localhost hatte ich tatsächlich statt der 127.0.0.1 in einer der configs stehen. Jetzt mag postfix auch im chroot.
Danke für die Hilfe!
Top