Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  EMAILRELAY (1)


emailrelay - e-mail transfer agent and proxy


See Also


emailrelay [OPTIONS]

emailrelay --as-server

emailrelay --as-client server-address

emailrelay --as-proxy server-address


emailrelay is a simple SMTP proxy and store-and-forward message transfer agent. It does store-and-forward mail relay to a fixed next-hop server, without any routing.

It runs in two main modes: a storage daemon (--as-server) and a forwarding agent (--as-client). The storage daemon is an SMTP server which stores e-mail messages in a local spool directory. The forwarding agent acts as an SMTP client sending the spooled e-mail messages on to the next SMTP server in the chain.

It can also run in a third mode, as a proxy server (--as-proxy). In this mode all messages are forwarded immediately to the next-hop server. Messages are only fully accepted from the sender once they have been successfully delivered to the next-hop server.


-a, --admin <admin-port>
  Enables the administration interface and specifies its listening port number.
-Q, --admin-terminate
  Enables the terminate command on the admin interface.
-A, --anonymous
  Disables the smtp vrfy command and sends less verbose smtp responses.
-q, --as-client <host:port>
  Runs as a client, forwarding all spooled mail to <host>: equivalent to --log --no-syslog --no-daemon --dont-serve --forward --forward-to.
-y, --as-proxy <host:port>
  Runs as a proxy server, forwarding each mail immediately to <host>: equivalent to --log --close-stderr --poll=0 --forward-to.
-d, --as-server
  Runs as a server, storing mail in the spool directory: equivalent to --log --close-stderr.
-C, --client-auth <file>
  Enables smtp authentication with the remote server, using the given secrets file.
-Y, --client-filter <program>
  Specifies an external program to process messages when they are forwarded.
-j, --client-tls
  Enables negotiated tls/ssl for smtp client (if openssl built in).
-b, --client-tls-connection
  Enables smtp over tls/ssl for smtp client (if openssl built in).
-e, --close-stderr
  Closes the standard error stream soon after start-up.
-U, --connection-timeout <time>
  Sets the timeout (in seconds) when connecting to a remote server (default is 40).
-g, --debug
  Generates debug-level logging if built in.
-D, --domain <fqdn>
  Sets an override for the host’s fully qualified domain name.
-x, --dont-serve
  Disables acting as a server on any port (part of --as-client and usually used with --forward).
-z, --filter <program>
  Specifies an external program to process messages as they are stored.
-W, --filter-timeout <time>
  Sets the timeout (in seconds) for running the --filter processor (default is 300).
-f, --forward
  Forwards stored mail on startup (requires --forward-to).
-o, --forward-to <host:port>
  Specifies the remote smtp server (required by --forward, --poll, --immediate and --admin).
-h, --help
  Displays help text and exits.
-m, --immediate
  Enables immediate forwarding of messages as soon as they are received (requires --forward-to).
-I, --interface <ip-list>
  Defines the listening interface(s) for incoming connections (comma-separated list with optional smtp=,pop=,admin= qualifiers).
-l, --log
  Writes log information on standard error and syslog (but see --close-stderr and --no-syslog).
-L, --log-time
  Adds a timestamp to the logging output.
-t, --no-daemon
  Does not detach from the terminal.
-X, --no-smtp
  Disables listening for smtp connections (usually used with --admin or --pop).
-n, --no-syslog
  Disables syslog output (always overridden by --syslog).
-i, --pid-file <pid-file>
  Defines a file for storing the daemon process-id.
-O, --poll <period>
  Enables polling of the spool directory for messages to be forwarded with the specified period (zero means on client disconnection) (requires --forward-to).
-B, --pop
  Enables the pop server.
-F, --pop-auth <file>
  Defines the pop server secrets file (default is /etc/emailrelay.auth).
-J, --pop-by-name
  Modifies the pop spool directory according to the pop user name (requires --pop).
-G, --pop-no-delete
  Disables message deletion via pop (requires --pop).
-E, --pop-port <port>
  Specifies the pop listening port number (default is 110) (requires --pop).
-p, --port <port>
  Specifies the smtp listening port number (default is 25).
-w, --prompt-timeout <time>
  Sets the timeout (in seconds) for getting an initial prompt from the server (default is 20).
-r, --remote-clients
  Allows remote clients to connect.
-T, --response-timeout <time>
  Sets the response timeout (in seconds) when talking to a remote server (default is 1800).
-S, --server-auth <file>
  Enables authentication of remote clients, using the given secrets file.
-K, --server-tls <pem-file>
  Enables negotiated tls/ssl for smtp server using the given openssl certificate file (which must be in the directory trusted by openssl).
-M, --size <bytes>
  Limits the size of submitted messages.
-s, --spool-dir <dir>
  Specifies the spool directory (default is /var/spool/emailrelay).
-k, --syslog
  Forces syslog output if logging is enabled (overrides --no-syslog).
-0, --tls-config <flags>
  Sets tls configuration flags (eg. 2 for SSLv2 support).
-u, --user <username>
  Names the effective user to switch to if started as root (default is daemon).
-v, --verbose
  Generates more verbose output (works with --help and --log).
-Z, --verifier <program>
  Specifies an external program for address verification.
-V, --version
  Displays version information and exits.


GNU style...

FHS style...


E-MailRelay user guide, .
E-MailRelay reference, .
emailrelay-submit(1), emailrelay-passwd(1),


Graeme Walker,
Search for    or go to Top of page |  Section 1 |  Main Index

--> EMAILRELAY (1) local

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.