Debian, minimum to send mail but not receive any

From Andreida

nullmailer

(source)

  • install
apt-get install nullmailer mailutils
  • Fully qualified domain name: yourCurrentServer (does NOT to have be fully qualified)
  • SMTP server: imap.yourdomain.com

It should work now, but you can tweak inside /etc/nullmailer/ the following files:

  • inside /etc/nullmailer
    • adminaddr - target mail (not understood yet by me, sorry)
    • defaultdomain - source mail (so the sender not root@server but root@server.domain.com)
    • remotes - target login


from debian.org:

adminaddr If this file is not empty, all recipients to users at either "localhost" (the literal string) or the canonical host name (from /etc/mailname) are remapped to this address. This is provided to allow local daemons to be able to send email to "somebody@localhost" and have it go somewhere sensible instead of being bounced by your relay host. To send to multiple addresses, put them all on one line separated by a comma.