Hello:

I have had virtual aliases and mailboxes working well for years. I have always had a separated virtual_*_domains and virtual_*_maps file. Now I am combining them to make administration easier.

For virtual aliases, I simply commented out the virtual_alias_domains directive in the main.cf file. Since it defaults to virtual_alias_maps, everything works. I tested by adding the following line:
  br...@junk.schang.net brian
... Everything works. :-)

For virtual mailboxes, I did the same. It's my understanding that virtual_mailbox_domains defaults to virtual_mailbox_maps. However it didn't work as I expected. When I add the following line:
  br...@junk2.schang.net brian_mail/somefile
... I get a domain not found error.
However if I add another line:
  junk2.schang.net 1
... Everything works. :-)

Actually the behavior for virtual mailboxes is what I expected -- the need to have the domain defined on the left-hand-side of the lookup. I was surprised that the virtual alias didn't require that.

So that's my question: why does a virtual mailbox domain need to be explicitly defined on the LHS of virtual_mailbox_maps, while a virtual alias domain works without the domain defined on the LHS of virtual_alias_maps?

Thank you.

--
Brian Schang
address_verify_map = btree:/var/lib/postfix/verify
address_verify_negative_cache = yes
address_verify_negative_expire_time = 6d
address_verify_negative_refresh_time = 1d
address_verify_positive_expire_time = 6d
address_verify_positive_refresh_time = 1d
alias_database = $alias_maps
alias_maps = hash:/etc/aliases, hash:/etc/postfix/aliases, 
ldap:/etc/postfix/ldap_aliases.cf
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
defer_transports = 
delay_warning_time = 4h
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = /usr/bin/procmail
mailbox_size_limit = 0
mailbox_transport = 
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains = 
!bb.schang.net,!blackberry.schang.net,!facebook.schang.net,!football.schang.net,!linux.schang.net,!lists.schang.net,!mobile.schang.net,!wireless.schang.net,!wixom.schang.net,schang.net
masquerade_exceptions = root
message_size_limit = 20480000
mydestination = 
$myhostname,localhost.$mydomain,localhost,$mydomain,server2.schang.net
mydomain = schang.net
myhostname = s2.schang.net
mynetworks = cidr:/etc/postfix/network_table.cidr
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
notify_classes = resource,software,2bounce
parent_domain_matches_subdomains = smtpd_access_maps
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_domains = hash:/etc/postfix/relay_domains
relay_recipient_maps = 
relayhost = 
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_tls_security_level = none
smtpd_client_restrictions = 
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = no
smtpd_helo_restrictions = 
smtpd_recipient_restrictions = hash:/etc/postfix/access 
reject_unknown_reverse_client_hostname  reject_non_fqdn_sender  
reject_non_fqdn_recipient       reject_unlisted_recipient       
reject_unknown_sender_domain    reject_unknown_recipient_domain 
permit_mynetworks       reject_unlisted_sender  check_client_access 
hash:/etc/postfix/client_checks     reject_non_fqdn_helo_hostname   
reject_invalid_helo_hostname    reject_unauth_destination       
check_recipient_access hash:/etc/postfix/recipient_checks       
reject_rbl_client zen.spamhaus.org      reject_rbl_client bl.spamcop.net
smtpd_sasl_auth_enable = no
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = 
smtpd_tls_CAfile = /etc/postfix/ca.crt
smtpd_tls_cert_file = /etc/postfix/postfix-crt.pem
smtpd_tls_fingerprint_digest = sha1
smtpd_tls_key_file = /etc/postfix/postfix-key.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = none
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
unverified_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps, 
ldap:/etc/postfix/ldap_virtual_alias.cf
virtual_gid_maps = hash:/etc/postfix/virtual_gid_maps
virtual_mailbox_base = /var/spool/mail
virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_maps, 
ldap:/etc/postfix/ldap_virtual_mailbox.cf
virtual_uid_maps = hash:/etc/postfix/virtual_uid_maps

Reply via email to