To install is very easy:
1 sudo aptitude install exim4 exim4-base
and to configure simply run:
1 sudo dpkg-reconfigure exim4-config
and in the first dialog (image below) select "internet site". For all next options I used the defaults that would allow local users and services to send emails locally and to remote addresses (i.e. gmail accounts).
Now to test the new server you can send a simple email to your Gmail account:
1 mail -s test mygmail@gmail.com
2 test mail
3 .
4 Cc:
The "-s" switch is the mail subject. After the command simply type whatever you want in the mail body. To finish the email press
Now say you want to receive LogWatch reports or any other mail directed to root in your Gmail account. Then you can simply create an alias in the "/etc/aliases" file like:
1 # Added by installer for initial user
2 root: mygmail@gmail.com
then rebuild the aliases database
1 sudo newaliases
If you require more complex mail configurations you may check my previous posts about Sendmail and Postfix setup in (K)Ubuntu here.
No comments:
Post a Comment