I need to relay for a domain by default but deliver for specific users locally
(Dovecot).  I have done this before by adding the domain to
virtual_mailbox_domains and adding to the transport map in the following
manner:

da...@kosmosisland.com :
kosmosisland.com   smtp:

This relays by default but delivers to locally (Courier in this case) for
da...@kosmosisland.com.  The same does not work on another server, however.
The config follows:

# postconf -n
alias_database = hash:/etc/aliases
alias_maps =
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
disable_vrfy_command = yes
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps =
mailbox_size_limit = 0
mydestination =
myhostname = vmail.sutinen.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 65.105.240.234 
173.8.212.217 68.66.148.24
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = sutinen.com
relayhost =
smtp_tls_cert_file = /etc/ssl/certs/vmail_sutinen_com.crt
smtp_tls_key_file = /etc/ssl/private/vmail_sutinen_com.key
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks        
permit_sasl_authenticated       reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks   permit_sasl_authenticated       
reject_non_fqdn_sender  reject_unknown_sender_domain    reject_rbl_client 
b.barracudacentral.org        reject_rbl_client zen.spamhaus.org        
reject_rbl_client cbl.abuseat.org       reject_rbl_client bl.spamcop.net
smtpd_tls_cert_file = /etc/ssl/certs/vmail_sutinen_com.crt
smtpd_tls_key_file = /etc/ssl/private/vmail_sutinen_com.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf       
proxy:mysql:/etc/postfix/mysql_virtual_user_singleton_maps.cf   
hash:/etc/postfix/virtual
virtual_gid_maps = static:5000
virtual_mailbox_domains = 
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

Regards,
David Koski
da...@kosmosisland.com

Reply via email to