From: Da-Huntha on
Hello everyone,

I've recently set-up a backup server and chose postfix to handle the mail.
It's running on Debian 5 Kernel 2.6.26-2-686
While I got postfix running it won't handle my catch-all alias settings
correctly.

Here's my basic set-up:

# /etc/mailname
domain.com

# /etc/postfix/virtual
Me(a)domain.com me
@domain.com spam
@domain2.com spam

Both me and spam are UNIX accounts, both domains are in the mydestination
setting.

Thanks in advance if you are willing to help me. Next up I'll post 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_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = domain.com, domain2.com, hostname, localhost.localdomain,
localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450
virtual_alias_maps = hash:/etc/postfix/virtual
From: Da-Huntha on
Oops, I forgot to mention the problem: All mail goes to the catch-all
address, so even mail destined for me(a)domain.com.

On Fri, Mar 26, 2010 at 11:14 PM, Da-Huntha <Da-Huntha(a)lostmoment.com>wrote:

> Hello everyone,
>
> I've recently set-up a backup server and chose postfix to handle the mail.
> It's running on Debian 5 Kernel 2.6.26-2-686
> While I got postfix running it won't handle my catch-all alias settings
> correctly.
>
> Here's my basic set-up:
>
> # /etc/mailname
> domain.com
>
> # /etc/postfix/virtual
> Me(a)domain.com me
> @domain.com spam
> @domain2.com spam
>
> Both me and spam are UNIX accounts, both domains are in the mydestination
> setting.
>
> Thanks in advance if you are willing to help me. Next up I'll post 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_command = procmail -a "$EXTENSION"
> mailbox_size_limit = 0
> mydestination = domain.com, domain2.com, hostname, localhost.localdomain,
> localhost
> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> mynetworks_style = host
> myorigin = /etc/mailname
> readme_directory = no
> recipient_delimiter = +
> relayhost =
> smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
> smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
> smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
> smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
> smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
> smtpd_use_tls = yes
> unknown_local_recipient_reject_code = 450
> virtual_alias_maps = hash:/etc/postfix/virtual
>
From: Wietse Venema on
Da-Huntha:
> Oops, I forgot to mention the problem: All mail goes to the catch-all
> address, so even mail destined for me(a)domain.com.

As documented, virtual alias expansion is recursive.

> > # /etc/postfix/virtual
> > Me(a)domain.com me
> > @domain.com spam
> > @domain2.com spam

To stop the recursion, use the same email address on the
right-hand side as the left hand side:

Me(a)domain.com Me(a)domain.com

Wietse