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.
Because of its functional simplicity E-MailRelay is easy to configure, often only requiring the address of the target SMTP server to be put on the command line.
E-MailRelay can also run as a POP3 server. Messages received over SMTP can be automatically dropped into several independent POP3 mailboxes.
C++ source code is available for Linux, FreeBSD, MacOS X etc, and Windows. Distribution is under the GNU General Public License V3.
E-MailRelay can be downloaded from SourceForge. Linux, Mac and Unix users should build from source if possible using the usual "./configure ; make ; make ; sudo make install" incantation and Windows users should use the self-extracting installer.
To run the program as a proxy use the "--as-proxy" command-line switch followed by the address of the target SMTP server. If you want to edit or filter e-mail as it passes through the proxy then specify your filter program with the "--filter" switch.
To run the program as a store-and-forward MTA use the "--as-server" switch to start the storage daemon, and then use "--as-client" followed by the address of the target SMTP server to trigger forwarding of spooled mail.