Hi all. I need to set up a virtual alias (forwarder) and a virtual
mailbox on the same domain. I'm using Postfix on Ubuntu Server 12.04.
Here is my setup:

$ cat /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no
readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = awsBeta
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = awsBeta, localhost.localdomain, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = someDomain.com
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

virtual_alias_domains = someDomain.com

$ cat /etc/postfix/virtual
[email protected] [email protected]

$ cat /etc/postfix/vmailbox
[email protected] someDomain.com/dotan

$ sudo postmap virtual
$ sudo postmap vmailbox
$ tree /var/mail/vhosts/
/var/mail/vhosts/
└── someDomain.com
    └── dotan

When mail is sent to [email protected] it is properly forwarded
to [email protected]. However, when mail is sent to [email protected]
the sending address receives a mail with this error:
Recipient address rejected: User unknown in virtual alias table

This appears in the log:
warning: do not list domain someDomain.com in BOTH
virtual_alias_domains and virtual_mailbox_domains

Of course, I cannot remove the domain from either
virtual_alias_domains or virtual_mailbox_domains because I need to use
bothe of those features. So how might one set up [email protected]
as a real mailbox (no unix account though), but [email protected]
to forward to [email protected]? I've been trolling Google for answers,
but though I thought that this would be easy, I'm stuck!

--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to