Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I run a simple server that I administrate remotely, and I need it to be able to send an email to my personal email address every time an error occurs. With the default setup on Ubuntu, sendmail just accumulates emails in /var/spool/mail that are to be sent locally, but I need it to go to an external email.

The tutorials I've found all talk about setting up postfix/sendmail as a full-fledged email server, but I just need outgoing only, no external logins. Is there an easy way to do this?

share|improve this question

4 Answers 4

You should also pay attention if you need a relay host and define it (DSmy.relay.host)

share|improve this answer

Maybe nullmailer is for you.

share|improve this answer

Open /etc/aliases with a text editor (using sudo) and change the root line to be your email address, or add another line with your local user in it on the left hand side, and on the right hand side enter your email address:

root:        my@email.com

then after saving the aliases file, run newaliases command:

$ /usr/bin/newaliases

Both sendmail and postfix are configured by default to send outbound mail on most systems.

share|improve this answer

Check that your server is open to the world in port 25 ( outgoing only). And the dns is configured correctly. You are not suppose to do anything to sendmail for sending outgoing mails.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.