Skip to main content
Version: 1.1

Postfix configuration

Verify milter configuration without sending email

Check Postfix configuration syntax

sudo postfix check

No output means no errors.

View active milter settings

Each line is a separate command to check a specific setting:

postconf smtpd_milters
postconf non_smtpd_milters
postconf milter_default_action

The output should be:

smtpd_milters = inet:localhost:7080
non_smtpd_milters = inet:localhost:7080
milter_default_action = accept

To check all milter-related settings at once:

postconf | grep milter

Verify milter configuration by sending a test email

Send a test message using the mail command, or any other mail client configured to use Postfix as the outgoing mail server:

note

The mail command requires the mailutils package. Install it if it is not already present:

sudo apt install mailutils
echo "Test message body" | mail -s "Test message subject" user@example.com

After sending, check the Postfix logs for any milter-related warnings or errors. Depending on your system, the logs may be located at /var/log/mail.log, /var/log/maillog, or a similar path.

A successful delivery looks like:

F018DE7C08: to=<user@example>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)

If there is a problem, you may see a warning such as:

warning: connect to Milter service inet:localhost:7080: Connection refused

Additional resources