Skip to Content.
Sympa Menu

DKIM and ARC: Setup MTA: Using Authentication Milter

Requirements

Installation

If your operating system provies a package for Authentication Milter, installing it is recommended.

Otherwise, you may install CPAN module (In this case, many dependent modules will also be installed, so you may want to consider using perlbrew or similar).

If you use cpanm, you can install as follows (replace $PREFIX with the prefix of Perl you are using):

# cpanm --notest --install-args "--install_path sbin=$PREFIX/sbin" Mail::SPF
# cpanm --notest Mail::Milter::Authentication

Note that some external libraries such as OpenSSL/LibreSSL are required to build all dependencies.

Authentication Milter also needs some directories.

# mkdir /var/cache/authentication_milter
# mkdir /var/lib/authentication_milter
# mkdir /var/spool/authentication_milter

Configuration

Setting Authentication Milter

You have to create authentication_milter.json in /etc directory (or appropriate location). The following are the default settings with minimal modifications.

{
    "error_log"   : "/var/log/authentication_milter.err",
    "connection"  : "inet:12345@localhost",
    "umask"       : "0007",
    "runas"       : "nobody",
    "rungroup"    : "nobody",
    "authserv_id" : "mx.example.org",

    "connect_timeout" : 30,
    "command_timeout" : 30,
    "content_timeout" : 300,
    "dns_timeout"     : 10,
    "dns_retry"       : 2,

    "handlers" : {

        "SPF" : {
            "hide_none" : 0
        },

        "DKIM" : {
            "hide_none" : 0,
        },

        "DMARC" : {
            "hide_none" : 0,
            "detect_list_id" : "1"
        },

        "PTR" : {},

        "SenderID" : {
            "hide_none" : 1
        },

        "IPRev" : {},

        "Auth" : {},

        "LocalIP" : {},

        "TrustedIP" : {
            "trusted_ip_list" : []
        },

        "!AddID" : {},

        "ReturnOK" : {},

        "Sanitize" : {}
    }
}

If you installed Authentication Milter with CPAN package, you may also create startup script as necessity. A sample init script is included in the source tarball.

Note

  • You may also perform unit test of Authentication Milter using authentication_milter_client.

Setting MTA


After you finished setting up MTA, test it.

Top of Page