[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to forward local mail to external address?



Thank you guys.


On Tue, Feb 5, 2013 at 3:00 PM, Frank Lanitz <frank@frank.uvena.de> wrote:
Am 05.02.2013 05:46, schrieb David Guntner:
> Magicloud Magiclouds grabbed a keyboard and wrote:
>> Hi,
>>   By default, many tools like cron will send mails to local, like
>> magicloud@localhost.
>>   Now I want these mails to be relayed to my company mail address. So I do
>> not have to configure all tools to send mail directly to my company
>> address. I used to have it on another host, but I forgot how to do it.
>>   I am using exim4.
>>   Thanks.
>
> For cron, one common way is to add a line to the top of the crontab
> entry for the user that cron is running the jobs for, like this:
>
> MAILTO="user@othermachine.com"
>
> If you want all mail that's being sent to a local address to be
> forwarded, you can put a .forward file in the home directory of the
> user that's receiving the mail, with the address to be forwarded to in
> it.  No other text is needed, just the address.

A third way is to add an entry to /etc/aliases. E.g. you could do
magicloud: localuser, remot_mail@example.org

Of course, you will need to tell exim4 to send mails out. Maybe you like
to rerun dpkg-reconfigure exim4-config.

Cheers,
Frank





--
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

Reply to: