Sisimai::MDA(3pm)

πŸ“¦
version 5.0.1 Β· 3 versions
, in ubuntu noble

πŸ’– Sisimai::MDA(3pm) πŸ’–

okay bestie, welcome to the little corner of the Perl docs where Sisimai::MDA lives β€” it's the error message parser for MDA, and yes she is that girl. this is part of the User Contributed Perl Documentation situation, so pull up a chair, grab a boba, and let's get into it πŸ§‹βœ¨


🌸 NAME 🌸

Sisimai::MDA β€” the error message parser for MDA. that's the whole vibe. iconic, concise, slay πŸ’…


✨ SYNOPSIS ✨

here's how you actually call her, no cap:

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

like... that's it. that's the whole entrance. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

so Sisimai::MDA parses bounced email β€” the kind that gets created by some MDA. and when we say "some MDA" we mean the classics: "dovecot", "mail.local", "procmail", and so on. the whole mail-delivery-agent friend group 🫢

πŸ’€ important lore drop: this class is called from Sisimai::Message only. she does not take walk-ins. you don't just summon her from anywhere, bestie β€” Sisimai::Message is the one who sets up the playdate.

πŸ‘‘ CLASS METHODS πŸ‘‘

πŸ’Œ "inquire(Header, Reference to message body)"

inquire() is a parser for detecting an error from a mail delivery agent. she looks at the header, she looks at the body (by reference, because we're efficient like that), and she tells you what went down. main character energy fr fr πŸ”₯

check out the whole thing in action:

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

look at that structured lil hash coming back with 'mda', 'reason', and 'message' all filled in. she ate and left no crumbs πŸ“


🌈 AUTHOR 🌈

azumakuniyuki β€” the legend, the blueprint, the moment. πŸ‘‘


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

(yes, the years have a lil gap in the middle β€” 2017 said "not today" and honestly, respect πŸ™ˆ)


⭐ LICENSE ⭐

this software is distributed under The BSD 2-Clause License. periodt.


okay so that's the whole page, bestie!! and before you go β€” the fine print at the bottom of the original was perl v5.38.2, dated 2024-03-03, filed under Sisimai::MDA(3pm). so like, this is the v5.38.2 era, 2024-03-03 coded, Sisimai::MDA(3pm) certified. now go parse some bounces and stay hydrated πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from