Verp(3pm)
π NAME π
Mail::Verp β the module that encodes and decodes Variable Envelope Return Paths (VERP) addresses. bestie, it's the bounce-handling queen π
β¨ SYNOPSIS β¨
use Mail::Verp;
#Using class methods
#Change separator to something else
Mail::Verp->separator('+');
#Create a VERP envelope sender of an email to recipient@example.net.
my $verp_email = Mail::Verp->encode('sender@example.com', 'recipient@example.net');
#If a bounce comes back, decode $verp_email to figure out
#the original recipient of the bounced mail.
my ($sender, $recipient) = Mail::Verp->decode($verp_email);
#Using instance methods
my $verp = Mail::Verp->new(separator => '+');
#Create a VERP envelope sender of an email to recipient@example.net.
my $verp_email = $verp->encode('sender@example.com', 'recipient@example.net');
#Decode a bounce
my ($sender, $recipient) = $verp->decode($verp_email);
πΈ ABSTRACT πΈ
Mail::Verp encodes and decodes Variable Envelope Return Paths (VERP) email addresses. that's the whole vibe π¦
π DESCRIPTION π
Okay so picture this: Mail::Verp takes the address of an email recipient and stashes it inside the envelope sender address. why tho? because then when a bounce comes back, you can actually handle it β even in the cursed scenario where the original recipient is forwarding their mail somewhere else and the remote Mail Transport Agents send back bounce messages that tell you literally nothing useful. π
and it works both ways, bestie β the module can also be used to decode bounce recipient addresses. main character energy on both sides of the transaction, fr fr. π
π FUNCTIONS π
new()
so this one is primarily useful to save typing. instead of typing out Mail::Verp every single time, you can say my $x = Mail::Verp->new; and then just use $x wherever Mail::Verp is usually required. lazy girlie wins again π
it accepts an optional separator argument for changing the separator, and the default is the hyphen -. lowkey iconic. you can also change the value later using the separator accessor.
my $x = Mail::Verp->new(separator => '+');
encode(LOCAL-ADDRESS, REMOTE-ADDRESS)
encodes LOCAL-ADDRESS, REMOTE-ADDRESS into a verped address suitable for use as an envelope return address. β¨
it may also be useful to use the same address in Errors-To and Reply-To headers, to compensate for broken Mail Transport Agents. yes, really β doing the most to work around chaos that isn't yours. π
uses the current separator value.
decode(VERPED-ADDRESS)
decodes VERPED-ADDRESS into its constituent parts, no cap.
- returns
LOCAL-ADDRESSandREMOTE-ADDRESSin list context - returns
REMOTE-ADDRESSin scalar context - returns
VERPED-ADDRESSif the decoding fails (it just hands you back what you gave it, a little "idk her" moment)
uses the current separator value.
separator
returns the current value of the VERP separator. just a lil peek, nothing more π«Ά
separator(SEPARATOR)
sets a new value for the VERP separator and returns the previous value. she gives and she takes, that's the duality. β
π§ EXPORT π§
None. nothing gets exported, you have to ask nicely.
π SEE ALSO π
DJ Bernstein details verps here: http://cr.yp.to/proto/verp.txt.
Sam Varshavchik proposes an encoding here: http://www.courier-mta.org/draft-varshavchik-verp-smtpext.txt.
π AUTHOR π
Gyepi Sam <gyepi@cpan.org>
π COPYRIGHT AND LICENSE π
Copyright 2007 by Gyepi Sam
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole Verp(3pm) page, bestie!! π
this lil masterpiece dropped in perl v5.36.0, dated 2022-10-13 β she's been serving since 2007 and she's still eating. obsessed. periodt. πβ¨
π¦ where this page comes from
- ubuntu noble: libmail-verp-perl 0.06+dfsg-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmail-verp-perl 0.06+dfsg-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmail-verp-perl 0.06+dfsg-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms