The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mail::Milter::Authentication::Client - Client for connecting back to the authmilter server

VERSION

version 2.20200319

SYNOPSIS

Connect to the Authentication Milter and pass it email, returning the result.

DESCRIPTION

Client to the Authentication Milter

CONSTRUCTOR

new( $args )

Instantiate a new Client object

    my $client = Mail::Milter::Authentication::Client->new({
        'mailer_name'   => 'test.mta.yoga.fastmail.com',
        'connect_ip'    => '66.111.4.148',
        'connect_name'  => 'test.fastmail.com',
        'connect_port'  => '54321',
        'connect_type'  => 'tcp4',
        'helo_host'     => 'test.helo.fastmail.com',
        'mail_from'     => 'test@marc.fastmail.com',
        'rcpt_to'       => 'marc@yoga',
        'mail_data'     => $email_content,
        'mail_file'     => '/path/to/email.txt',
    });

METHODS

r()

Private method, do not call this directly

insert_header()

Private method, do not call this directly

replace_header()

Private method, do not call this directly

add_header()

Private method, do not call this directly

load_mail()

Private method, do not call this directly

process()

Send the email to the milter and process the result.

result()

Return the result of the milter run

Arguments

mailer_name

The name (fqdn) of the MTA

connect_ip

The IP address of the host connecting to the mailer.

connect_name

The name of the host connecting to the mailer.

connect_port

The port of the connection to the mailer.

connect_type

The type of connection to the mailer (eg tcp4).

helo_host

The string passed in the HELO stage of the SMTP transaction.

mail_from

The string passed in the MAIL FROM stage of the SMTP transaction.

rcpt_to

The string passed in the RCPT TO stage of the SMTP transaction.

mail_data

The EMail body as a string.

mail_file

The EMail body can also be passed as a filename.

Net::Milter

This project includes a modified copy of Net::Milter which is imported into the Mail::Milter::Authentication::Net::Milter namespace.

The included module has been modified to support all of the features required by Authentication Milter.

If these required features are ever merged back into Net::Milter then we may just use it instead, however at this point the modified version does the job.

AUTHOR

Marc Bradshaw <marc@marcbradshaw.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by Marc Bradshaw.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.