Install postfix.
sudo apt-get install postfixSome console app for sending emails can be handy too:
sudo apt-get install muttEdit /etc/postfix/main.cf. In mydestination enter host, host.domain, localhost.domain, and also empty domain:
mydestination = serverek.przepompownia.com, localhost.przepompownia.com, , localhostRestart postfix. I'm not sure if it is really needed, but won't hurt ;)
sudo /etc/init.d/postfix restartOk, now edit /etc/aliases. Add something like this:
root: franek franek: mickey@my.mail.comDont forget to run:
sudo newaliasesThis way everything sent to root is forwarded to franek, and everything sent to franek is forwarded to mickey@my.mail.com
Now you can try sending some mail to "root". You can use mutt for this.
UPDATE:
Recently my ISP (neostrada, TPSA) blocked outgoing connections to port 25 (standard port for connecting with SMTP servers). What to do to send emails to port 587 is well described here. Author only forgot to add that you also need this:
transport_maps = hash:/etc/postfix/transportin your main.cf
No comments:
Post a Comment