multiple addresses in mail forwards

edit: post #3 uncovered a small issue.

clicked on "edit mail aliases" for a domain in virtualmin

ticked "forward to other address"

typed this in the field:

user1
user2

looking in the /etc/postfix/virtual file, i see:

@foo.com default-foo.com

what the heck is it delivering to? there is no such user or group.

Status: 
Active

Comments

Take a peek in /etc/aliases, there should be an alias created for default-foo.com in there.

oh that is pretty slick, didn't realize it used the aliases-file!

it's indeed putting all of the addresses in there, as a comma-separated list.

thanks!

re-opening this after i discovered an issue with how catchall aliases are created..

if you create a catch-all that goes to multiple addresses, it will be added to /etc/aliases as:

default-foo.com: user1,user2

if you then try to create a mail alias in virtualmin called default@foo.com, it fails with "Failed to save alias : A mailbox or mail alias with the same name and domain already exists"

solution:

maybe instead of "default-foo.com" you should call it something like "catchall_foo.com"

that way regular aliases get added as "something-foo.com" and a catchall is added as "catchall_foo.com" rather than "default-foo.com" that way a catchall cannot clash with a regular alias.

then again, this only prevents the "default@foo.com" user/alias address from being added, so it's not a huge issue, but an issue nonetheless.

While you are correct that a clash can happen, the address "default" is a pretty uncommon one, so changing this is pretty low priority..

exactly my point. very low priority. ;)