E-MailRelay Readme

Abstract

E-MailRelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA). When running as a proxy all e-mail messages can be passed through a user-defined program, such as a spam filter, which can drop, re-address or edit messages as they pass through. When running as a store-and-forward MTA incoming messages are stored in a local spool directory, and then forwarded to the next SMTP server on request.

E-MailRelay can also run as a POP3 server. Messages received over SMTP can be automatically dropped into several independent POP3 mailboxes.

E-MailRelay uses the same non-blocking i/o model as Squid and Nginx giving excellent scalability and resource usage.

C++ source code is available for Linux, FreeBSD, MacOS X etc, and Windows. Distribution is under the GNU General Public License V3.

Quick start

To use E-MailRelay in store-and-forward mode use the --as-server option to start the storage daemon in the background, and then trigger delivery of spooled messages by running with the --as-client option and the address of the target host.

For example, to start a storage daemon listening on port 10025 use a command like this:

emailrelay --as-server --port 10025 --spool-dir /tmp

And then to forward the spooled mail to smarthost run something like this:

emailrelay --as-client smarthost:25 --spool-dir /tmp

To get behaviour more like a proxy you can add the --poll option so that messages are forwarded continuously rather than on-demand. This example starts a store-and-forward server that forwards spooled-up e-mail every hour:

emailrelay --as-server --poll 3600 --forward-to smarthost:25

For a proxy server that forwards each message as it is being received, without any delay, you can use the --as-proxy mode:

emailrelay --as-proxy smarthost:25

If you want to edit or filter e-mail as it passes through the proxy then specify your pre-processor program with the --filter option, something like this:

emailrelay --as-proxy smarthost:25 --filter /usr/local/bin/addsig

To run E-MailRelay as a POP server without SMTP use --pop and --no-smtp:

emailrelay --pop --no-smtp --log --close-stderr

The emailrelay-submit utility can be used to put messages straight into the spool directory so that the POP clients can fetch them.

By default E-MailRelay will always reject connections from remote machines. To allow connections from anywhere use the --remote-clients option, but please check your firewall settings to make sure this cannot be exploited by spammers.

On Windows add --hidden to suppress message boxes and also add --no-daemon if running as a service.

For more information on the command-line options refer to the reference guide or run:

emailrelay --help --verbose

Documentation

The following documentation is provided:

Source code documentation will be generated when building from source if doxygen is available.

Configurations

Recent releases were developed on Ubuntu Linux 12.04 using:

and on Windows 7 using:

The code was originally developed on SuSE Linux 7.1 using:

and on Windows 98 using:

Versions of the code have also been built successfully on:

Feedback

Please feel free to e-mail the author at mailto:graeme_walker@users.sourceforge.net or the SourceForge mailing list mailto:emailrelay-help@lists.sourceforge.net.