forwarding a non-domain email account

I'm trying to create a plan that does not host email for the domain but does forward mail for the local user to a third-party email account. For example, we would host example.com. The local user "example.com" would be created and a valid email account "example.com@my.hostname.tld" would also be created. I'd like to forward mail for "example.com" (and by association, example.com@my.hostname.tld") to the end-user's gmail account.

I looked at http://virtualmin.com/node/18993 but I don't even have the "primary email address enabled" available. What Plan or Server Template switch turns that on?

Cheers, -Chris

Status: 
Active

Comments

One way to do this would be to create a .procmailrc file in the user's home directory containing :

:0
user@gmail.com

Thanks for the tip, but :

I looked at http://virtualmin.com/node/18993 but I don't even have the "primary email address enabled" available. What Plan or Server Template switch turns that on?

Even without the Mail for Domain feature enabled, following the steps Jamie mentioned will cause any locally generated email to be sent to your Gmail account.

If you want to be able to receive mail for "example.com" from external servers -- you'd need to enable the "Mail for Domain" feature for the Virtual Servers you're adding.

If Mail for Domain isn't enabled, you wouldn't see a lot of the email related options for your accounts.

So, there is no Virtualmin/GUI form to allow virtual server owners to set their own forwarding target through a webby interface without the "Mail for Domain" plan or server template feature enabled,?

Jamie's example above was just a way to accomplish forwarding locally generated email to a remote account, without actually enabling the "Mail for Domain" option.

However, to gain access to the full set of Virtualmin's email features -- you would want to enable Mail for Domain. And once you do that, you can use Virtualmin's GUI to setup mail forwarding.

Once Mail for Domain is enabled, you can forward mail for your primary user by going into Edit Virtual Server -> Mail forwarding settings (once mail for this account is enabled).

And, you can also go into Edit Aliases to setup a new alias that forwards to a remote account.