HOWTO Setup Nullmailer

From Research
Revision as of 23:12, 1 December 2006 by Gordp (talk | contribs) (→‎Testing)
Jump to navigation Jump to search

From the authour's web-site: Nullmailer is a mail transport agent designed to only relay all its messages through a fixed set of "upstream" hosts. It is also designed to be secure.

Install Nullmailer

# emerge nullmailer -va

This may pull in supervise-scripts, which will then require:

hostname ~ # rc-update add svscan default
hostname ~ # ln -fs /var/nullmailer/service /service/nullmailer

and

hostname ~ # /etc/init.d/svscan start

Configuration

Edit the following files to configure the machine to send mail to our mailing server (Bismarck).

/etc/nullmailer/adminaddr

admin@siat.sfu.ca

/etc/nullmailer/defaultdomain

iat.sfu.ca

/etc/nullmailer/me

$hostname.iat.sfu.ca

/etc/nullmailer/remotes

bismarck.iat.sfu.ca smtp

Status

hostname ~ # mailq

Testing

(note: you may have to emerge mailx to get the mail command)
Send a message to root, then wait a brief moment for it to be picked up and sent onwards.

hostname ~ # mail -s "this is a nullmailer test" root
Type your message, complete it with a ctrl-D + Enter

If everything is going properly, the adminaddr should receive a shiny new message in a short period of time!