Page 1 of 1

[ TUTORIAL ] How to create a root forwarder get server mail

Posted: Tue Jun 17, 2014 1:05 am
by jonn
We will show you how to create a simple ROOT mail forwarder.

If you're like us we like to know what's going on inside our servers 24/7, so we make it mandatory to create a root forward.

Lets do this.
Now we use Debian, exim4, dovecot So give it a go, its real easy to do.

First create an email just for the root forward setup.
Its good practice to separate this mail as you may want to have stronger spam filters or special conditions in place just for this mail address.

Do that now, let's call it [email protected] , or create your own custom email alias.
OKAY you're done. Lets continue.

============================================/

1) Login SSH root

2) Type this:

Code: Select all

nano /root/.forward
3) Now add the email address you created to the new .forward file, like this;
Save & Confirm with F2, type y & press enter.

4) Now lets test if it works.

Stay in the current session and type:

Code: Select all

echo TEST | mail -s "Hello root you have mail" root
Go check the log.

Code: Select all

nano /var/log/exim4/mainlog
Now check your email with whatever client you use. You should receive the email you just sent.

That's it, now all your mail to root will forward to the created email.


:)

Re: [ TUTORIAL ] How to create a root forwarder get server m

Posted: Sat Jun 28, 2014 5:03 pm
by imperio
Thank you for your help