The configuration file consists of options and rules to control how smtpd(8) works, and to allow the selective accepting or rejecting of messages based on information gathered during the SMTP session.include "/etc/mail/smtpd.conf.local"
Blank lines are ignored and lines beginning with a hash mark (#) are treated as comments. Lines may be split using the backslash (\) character. Macros can also be used to reduce the complexity of the configuration.
Macros are user-defined variables that can hold IP addresses, port numbers, interface names, etc. Macro names cannot be reserved words (such as port) and may only contain letters, digits, and underscores. A macro is referred to by preceding its name with a dollar character ($). The following creates and uses a recursive macro named all_mx:
The validity of the configuration file can be checked with the following command:mx1 = "192.168.0.1" mx2 = "192.168.1.1" all_mx = "{" $mx1 $mx2 "}" listen on $all_mx
# smtpd -nf /etc/mail/smtpd.conf
Updates of some internal smtpd(8) counters can be displayed in one second intervals with the following command:# smtpctl show queue # smtpctl show stats
The following commands show another example. They will first temporarily stop accepting incoming SMTP sessions, as well as local and remote mail deliveries, then resume them all and bring smtpd(8) back to normal operation:# smtpctl monitor
For a complete list of commands, see the smtpctl(8) man page.# smtpctl pause smtp # smtpctl pause mda # smtpctl pause mta # smtpctl resume smtp # smtpctl resume mda # smtpctl resume mta