Discussion:
Problem with virtual_alias_maps matching for virtual_mailbox_domains only
(too old to reply)
k***@gmail.com
2012-09-13 14:10:10 UTC
Permalink
Hi, I have let's say 3 virtual domains:
- virtual.org
- example.com
- testing.net

What I want is that all mails sent to i.e. ***@virtual.org, ***@example.com, ***@testing.net go to ***@testing.net.

I want the alias to match only the virtual domains.
With this configuration the regular expression matches all domains, not only the 3 virtual ones. So let's say I send a mail to ***@humpadoo.com it is redirected to ***@testing.net.

mail.log says:
postfix/pipe[3613]: 800A922008AE: to=<***@testing.net>, orig_to=<***@humpadoo.com>, relay=dovecot, delay=0.56, delay
s=0.39/0/0/0.17, dsn=2.0.0, status=sent (delivered via dovecot service)


my postconf -n:

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
maximal_backoff_time = 200s
message_size_limit = 20480000
minimal_backoff_time = 200s
mydestination =
myhostname = virtual.org
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
queue_run_delay = 200s
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_rbl_client cbl.abuseat.org, reject_rbl_client sbl.spamhaus.org, reject_rbl_client pbl.spamhaus.org, check_client_access pcre:/etc/postfix/dspam_filter_access
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_recipient_limit = 4000
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain, permit_mynetworks, reject_sender_login_mismatch
smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem
smtpd_tls_key_file = /etc/ssl/private/dovecot.pem
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, regexp:/etc/postfix/aliases
virtual_gid_maps = static:5000
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

/etc/postfix/aliases:
/^(mailer-***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)$/ ***@testing.net
/^(***@.*)/ ***@testing.net
/^(***@.*)$/ ***@testing.net

I know that I could handle each domain separately, and/or within the mysql database but i'd like to do this simply within the aliases file.
Referring to this link http://www.seaglass.com/postfix/faq.html#vrtglal it should work, but it doesn't... can anyone help me?
k***@gmail.com
2012-09-20 18:23:03 UTC
Permalink
push
k***@gmail.com
2012-10-07 10:31:53 UTC
Permalink
push
k***@gmail.com
2013-01-03 20:31:32 UTC
Permalink
push

Loading...