Complex Aliases

First off, sorry for the double post, but I got no response in the newbie’s forum - I guess this is more of a virtualmin specific question anyway…could use some help here…

I have a significant number of aliased websites setup and I’ve been fighting email alias for quite some time now. I have created a user for each website for email use only, I want the email that is sent to these accounts to drop the mail into a local accounts on the server and also to forward it to a central account. So my command line setup is like this:

virtualmin create-domain --domain example.com --pass password --alias parent.com --default-features

This creates the aliased site - example.com. Then I run:

virtualmin create-user --domain example.com --user dan --pass password

this creates two users: dan@example.com and dan-example.com

I then run this command

virtualmin create-simple-alias --domain example.com --from dan --forward dump@example.com --local dan-example.com

This creates functionality that I want - i.e. I have two aliases - one to dump the email to the local box, one to forward it to dump@example.com -

Is this the best way to accomplish what I’m after? i.e. do I need to have an alias pointing to the local user in order to receive email there?

Here’s the problem:

This alias doesn’t show up in virtualmin. “edit mail aliases” is empty but if I click on “edit manually” I get this warning: “1 aliases were not displayed below, as their destinations are too complex to edit manually,” so it’s in the system but not accessible via Virtualmin.??

When I click on “webmin/servers/postfix mail server/mail aliases” I can see the two aliases. Since they are not showing up in the virtualmin window, it does not look like I can access this alias via the command line interface. Is this a bug? or is this how it is designed? I need to be able to manage these aliases via command line (actually through PHP but using the command line interface). when I make a list-alias call - I get an empty set (I have deleted the catch all forwarder).

Is there a better way to set up the system to deliver mail locally? or I’m I stuck with this?

Thanks

Dan

This one was a bugger but you can access the information using the list-user command line API with the multiline argument - this will give you a field with “forwarders” in it. (thanks to Jamie for pointing this one out)

And then you can use “modify-user” command api and the --add-forward and --del-forward commands (THIS IS CURRENTLY NOT IN THE DOCUMENTATION). but if you type “virtualmin modify-user --help” it will give you the correct format and will include all of the functions available. (including --local, --no-local, --autoreply, etc) that are not in the website docs. I have requested that they update the website.

Dan