Mailtest

Mailtest is an email policy test harness. It's copyright under the GNU General Public License.

Download it here (v0.2)

It contains tests for the following (these are the payload files):

And these raw files: Simply run the mailtest script and all the payload files are transmitted to the configured recipients. Alternatively, specify the filename on the command-line and only that file will be sent.

The payload files are drop-ins. Make your own and drop into the mailfiles directory with an extension of .msg. These messages are given extra To and Subject headers, so best not to have these in the file, or the result will be undefined. The subject will be "Test message NNN filename" where filename is the filename containing the message and NNN is a sequence number, essentially the date and time that the test run was kicked off.

Files ending in .raw contain From: and To: content headers that are used as envelope FROM and RCPT addresses. It may be useful to have special mailertable/transports rules for such recipients to force them at the target MTA. Raw test files must provide their own Subject and To addresses (see sendmail's -t switch).

In both file types, if the first line starts with from-space (/^From /) the address given on the line will be used as the envelope sender address. If not specified, the user running the test will most likely be used, as per local MTA configuration.

The recipients file contains a list of recipient addresses to send all the messages to, with the exception of the .raw messages of course. The included virus is the EICAR test virus.

Each provided payload contains an X-Test: header describing the payload. This assists in correlating the messages at their final destinations. This is true for both raw and msg files.

Yeah, the doco is crap - volunteers welcome. Read the source!

Comments, submissions welcome: jeremy+mailtest@laidman.org