Am 30.01.2015 um 14:59 schrieb Andreas Fagschlunger:
What I found out so far is, that postfix doesn't feel responsible for
mydomain.com. When I change mydestination to mydomain.com, postfix accepts
mails.
But I want postfix to lookup the domain against mysql. I've read all the
tutorials around and I'm still getting this error. I tested my SQL queries
with postmap -q and they seem to work fine
So I enabled verbose logging on smtpd and I didn't find any SQL query, so
I think postfix isn't even accessing the database
don't do that
and postconf -d output
that is luckily not true and you posted correct "postconf -n"
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
$daemon_directory/$process_name $process_id & sleep 5
html_directory = no
local_recipient_maps =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination =
newaliases_path = /usr/bin/newaliases
readme_directory = /usr/share/doc/postfix
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:8
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = mysql:/etc/postfix/virtual_mailbox_maps.cf
virtual_uid_maps = static:999
Now why postfix doesn't lookup mydomain.com over MySQL?
because you don't define "virtual_mailbox_domains" which lists *domains*
while "virtual_mailbox_maps" is the RCPT table
http://www.postfix.org/postconf.5.html#virtual_mailbox_maps
virtual_mailbox_maps (default: empty)
Optional lookup tables with all valid addresses in the domains that
match $virtual_mailbox_domains.
http://www.postfix.org/postconf.5.html#virtual_mailbox_domains