Zero-Mailer

This Zero-Mailer is even less than a nullmailer. It is a sendmail replacement which (basic configuration) send all mails to a single email address (ignoring the destination address).

It’s desigend for servers, which are no mail servers, and only sends logs, notices and such things. So all other software (may be scripts, used from the web-server) have to use a SMTP server for outgoing mail (e.g. forum).

It can be configred that when sendmail is invoked by a user, that all those mails are going to another address. (the users which calls sendmail is important, not the destination).

example configuration:
[default]
to = "destination@address"
from = "sender@address"
subject = "[Server] [To: %TO%] %SUBJECT%"

You can add more entries in that form, which usernames instead of “default”, in that case all mails sent by that user will be send to the specified address.

The options in detail:

  • disabled, optional, defaults to false, if true no mail will be sent (for that user)
  • to, required, the destination
  • host, optional, the destination host, if omitted the MX record of the to address will be used
  • subject, optional, the subject, defaults to “%SUBJECT%” (placeholders: %SUBJECT% the original subject, %TO% the list of original recipients)
  • from optional, the sender address, default to “user@hostname

Files:

  • /etc/zeromail.conf
  • /usr/sbin/sendmail

You may have problems after uninstalling all MTA software, because some software (e.g. logcheck) requires an installed MTA. I’ve fixed that problem by installing an dummy deb-package, which (says that it) provides an MTA.

This is the way I’m using it on my server and a proof of concept.

Some more explanations in the source.

Download:

zeromailer 0.3 (7.2 KiB, 15. June 2010)

1 Response to “Zero-Mailer”


Leave a Reply