Discussion:
Postfix Virtual Users Transport
Fraser McGlinn via luv-main
2016-01-28 08:28:26 UTC
Permalink
Hi Guys,

I’ve got a domain where i’ve the main hosting for the domain somewhere else (not controlled by me) and then the some users hosted locally.
What i’m having issues with is getting the mail from my server to send upstream if it can’t find a user locally.

What i’ve got so far:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 256000000
milter_connect_macros = j {daemon_name} v {if_name} _
milter_default_action = accept
mydestination = frodo.iama.geek.nz <http://frodo.iama.geek.nz/>, localhost
myhostname = frodo.iama.geek.nz <http://frodo.iama.geek.nz/>
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = $smtpd_milters
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_milters = unix:/spamass/spamass.sock unix:/clamav/clamav-milter.ctl
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unverified_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/self-sign-star.iama.geek.nz.crt
smtpd_tls_key_file = /etc/ssl/self-sign-star.iama.geek.nz.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual-transport-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp

With the following in my virtual transport table

+----+--------------------+------------------------------------+
| id | source | destination |
+----+--------------------+------------------------------------+
| 1 | example.com | smtp:[aspmx.l.google.com <http://aspmx.l.google.com/>] |
| 2 | .example.com | smtp:[aspmx.l.google.com <http://aspmx.l.google.com/>] |
| 3 | ***@example.com | lmtp:unix:private/dovecot-lmtp |
+----+--------------------+------------------------------------+

What I get when i try and email an email on the upstream server is Recipient address rejected: User unknown in virtual mailbox table

Does anyone have any ideas on how to resolve this? It doesn’t seem to matter if I have virtual_transport set or not and do it all manually.

Cheers,

Fraser
Erik Christiansen via luv-main
2016-01-28 10:18:10 UTC
Permalink
Does anyone have any ideas on how to resolve this? It doesn’t seem to
matter if I have virtual_transport set or not and do it all manually.
OK, if you're not set on that virtual_transport stuff, then my naiive way
to do that is:

# postconf -ev relayhost=[mail.internode.on.net]
# postfix reload

We saw from your post that your relayhost config is the default, not
the mailhost provided by your ISP, or corporate mailhost if you're in
some big organisation.

Erik

Loading...