"courier start" starts the server by running /usr/lib/courier/courierctl.start in the background. "courier stop" immediately stops all the Courier mail server processes and aborts all current mail deliveries. "courier restart" restarts the Courier mail server server. A restart is often needed for certain configuration changes to take effect. "courier restart" waits for all current deliveries to complete before restarting. This is the "nice" way to restart the mail server. "courier flush" takes all undelivered messages in the queue and attempts to deliver them immediately, instead of waiting until their next scheduled attempted delivery time. "courier flush" can be optionally followed by a message queue ID in order to schedule an immediate delivery attempt for only a single message. Message queue IDs are displayed by the m[blue]mailq(1)m[][1] command.
Please note that courier start runs the main Courier mail server scheduling engine only. It does not start any other daemons that you may have, such as the ESMTP or the IMAP daemon.
"courier show all" lists all E-mail addresses currently blacklisted for backscatter. "courier clear user@domain" manually clears <user@domain> from the backscatter blacklist. "courier clear all" removes all addresses from the backscatter blacklist. When the Courier mail server encounters a delivery failure to an E-mail address the Courier mail server may stop accepting any more messages to the same address in order to minimize generation of so-called "backscatter bounces". This does not occur in all cases, see "Backscatter suppresion" in the Courier mail server's installation instructions for more information.
The Courier mail server will resume accepting messages to the blacklisted address if the delivery attempt originally encountered a temporary failure, and a subsequent retry succesfully delivered the message, or if more than two hours elapsed since the delivery failure. Use the "clear" command to manually clear the E-mail address from the backscatter blacklist. This may be useful if the undeliverable message is manually removed from the Courier mail server's mail queue, using the "cancel" command. Even if the message is cancelled, the Courier mail server will continue to refuse accepting mail for this address for up to two hours. The "clear" command can be use to reenable mail acceptance before then.
The Courier mail server uses several configuration files which are located in /etc/courier. These configuration files are plain text files that can be modified with any text editor. In certain instances a subdirectory is used, and all plain text files in the subdirectory are concatenated and are considered to be a single, consolidated, configuration file. Unless otherwise specified, you must run courier restart for any changes to these files to take effect.
aliasfilteracct
When mail filtering is enabled, local recipients have the ability to define mail filters which can selectively reject unwanted mail. /etc/courier/aliases may define local mail aliases that contain one or more recipients. If it is desired to use local mail filtering for mail addressed to an alias address, designate a local account that will be used to specify filtering instructions, and put its home directory into this control file. The filtering argument will be "alias-address" where address is the name of the alias. See m[blue]localmailfilter(7)m[][2] for more information.
Due to technical limitations, content filtering is not available for multiple-recipient aliases.
Changes to this file take effect immediately.
authdaemonrc
authldaprc
authmysqlrc
autoresponsesquota
The autoresponsesquota file contains one line: "Cnnn" or "Snnn" (or both strings, on the same line). Cnnn: allow up to #nnn autoreplies to be created. Snnn: allow up to #nnn bytes as the total size of all autoreplies, combined. If both Cnnn and Snnn are specified, both quotas apply. If this file does not exist, there is no limit on autoreplies. This quota setting applies systemwide. To override the quota setting for a particular Maildir, create the autoresponsesquota file in that Maildir (which takes precedence).
backuprelay
Mail gets rerouted if it cannot be delivered after the time interval specified by the warntime configuration file. When backuprelay is provided a delayed delivery status notification will NOT be generated. The message will be rerouted even if the recipient's delivery status notification setting does not include a delayed notification request.
This feature is intended for use by relays that handle large quantities of mail, where you don't want to accumulate a large mail queue for unreachable mail servers. Please note that ALL undeliverable mail will be rerouted in this fashion. Even if the recipient of a message is a local recipient - and the recipient's mail filter is rejecting the message with a temporary error code - the message will still be rerouted if it's undeliverable after the specified amount of time.
Although currently SMTP is the only meaningful application for this feature, the Courier mail server is a protocol-independent mail server, and the backup relay function can be extended to other protocols, as they become available.
Multiple backup relays can be used by simply assigning multiple IP addresses to the same machine name. Note that the Courier mail server checks for both MX and A records for the machine specified in this configuration file.
It's important to note that when this setting is specified, warning messages get turned off for all messages, including messages addressed to local recipients. If a temporary delivery error prevents a message from being delivered to a local mailbox, it remains in the queue until the temporary error condition gets cleared. Normally, if the message remains in the queue beyond the warning interval, the warning message gets generated. When this setting is specified, the warning message gets replaced with a forward to the backup relay, but this occurs only for messages that are delivered via SMTP.
batchsize
bofh
badfrom user@domain
badfrom @domain
badfrom @.domain
badfrom user@.domain
badmx N
freemail domain [domain2] [domain3]...
spamtrap user@domain
maxrcpts N [hard]
opt BOFHBADMIME=action
BOFHBADMIME=accept implies MIME=none (see m[blue]submit(8)m[][5] for more information).
opt BOFHCHECKHELO=1
opt BOFHHEADERLIMIT=n
opt BOFHNOBASE64TEXT=1
opt BOFHSPFHELO=keywords
SPF checking is not used for HELO or EHLO commands that specify an IP address instead of a domain name.
opt BOFHSPFMAILFROM=keywords
opt BOFHSPFFROM=keywords
opt BOFHSPFHARDERROR=keywords
The default setting for BOFHSPFHARDERROR is fail,softfail.
opt BOFHSPFTRUSTME=1
opt BOFHSPFNOVERBOSE=1
opt BOFHSUPPRESSBACKSCATTER=list
"list" is a comma-separated list of message sources. The possible message sources are:
authsmtp
smtp
none
The default setting is "opt BOFHSUPPRESSBACKSCATTER=smtp". The other possible values are "opt BOFHSUPPRESSBACKSCATTER=smtp,authsmtp" (which suppresses backscatter from all SMTP mail), and "opt BOFHSUPPRESSBACKSCATTER=none".
calendarmode
echo "local" >/etc/courier/calendarmode
courierd
defaultdomain
When the ESMTP server receives a "RCPT TO" command containing the address <user@[ip.address]>, and the IP address is the same as the IP address of the socket it's listening on, the ESMTP server replaces the IP address with the contents of the defaultdomain control file. If defaultdomain is missing, the Courier mail server uses the contents of the me control file.
The contents of defaultdomain are also appended to return addresses to mail sent from the Courier mail server's webmail server, if they don't already have a domain. If defaultdomain does not exist, the Courier mail server's webmail server obtain the machine hostname, and uses that.
dotextension
dsnfrom
dsnlimit
The sender can request that the entire message be returned even on delayed notices or return receipts, however the Courier mail server will ignore this request if the message size exceeds this limit.
enablefiltering
esmtp
local
uucp
If you want to specify more than one source of mail, such as ESMTP and local mail, specify both esmtp and local, separated by a space character.
esmtpacceptmailfor
esmtpacceptmailfor.dat
esmtpauthclient
relay userid password
ESMTP negotiation will take place, and the Courier mail server will use a SASL authentication method supported by both the Courier mail server and the remote ESMTP server. Currently the Courier mail server supports PLAIN, LOGIN and CRAM-MD5 authentication. CRAM-MD5 is preferred over the other two, and PLAIN is preferred over LOGIN.
The Courier mail server also supports ESMTP over SSL (the ESMTP STARTTLS extension). If ESMTP STARTTLS is enabled, STARTTLS will be used to establish a secure link first. The authentication will take place afterwards, over a secure channel.
Changes to this file take effect, more or less, immediately (existing connections are not affected, but new connections will read the updated data).
esmtpd
esmtpdelay
The courieresmtp process delivers mail that's routed to external mail relays, via ESMTP. When attempting to initally contact a mail server courieresmtp waits for the amount of time specified by esmtptimeoutconnect (see below). esmtptimeoutconnect is usually set to a relatively long period of time, in order to accomodate slow mail servers. A large number of messages queued up for an unreachable mail server can tie up delivery slots that can be put to a better use by reassigning them for mail to another domain. Although the Courier mail server does not usually assign all delivery slots for messages to the same domain (this is a tuneable parameter), it is still not very healthy to have a bunch of courieresmtp daemons spinning their wheels, doing nothing.
The situation worsens when there is a large number of mail relays that accept mail for the same domain, and all of them are unreachable due to a network failure. That's because the esmtptimeout waiting period is used for each individual mail relay. Multiply esmtptimeout by the number of servers to see how large the delay really will be.
esmtpdelay is implemented internally in the courieresmtp module. The main the Courier mail server scheduling daemon is not aware of what's happening internally in courieresmtp. When courieresmtp fails to contact any mail relay for the domain, the message is postponed, and the esmtpdelay timer is set. Any additional messages received by the same courieresmtp daemon (for the same domain), are immediately postponed without any attempt to contact a remote mail relay. When the amount of time set by esmtpdelay expires, courieresmtp will attempt to make another delivery attempt as usual.
If esmtpdelay does not exist, the default delay is five minutes. Any messages that are postponed look like any other temporary failure to courierd. Delivery attempts are rescheduled as if a real temporary failure took place. Therefore it does not make sense to set esmtpdelay to be greater than retryalpha (see below). When retryalpha is smaller is esmtpdelay, you'll just messages spinning through the mail queue, with useless delivery attempts being attempted because esmtpdelay still hasn't expired.
Occasionally you might observe somewhat strange behavior on systems with heavy mail traffic. esmtpdelay applies separately to each individual instance of courieresmtp. When a remote mail server keeps going up and down, it is possible to end up with multiple courieresmtp daemons handling mail for the same domain, but only some of them will encounter a network failure, purely by the luck of the draw. The remaining daemons will be able to establish a connection. So you'll end up with some courieresmtp daemons being able to deliver mail immediately, while the rest are still waiting patiently for esmtpdelay to expire, postponing all messages in the meantime. Some messages - but not all - will be immediately postponed without a delivery attempt, becauses they ended up getting to a daemon which is waiting for esmtpdelay to expire.
Another anomalous situation may happen when a courieresmtp daemon gets reassigned to another domain, and then receives more mail for the previous domain. This can happen when you have a lot of mail going through. Although the Courier mail server tries to shuffle all mail for same domain into one pile, the scheduler still tries to dispatch mail on "first-come, first-serve" basis, as much as possible. When that happens another delivery attempt will be made immediately, because the previous esmtpdelay was cancelled when the daemon got reassigned to another domain.
There can also be occasional abnormalities that affect systems with light traffic. When there is a domain with several mail relays of equal priority, one mail relay is chosen at random for the connection attempt. If some of the equal-priority mail relays are unreachable and a courieresmtp daemon picks it, it will start the esmtpdelay timer and refuse to deliver any more mail until it expires, even if most of the mail servers are functional. This will happen only with mail relays of the lowest priority. Otherwise, courieresmtp will always try to contact another mail relay of a still lower priority, before giving up and setting the esmtpdelay timer. Another courieresmtp daemon will not be started for the same domain if there's already an existing one, so all delivery attempts will be turned away until esmtpdelay expires. Another courieresmtp daemon will be started only in the event of multiple simultaneous delivery attempts that happen to coincide at the same time.
This is somewhat mitigated by the fact that all courieresmtp daemons are killed after a short period of total inactivity (currently one minute), so that longer intervals specified by esmtpdelay are ignored. Note, however, that receiving a message to deliver, and then postponing it immediately, does count as some activity.
esmtpdelay can be turned off by setting it to 0 seconds. esmtpdelay is designed for servers that handle heavy amount of mail that wish to avoid having outbound delivery slots tied up due to network failures, at an expense of an occasional anomalous behavior due to harmless paranoia. esmtpdelay may prove to actually make things worse for systems that carry only light mail traffic, if they are burdened with a task of exchanging mail primarily with external systems that are not properly maintained.
esmtpgreeting
esmtphelo
esmtphelo may also be set to a special value of "*":
echo '*' >esmtphelo
esmtproutes
domain:relay[,port][/SECURITY=STARTTLS][/SECURITY=NONE]
domain is any SMTP domain. relay specifies a fixed mail relay for this domain. relay is optionally followed by a comma and a port number, to specify a port other than the default port 25. If an address's domain is not found in esmtproutes, the Courier mail server looks for MX and A records as usual (and always delivers to port 25). If the domain is found in esmtproutes, however, any MX or A records for the domain are ignored; instead the Courier mail server delivers the message to the specified relay.
relay can be another domain, or an explicit IP address inside brackets. For example, if esmtproutes contains the following:
example.com: relay.domain.com domain.com: [192.168.0.2]
.example.com: [192.168.0.3],26
esmtproutes is read from top to bottom, stopping as soon as a first match is found.
domain may be empty, this specifies a smarthost for all domains. For example, if esmtproutes contains the following text:
example.com: relay.example.com
:[192.168.0.4]
If relay is empty, the Courier mail server interprets it as an explicit directive to use MX and A records from DNS. For example:
example.com: :[192.168.0.4]
The optional /SECURITY=STARTTLS flag indicates that mail to this domain should be automatically upgraded to use the SECURITY ESMTP extension. See the Courier mail server installation notes for a description of SECURITY, what it does, and how to configure it.
The /SECURITY=NONE flag prevents the Courier mail server from using the STARTTLS ESMTP extension even if the remote server claims to support it. Use this flag to deliver mail to misconfigured Microsoft Exchange relays that claim to support STARTTLS, but always report a failure to a STARTTLS request.
Changes to this file take effect immediately, more or less. Existing courieresmtp processes that already have an established connection will ignore any changes.
esmtptimeout
esmtptimeoutconnect
esmtptimeoutdata
esmtptimeouthelo
esmtptimeoutkeepalive
Note that there's also a separate limit to the maximum number of simultaneous SMTP sessions to the same domain. That limit is currently four, which is adequate for nearly every situation, so for now it will be set by an undocumented configuration file.
esmtptimeoutkeepaliveping
esmtptimeoutquit
faxqueuetime
faxqueuetime specifies the timeout for fax messages. This time interval is specified in the same way as queuetime (see queuetime for more information).
faxnotifyrc
faxrc
hosteddomains
If the domain "example.com" appears in hosteddomains instead, the Courier mail server will look for a local mailbox named "user@example.com" instead.
The contents of the hosteddomains configuration file is a list of domains, one per line, in lowercase. You must run the makehosteddomains command for any changes to take effect.
Additionally, hosteddomains can specify simple domain aliases. See the complete description in the m[blue]makehosteddomains(8)m[][10] manual page.
ldapaddressbook
name<tab>host<tab>port<tab>suffix<tab>binddn<tab>bindpw
ldapaliasrc
locallowercase
locals
.domain.com
Specific hosts can be excluded from the wildcard. Example:
!host.domain.com .domain.com
anything.domain.com is considered to be a local domain, except for host.domain.com. Note that "!host.domain.com" must appear in locals before the .domain.com wildcard.
The "!hostname" syntax is also valid in the esmtpacceptmailfor control file.
If locals does not exist, the Courier mail server uses the contents of the me control file (note that me specifies only one domain, second and subsequent lines are ignored). Also, see hosteddomains.
localtimeout
logindomainlist
What if you don't want to display a drop down menu? Administrators can now specify records that generate a hidden field in login.html, or an editable text field, allowing sqwebmail to show only one mail login domain to each user per access URL or IP address. This functionality can greatly reduce confusion for first time webmail users, and greatly speed the login process for frequent webmail users.
Finally, the new logindomainlist file offers a new tool to ease maintenance. Administrators can now use wildcards to "rewrite" the domain portion of the access URL to the mail domain equivalent. For example, the following record can rewrite the URL "mail.*.com" to the mail domain "*.com"
*.com:mail.*.com:@
This powerful wildcard functionality can ease the login process for most of your server's mail domains with just one or two logindomainlist records.
File Format
firstfield:secondfield:thirdfield
Above, we can see that the new logindomainlist records are made up of three fields delimited by colons. But what does each field do?
First Field - the first field contains the "mail domain" for which we would like the user to log in under. The mail domain is the part of an email address after the @ symbol. For example, in the email address "user@domain.com", "domain.com" is the mail domain.
Second Field - the second field contains the "access domain". The access domain contains an URL or IP address that is used to figure out which mail domain to use by default. For example, in the following logindomainlist record:
domain1.com:domain2.com
"domain2.com" is the "access domain" and "domain1.com" is the "mail domain". If the user logs into the following URL:
http://domain2.com/cgi-bin/sqwebmail
His default "mail domain" will be "domain1.com".
Third Field - the third field may contain a modifier. The modifier may be either a single character modifier, or a group identification string. The single character modifiers and the group modifier are described in detail below.
Finally, the logindomainlist file may also contain comments and empty lines. Empty lines can be used to group records visually, and comments can be used to explain why a certain record or group of records look the way they do.
If the first character of a line is a '#', then the entire line is considered a comment and is ignored. If the first character of a line contains whitespace, the entire line is assumed to be an empty line and is ignored.
Modifiers
@ - the '@' modifier can be used to create a hidden field on the login.html page which contains the default mail domain. In addition, this field will automatically display the default mail domain in plain text to the right of the userid text box.
domain1.com:domain2.com:firstgroup
domain3.com:domain4.com:firstgroup
domain5.com:domain6.com:firstgroup
domain7.com:domain8.com:secondgroup
domain9.com:domain10.com:secondgroup
http://domain4.com/cgi-bin/sqwebmail
He will see a drop down containing ONLY the following domains:
domain1.com
domain3.com
domain5.com
Wildcards
In the logindomainlist file, an asterisk (*) character in either the first and/or second field represents a wildcard. Any asterisk in the second field will be used to match an access domain. If an asterisk exists in the first field then any characters which the asterisk in the second field represents will replace the asterisk in the first field when sqwebmail determines the default mail domain. However, asterisks are not required in either the first or second fields. They are totally optional. For example, given the following logindomainlist record:
*.com:mail.*.com:@
If the user logs into sqwebmail with the following URL:
http://mail.mydomain.com/cgi-bin/sqwebmail
The asterisk in the second field will represent the string "mydomain". This string will then replace the asterisk in the first field to give the following default mail domain: mydomain.com
Similarly, if the following record exists in the logindomainlist file:
*:*:@
Then ANY URL the user uses to access sqwebmail will be automatically used for the default mail domain.
But the first field doesn't _HAVE_ to contain an asterisk. The following will work just fine:
mydomain.com:mydomain.*:@
The above example will allow the user to access the "mydomain.com" mail domain from any of the following URLs: "mydomain.org", "mydomain.net", "mydomain.us", etc...
And finally, the first field doesn't have to contain anything at all! If the first field is empty, that record will serve as an explicit no-default mail domain. No default mail domain will be specified if the second field matches the user's login URL. This is useful because the logindomainlist is searched from the top down. Any wildcard records at the bottom of the list will be overridden by records closer to the top. An "explicit no-default" record can be used to specify certain domains as "system account" domains so that no default mail domain is specified.
maildirfilterconfig
maildirshared
maildrop
This configuration file is initialized, by default, to point to the version of m[blue]maildrop(1)m[][8] that's integrated with the Courier mail server. The integrated version of m[blue]maildrop(1)m[][8] is configured slightly differently than the standalone version of m[blue]maildrop(1)m[][8].
Although you can set the maildrop configuration file to point to some other version of the maildrop mail filter, you MUST set the maildropfilter configuration file (see below), to point to the integrated version of maildrop.
maildropfilter
This file is not installed by default. To activate mail filtering for local recipients, simply copy the contents of the maildrop configuration file to maildropfilter.
maildroprc
me
msgidhost
nochangingfrom
queuelo, queuehi, queuefill
queuehi specifies the maximum number of messages that are loaded into memory. The Courier mail server reads the mail queue on disk until either it reads all of it, or it reads the number of messages specified by queuehi. As messages are delivered they are removed from the memory and disk. Messages that are deferred for another delivery attempt are removed from memory, but kept on the disk.
When the number of messages in memory falls below queuelo, The Courier mail server goes back to disk and attempts to fill the memory queue to the top, again.
This is, basically, a capsule summary of the mail queue processing logic. Many small, low level details are omitted; this is just an executive overview. When new messages arrive during a large mail backlog, the new messages are also loaded into the memory queue, if there's room for them. Therefore, during a large mail backlog the Courier mail server simultaneously tries to clear the existing backlog, and process any new mail at the same time. Up to the Courier mail server 0.41, all of this generally translates to the Courier mail server giving priority to newly arrived mail, and processing the backed up mail queue if spare resources are available.
The queuefill setting was added in the Courier mail server 0.42, in an attempt to keep new mail from excessively delaying existing mail during a major queue backup. queuefill specifies a time interval. When the Courier mail server completely fills the memory queue it sets a timer. After the interval given by queuefill The Courier mail server will go back and re-fill the mail queue even if the number of messages did not fall below the low watermark. If the Courier mail server finds older messages in the mail queue they will be pushed to the top of the scheduling queue, and given priority.
Smaller queuefill time intervals means more frequent trips to the disk, and more overhead. But, in exchange for that, during a mail backlog the Courier mail server will spend more time handling a greater number of delayed messages. Larger queuefill time intervals means less frequent trips to the disk, and less overhead, in exchange for less "fairness" during large mail backlogs.
queuefill defaults to five minutes, if not specified. Explicitly setting it to 0 seconds turns off the queue re-filling completely, essentially reverting to pre-0.42 behavior. The default queuelo and queuehi values are computed at run time. queuelo defaults to the larger of 200, and the sum total of configured mail delivery slots, both local and remote. queuehi, if not explicitly set, defaults to the smaller of twice the queuelo, or queuelo plus 1000.
queuetime
retryalpha, retrybeta, retrygamma, retrydelta
The Courier mail server will first make retrybeta delivery attempts, waiting for the time interval specified by retryalpha between each attempt. Then, the Courier mail server waits for the amount of time specified by retrygamma, then the Courier mail server will make another retrybeta delivery attempts, retryalpha amount of time apart. If still undeliverable, the Courier mail server waits retrygamma*2 amount of time before another retrybeta delivery attempts, with retryalpha amount of time apart. The next delay will be retrygamma*4 amount of time long, the next one retrygamma*8, and so on. retrymaxdelta sets the upper limit on the exponential backoff. Eventually the Courier mail server will keep waiting retrygamma*(2^retrymaxdelta) amount of time before making retrybeta delivery attempts retryalpha amount of time apart, until the queuetime interval expires.
The default values are:
retryalpha
retrybeta
retrygamma
retrymaxdelta
This results in the Courier mail server delivering each message according to the following schedule, in minutes: 5, 5, 5, 15, 5, 5, 30, 5, 5, 60, 5, 5, then repeating 120, 5, 5, until the message expires.
sizelimit
If sizelimit does not exist, and SIZELIMIT is not set, the maximum message size defaults to 10485760 bytes.
submitdelay
submitdelay specifies the delay before the first delivery attempt for a message that has been entered into the mail queue. Normally, the first delivery attempt is made as soon as possible. This setting delays the initial delivery attempt. It is normally used when you have a mail filter installed that detects duplicate messages arriving in a short period of time. If the mail filter detects this situation it can use the m[blue]cancelmsg(1)m[][14] command to reject duplicate messages in the queue (and return them back to the envelope sender).
submitdelay specifies a time interval in the same format as queuetime.
usexsender
uucpme
uucpme sets the UUCP nodename of the Courier mail server mail relay. See m[blue]courieruucp(8)m[][15] for more information.
uucpneighbors
uucpneighbors is used by the courieruucp module to specify the Courier mail server's configuration for relaying mail via UUCP. See m[blue]courieruucp(8)m[][15] for more information.
uucprewriteheaders
warntime
warntime specifies an amount of time in the same format as queuetime. If a message still has not been delivered after this period of time, the Courier mail server sends a warning message (a "delayed" Delivery Status Notification) to the sender. If warntime is missing, the Courier mail server sets warntime to four hours.
HTML output from the webmail server is generated from the template files in /usr/lib/courier/sqwebmail/html/en-us. It is possible to translate the webmail interface into another language simply by creating another subdirectory underneath /usr/lib/courier/sqwebmail/html, then meticulously translating each .html file. Each template file contains well-formed HTML, with dynamic content marked off by tags. Note that the large comment blocks in each HTML file need to be translated too, since they are inserted as dynamic content, elsewhere.
The directory /usr/lib/courier/sqwebmail/html/en-us also contains several configuration files, in addition to the HTML template files. Doing so allows this configuration information to be defined for each available language.
CHARSET
The default English HTML templates use strictly the "us-ascii" subset, and the CHARSET contains utf-8,iso-8859-1. When multiple character sets are listed, the first character set that's supported by the browser is picked, so with UTF-8 capable browsers the default webmail interface will use UTF-8, falling back to ISO-8859-1 for browsers that do not support UTF-8.
footer
ISPELLDICT
LANGUAGE
LANGUAGE_PREF
LOCALE
TIMEZONELIST
The Courier mail server can perform "Sender Policy Framework" checks on up to three addresses for each message. This is controlled by setting the following variables: BOFHSPFHELO, BOFHSPFMAILFROM, and BOFHSPFFROM. Each variable is set to a comma-separated list of the following keywords: "off" - SPF verification disabled (default); "none", "neutral", "pass", "fail", "softfail", "error", "unknown" - these keywords correspond to the possible results of an SPF check, the message is accepted for the listed SPF results only, any other SPF result is rejected; "all" - shorthand for all possible SPF results, use "all" to run SPF in informational mode only, recording the SPF status in the Received-SPF: header.
A rejected SPF result gets kicked back with a permanent error indication if the SPF result is listed in BOFHSPFHARDERROR, and a temporary error indication otherwise.
When enabling SPF checking, the keyword list should always include "pass" (it makes no sense to do otherwise) and "none". The keyword list should also include "softfail", "neutral", and "unknown". See the SPF draft for a description of these status results. At some distant future, the keyword list will only include "pass", rejecting all senders without a stated policy. This might be desirable at some point in the future, but not right now.
The BOFHSPFFROM list may also include an additional keyword, "mailfromok". BOFHSPFMAILFROM and BOFHSPFFROM are trade-offs. Using BOFHSPFMAILFROM is faster, and it does not require the entire message to be received, before running the SPF check. BOFHSPFFROM checking can only occur after the entire message is received, but it's more reliable. If "mailfromok" is listed, the From: is not checked if the MAIL FROM command was checked with the "pass" result.
In other words: the From: header is checked if MAIL FROM was empty, or did not pass the SPF checks. If MAIL FROM passed the SPF check the Courier mail server won't bother looking at the From: header.
A conservative policy should not reject failed SPF checks from the From:header, because it can be counterproductive in some situations. This is because when a sender from a domain with a published SPF policy sends a message to a mailing list, the message goes through the mailing list processor's IP address, and it will fail the SPF check unless the domain SPF explicitly authorizes the mailing list processor's IP address.
This is very unlikely. The end result is that domains with a published SPF record get punished, and domains without an SPF record get off scott free. Mailing lists should be encouraged to publish their own SPF records for mailing list traffic; then the "mailfromok" keyword can validate the mailing list's return address, and forego checking of the "From:" header from the mailing list, while still checking the "From:" header from everyone else.
Another alternative is to use opt BOFHSPFFROM=all for advisory purposes only. Post-delivery mail filters can key off the "Received-SPF" header.
The Courier mail server can add up to three "Received-SPF" headers of its own, one for each SPF check. The Courier mail server renames any existing "Received-SPF" header as "Old-Received-SPF". All "Received-SPF" headers delivered to a local mailbox will always come from the Courier mail server.
Flushing a single message will not work if the message queue is backed up. When that happens, your only available option is to flush the entire queue.
courier start fails if the Courier mail server has detected a fatal operational error. In this situation the top-level courierd daemon sleeps for a minute, before automatically restarting. During this sleep interval courier stop does not work.
m[blue]cancelmsg(1)m[][14], m[blue]maildirmake(1)m[][12], m[blue]maildrop(1)m[][8], m[blue]preline(1)m[][16], m[blue]sendmail(1)m[][17], m[blue]testmxlookup(1)m[][18], m[blue]dot-courier(5)m[][6], m[blue]authlib(7)m[][3], m[blue]courierfax(8)m[][9], m[blue]courierfilter(8)m[][7], m[blue]filterctl(8)m[][7], m[blue]courierldapaliasd(8)m[][11], m[blue]courierpop3d(8)m[][19], m[blue]courierpop3d(8)m[][19], m[blue]couriertcpd(8)m[][20], m[blue]courieruucp(8)m[][15], m[blue]esmtpd(8)m[][21], m[blue]imapd(8)m[][22], m[blue]localmailfilter(7)m[][2], m[blue]mailq(1)m[][1], m[blue]makeacceptmailfor(8)m[][23], m[blue]makealiases(8)m[][24], m[blue]makehosteddomains(8)m[][10], m[blue]makepercentrelay(8)m[][25], m[blue]makesmtpaccess(8)m[][4], m[blue]makeuserdb(8)m[][26], m[blue]pw2userdb(8)m[][26], m[blue]mkesmtpdcert(8)m[][27], m[blue]mkimapdcert(8)m[][28], m[blue]pop3d(8)m[][29], m[blue]submit(8)m[][5], m[blue]userdb(8)m[][30].
maildrop(1)
preline(1)
sendmail(1)
testmxlookup(1)
courierpop3d(8)
couriertcpd(8)
esmtpd(8)
imapd(8)
makealiases(8)
makeuserdb(8)
mkesmtpdcert(8)
mkimapdcert(8)
pop3d(8)
userdb(8)