DOKK / manpages / debian 10 / libsisimai-perl / Sisimai::MDA.3pm.en
Sisimai::MDA(3pm) User Contributed Perl Documentation Sisimai::MDA(3pm)

Sisimai::MDA - Error message parser for MDA

    use Sisimai::MDA;
    my $header = { 'from' => 'mailer-daemon@example.jp' };
    my $string = 'mail.local: Disc quota exceeded';
    my $return = Sisimai::MDA->scan($header, \$string);

Sisimai::MDA parse bounced email which created by some MDA, such as "dovecot", "mail.local", "procmail", and so on. This class is called from Sisimai::Message only.

"scan()" is a parser for detecting an error from mail delivery agent.

    my $header = { 'from' => 'mailer-daemon@example.jp' };
    my $string = 'mail.local: Disc quota exceeded';
    my $return = Sisimai::MDA->scan($header, \$string);
    warn Dumper $return;
    $VAR1 = {
        'mda' => 'mail.local',
        'reason' => 'mailboxfull',
        'message' => 'mail.local: Disc quota exceeded'
    }

azumakuniyuki

Copyright (C) 2014-2016,2018 azumakuniyuki, All rights reserved.

This software is distributed under The BSD 2-Clause License.

2018-11-15 perl v5.28.0