I have a user who hosts one domain in Virtualmin GPL. User would like to manage email aliases for the domain using virtualmin. Most aliases do not have mail accounts on the server, they are simply forwards to another email service (i.e. gmail).
The MTA on the server is postfix.
When an alias is added to the domain, by logging into Virtualmin and navigating to “Edit Mail Aliases” under that domain (again there is only one currently) the alias gets added to /etc/aliases, and the domain is prefixed on the address.
i.e. I’m trying to create alias1@domain.com to forward to address1@gmail.com and address2@gmail.com. When I use the Virtualmin interface to create it, I’ll see and entry like this in /etc/aliases:
alias1-domain.com: address1@gmail.com,address2@gmail.com
The delivery to address “alias1@domain.com” fails since there is no account like that created in /etc/postfix/virtual, and postfix tries to deliver the message to alias1-domain.com@domain.com. We get an error from postfix that that virtual user doesn’t exist.
Postfix has this configuration:
domain.com:~# postconf -n
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = localhost
mynetworks = 127.0.0.0/8
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_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
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
virtual_alias_domains = domain.com
virtual_alias_maps = hash:/etc/postfix/virtual
There are many aliases that were imported into the postfix/virtual file with the original setup. We want to add to and edit those aliases. When we manually just add the alias to the virtual file, it works fine. (after running postmap). Or using the webmin “Postfix Server” interface, but I’m curious if there is some misconfiguration in Virtualmin or Postfix, which isn’t allowing the Virtualmin “Edit Alias” menu to work properly.
Thanks,
John