Forward mail to another address

Hi,

I’ve set up an OpenSUSE server, and successfully configured postfix to manage mail for our domain. However, I would like to forward emails sent to some addresses on to other addresses. For example, mail sent to:

local_user@mydomain.com

is delivered as normal, but also forwarded to:

xyzwhatever@whatever.com

How do I do this?

Cheers,
Pete

Hi
Use (as in add the users) the /etc/aliases file and run newaliases after
the changes.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel 2.6.27.21-0.1-pae
up 5 days 9:06, 2 users, load average: 0.24, 0.18, 0.18
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

To be more specific, you need a line like this in /etc/aliases:

local_user: \local_user,xyzwhatever@whatever.com

The \ prevents recursive expansion of local_user. You can also do this in ~local_user/.forward without the leading local_user:.

OK. I didn’t know i could put full email addresses into the aliases file, i thought it might be just local usernames. Thats cool. So I would set “local_user” and “xyzwhatever@whatever.com” as aliases for “local_user” ?

You need to do this:

local_user: \local_user,xyzwhatever@whatever.com

The \ stops recursive expansion of local_user.

Fantastic! Just what I needed to know. Thanks.