Courie...nvelope(3pm)
β¨ NAME β¨
ok so bestie, welcome to Courier::Filter::Module::Envelope β it's a message envelope filter module for the Courier::Filter framework π and it's literally here to vibe-check your mail's envelope π
πΈ SYNOPSIS πΈ
use Courier::Filter::Module::Envelope;
my $module = Courier::Filter::Module::Envelope->new(
fields => {
# One or more of the following fields:
sender => 'paul.greenfield@unisys.com',
recipient => 'julian@mehnle.net',
remote_host => '216.250.130.2',
remote_host_name => qr/(^|\.)php\.net$/,
remote_host_helo => qr/^[^.]*$/
},
# Optionally the following:
response => $response_text,
logger => $logger,
inverse => 0,
trusting => 0,
testing => 0,
debugging => 0
);
my $filter = Courier::Filter->new(
...
modules => [ $module ],
...
);
π« DESCRIPTION π«
This class is a filter module class for use with Courier::Filter. The way it works is so simple: it matches a message whenever any one of that message's envelope fields matches the criteria you set up. That's it. That's the whole vibe. β¨
π¦ Constructor π¦
Here's the constructor, bestie:
new(%options) : returns Courier::Filter::Module::Envelope
Creates a new Envelope filter module. Fresh out the box, slay π
%options is a list of key/value pairs representing any of the following options:
fieldsβ Required, no skipping this one. A reference to a hash containing the message envelope field names and patterns (as key/value pairs) that messages are to be matched against. Field names are matched case-insensitively (super chill about capitalisation, we love that). Patterns may either be simple strings (for exact, case-sensitive matches) or regular expression objects created by theqr//operator (for inexact, partial matches).
The following envelope fields are supported:
senderβ The message's envelope sender (from theMAIL FROMSMTP command).recipientβ Any of the message's envelope recipients (from theRCPT TOSMTP commands).remote_hostβ The IP address of the SMTP client that submitted the message.remote_host_nameβ The host name (gained by Courier through a DNS reverse lookup) of the SMTP client that submitted the message, if available.remote_host_heloβ The HELO string that the SMTP client specified, if available.
So for instance, to match any message with a sender of paul.greenfield@unisys.com, directed at julian@mehnle.net (possibly among other recipients), you could set the fields option as follows:
fields => {
sender => 'paul.greenfield@unisys.com',
recipient => 'julian@mehnle.net'
}
responseβ A string that is to be returned literally as the match result in case of a match. Defaults to"Prohibited <field>: <value>". cute default, honestly π
All options of the Courier::Filter::Module constructor are also supported. Please see "new()" in Courier::Filter::Module for their descriptions π
π Instance methods π
See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods. Go peek, iykyk π
π«Ά SEE ALSO π«Ά
Courier::Filter::Module::HeaderCourier::Filter::ModuleCourier::Filter::Overview
For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. Yes bestie, all of it lives over there π§
π AUTHOR π
Julian Mehnle <julian@mehnle.net> β iconic, we stan π
ok that's the whole page, periodt π
this lil masterpiece is perl v5.34.0, dated 2022-10-21, and it ships under the Courie...nvelope(3pm) manual β go forth and filter, main character π
π¦ where this page comes from
- debian bookworm: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- debian trixie: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms