POSTOFFICE.CF(5)

NAME
postoffice.cf - configuration file for postoffice

SYNOPSIS
@confdir@/postoffice.cf

DESCRIPTION
This file contains various configuration settings for the postoffice mail server. All of the settings listed here can also be passed directly to the postoffice server via the -o command line argument.

The format of the configuration file is one setting per line, with blank lines and lines beginning with # ignored as comment lines. The settings are:

audit
    Enable session auditing.

blacklist=option
    Configure how postoffice deals with blacklisted sites.

    blacklist=accept
        Allow blacklisted sites to connect and treat them as if they were a normal site.

    blacklist=bounce
        Refuse connections from blacklisted sites.

    blacklist=folder:path
        Accept mail from blacklisted sites and place it in the users blacklisted mail folder. If Accept the spam-infested message and deliver it to the users ‘path’ begins with ‘~/’, it will be expanded to that file in the user's home directory. If it does not begin with ‘~/’, it will be expanded to a folder in the maildir named username:path. Non-local users (and users in a virtual domain) will have mail delivered as if you had configured ‘blacklist=accept’.

checkhelo
    Check the arguments passed with the HELO and EHLO SMTP command and refuse to do an SMTP conversation with the client if they claim to be the mail server.

clients=N
    Allow only N clients at a time to connect to the server.

debug
    Enable the ESMTP ‘DEBUG’ command, which displays various compile and runtime settings, as well as the current state of the mail envelope. This is useful for some types of debugging, but it may expose internal information to the public.

delay=N
    Set the greylisting delay to N seconds. The delay may be specified as a tagged number, with ‘m’ being minutes. and ‘h’ being hours.

escape-from=N
    If nonzero, all lines beginning with 'From ' in the body of the message will be prefixed by '>'. Some mail readers can't handle raw 'From ' lines in the middle of a message and will treat them as the start of a new message, so mangling the message like this will stop them from getting confused. @MILTERMAN@.It Li filter Ns = Ns Ar socket @MILTERMAN@Defines a sendmail filter that will scan incoming mail @MILTERMAN@before @MILTERMAN@.Em postoffice @MILTERMAN@accepts it. The @MILTERMAN@.Ar socket @MILTERMAN@can be either a Unix-domain socket on the local machine @MILTERMAN@or a tcp socket on any machine. @MILTERMAN@Note that postoffice uses the dns @MILTERMAN@.Em exclusively Ns , @MILTERMAN@so you need to give the fully qualified domain name of @MILTERMAN@the machine that the filter is running on. If you don't, @MILTERMAN@the filter just won't be called. @MILTERMAN@If enabled, the @MILTERMAN@.Em DEBUG @MILTERMAN@smtp command lists all of the currently configured filters @MILTERMAN@and their status. A status of 00h or 0h1 means that the @MILTERMAN@filter is active; anything else indicates an error.

forward-all
    When set, forward all unknown mail to the configured relay-host.

hops=N
    Set the hop count to N. The hop count is incremented every time the mail is processed. When it reaches this limit, the mail is returned with an error message (the default is 100 hops).

hostname=name
    Set the local host name. Normally, postoffice.cf find the local hostname by first getting the machine name, then looking that name up in the DNS (defaulting to "localhost" if either of these steps fail.) You can tell postoffice.cf to just use the machine name by setting hostname=literal, or to use name by setting hostname=name.

immediate
    Attempt to deliver mail to remote machines immediately instead of waiting for the next queue run.

load=N
    When the load average is above N, postoffice will not accept SMTP connections (the default is 4).

localmx
    Treat connections from sites that use this machine as an MX as if they were local, and give them the permissions that local clients have. @STATFS@.It Li minfree Ns = Ns Ar N @STATFS@Stop accepting mail when there are less than @STATFS@.Ar N @STATFS@kilobytes available on the mail spool volume. @STATFS@.Xr minfree @STATFS@is given as a tagged number, @STATFS@with @STATFS@.Ql m @STATFS@being megabytes, @STATFS@and @STATFS@.Ql g @STATFS@being gigabytes

msp If set, postoffice accepts connections on port 587 as well as the normal port 25. This allows access from mail clients that live behind firewalls which block port 25.

nodaemon
    Do not accept mail from <>. This can be useful for blocking spammers and viruses, but it also violates and means that nobody at your site (including mailing lists) will ever get bounce messages when mail cannot be delivered. If your machine is connected to a public network, DON'T SET THIS OPTION unless you're under attack from a malicious spammer.

paranoid
    Do not accept mail from sites unless we can resolve their dns address.

qreturn=N
    Bounce undeliverable mail after N seconds. The qreturn may be specified as a tagged number, with ‘m’ being minutes, ‘h’ being hours, and ‘d’ being days.

relay
    Allow all clients to relay mail through this server. If your machine is connected to a public network, DON'T SET THIS OPTION, unless you really want to end up on every antispam blacklist on the planet.

relay-host=host
    Send all mail destined for remote hosts via this host. The superuser is the only user that can use this setting on the command line or in a configuration file other than /etc/postoffice.cf

self=host
    Set our hostname to host. Postoffice normally uses the uname() system call to determine the machine name, but you can set it to just about anything here.

size=size
    Sets the largest message size that postoffice will accept. size is given as a tagged number, with ‘k’ being kilobytes, and ‘m’ being megabytes.

spam=option
    Configure how postoffice deals with spam.

    spam=accept
        Accept the spam-infested message and deliver it like a normal message. postoffice will add an ‘X-Spam’ header to the message to warn the user that this message might be spam.

    spam=bounce:why
        Refuse to accept the spam-infested message with a 5xx error during the ‘DATA’ phase of the smtp session. why is the explanation for why it's being bounced. It is optional and if not supplied the message will be bounced with a default message why.

    spam=folder:path
        Accept the spam-infested message and deliver it to the users spam mail folder. If ‘path’ begins with ‘~/’, it will be expanded to that file in the user's home directory. If it does not begin with ‘~/’, it will be expanded to a folder in the maildir named username:path. Non-local users (and users in a virtual domain) will have the spam-infested mail delivered as if you configured ‘spam=accept’.

timeout=timeout
    Drop the connection to a client if they are idle longer than timeout. This setting violates the word (if not the intent) of the SMTP specification, so the timeout should probably be fairly large. The timeout may be specified as a tagged number, with ‘m’ being minutes, ‘h’ being hours, and ‘d’ being days. For example, ‘timeout=60m’ or ‘timeout=1h’ both set the timeout to one hour.

trusted=host
    Treat connections from host as if they were local, and give them the permissions that local clients have. Host may be a hostname or an ip address quoted with square brackets (ie: [10.0.10.5])

usermap=pattern:target(s)
    Define personal aliases (the format is described in the usermap(7) manpage.)

verify-from=flag
    Check the validity of MAIL FROM addresses. If nonzero (the default), the address will be rejected if it's from an unresolvable domain or if a remote client attempts to give a local address, and if zero, anything the client gives is okay with postoffice.

SECURITY CONSIDERATIONS
Postoffice will not run if postoffice.cf is not a file, is not owned by root, is world writable, or lives in a @confdir@ that has any elements that are not owned by root, are world writable, or are not directories.

SEE ALSO
usermap(7), postoffice(8)