OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
virtual_alias_domain problem

From: Maurizio Lo Bosco (maurizio.loboscoeng.it)
Date: Tue Mar 04 2008 - 10:11:55 CST


Hello,
I have shared domains with local and remote mailboxes.

I have configured the virtual_alias_domains and virtual_alias_maps but I have
this strange behaviour:
let's suppose that the domain is mydomain.com and that I have one account for
user1mydomain.com
if I write to user1some.other.server.com this mail is delivered to
user1mydomain.com

It seams that the server is ignoring the virtual_alias_domains and rewrite
everything is mathing the map query. In case of no matching in
virtual_alias_maps it forwards remotely to the correct relay.
This is the output of postconf -n
-------------------
alias_database = hash:/etc/postfix/aliases
alias_maps = ldap:/etc/postfix/ldap_aliases.conf, hash:/etc/postfix/aliases,
hash:/var/lib/mailman/data/aliases
append_dot_mydomain = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
bounce_queue_lifetime = 30m
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
command_time_limit = 4000s
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
empty_address_recipient = nobody
forward_path
= /home/$user/.forward${recipient_delimiter}${extension}, /home/$user/.forward
header_checks = regexp:/etc/postfix/header_checks
mail_owner = postfix
mailbox_command =
mailbox_size_limit = 0
mailbox_transport = cyrus
maximal_queue_lifetime = 1d
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = mail.mydomain.com, localhost.$mydomain, localhost $myorigin
myhostname = mail.mydomain.com
mynetworks = 127.0.0.0/8, 192.168.0.0/16, ddd.ddd.ddd.ddd/32
myorigin = mail.mydomain.com
recipient_delimiter = +
sendmail_path = /usr/sbin/sendmail_postfix
setgid_group = postdrop
smtp_connect_timeout = 15s
smtp_helo_timeout = 40s
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_limit = 5000
smtpd_recipient_restrictions = check_recipient_access
regexp:/etc/postfix/invalid_recipient,
permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = check_sender_access
regexp:/etc/postfix/invalid_sender
soft_bounce = yes
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = mydomain.com, otherdomain1.com, otherdomain2.com
virtual_alias_maps = ldap:/etc/postfix/ldap_maps_internal.conf,
ldap:/etc/postfix/ldap_maps_alias.conf,
hash:/var/lib/mailman/data/virtual-mailman,
hash:/etc/postfix/virtual-aliases, ldap:/etc/postfix/ldap_maps_external.conf,
hash:/etc/postfix/virtual, unix:passwd.byname
-------------------
The master.cf is
------------
# filter to antivirus
smtp inet n - n - - smtpd
        -o content_filter=smtp:127.0.0.1:10026
        -o receive_override_options=no_address_mappings
:10027 inet n - y - - smtpd
        -o content_filter=
        -o myhostname=deliver.antivirus
        -o smtpd_helo_restrictions=
        -o smtpd_client_restrictions=
        -o smtpd_sender_restrictions=
        -o mynetworks=127.0.0.0/8, 192.168.99.16/28
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8,192.168.99.16/28
        -o receive_override_options=no_unknown_recipient_checks
------------
I can not figure out where the problem is because the delivery to every local
user is working.
Thanks
  Maurizio