I have a mail server set up which is responsible for several virtual users and domains. These mails are delivered fine to the respective mailbox.
But I can't get local delivery for system accounts (root, http, ...) to work. This is my alias file:
root: <local_user>
<local_user>: <virtual_user@mydomain.org>
MAILER-DAEMON: postmaster
postmaster: root
bin: root
daemon: root
named: root
nobody: root
uucp: root
www: root
ftp-bugs: root
postfix: root
http: root
This is the relevant part of /etc/postfix/main.cf
:
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
append_dot_mydomain = no
html_directory = no
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = localhost.$mydomain, localhost, localhost.localdomain
mydomain = <mydomain.org>
myhostname = <myhost.mydomain.org>
mynetworks_style = host
myorigin = $mydomain
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = <mydomain.org mydomain2.org mydomain3.org ...>
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
Values in <...> are obviously placeholders.
When I locally send a mail to root
. Postfix completes the address to root@mydomain.org, which it then wants to deliver via virtual
but of course root@mydomain.org
is not a valid virtual address (and it should not be).
It would work if the address is completed to root@localhost
for local delivery. But when sending emails.
How would I accomplish that? Or what else should I do to get local delivery to work? Thanks for your help.
/e: added mydomain = <mydomain.org>
to above config output, because that wasn't obvious.