HOWTO Setup Nullmailer: Difference between revisions

From Research
Jump to navigation Jump to search
Line 31: Line 31:
'''/etc/nullmailer/remotes'''
'''/etc/nullmailer/remotes'''
  bismarck.iat.sfu.ca smtp
  bismarck.iat.sfu.ca smtp
'''NOTE:'''
Suddenly, for one server only, mail stopped.  mailq shows that delivey was attempted to defaulthost.iat.sfu.ca but failed :-(<br>
This was resolved by creating a new file:  '''/etc/mailname''' with the fully-qualified hostname.  Keep an eye open for similar breakage on other machines.<br>
July 31, 2012 - GRP.


== Status ==
== Status ==

Revision as of 16:23, 31 July 2012

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.
We use nullmailer on a number of servers, where minimalist functionality is all that is required. All mail (typically only cron-job outputs, like logwatch and tripwire are then sent to our research-admin mailing-list, on bismarck.iat.sfu.ca. From bismarck, the admin-list will fire off copies to all subscribed research-administrators.

Install Nullmailer

hostname ~ # emerge nullmailer -va

This may pull in sys-process/supervise-scripts (or, you can emerge it manually), which will then require:

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

Note: you may have to create the /service directory first, by hand...

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


NOTE: Suddenly, for one server only, mail stopped. mailq shows that delivey was attempted to defaulthost.iat.sfu.ca but failed :-(
This was resolved by creating a new file: /etc/mailname with the fully-qualified hostname. Keep an eye open for similar breakage on other machines.
July 31, 2012 - GRP.

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!