Courie...akeDate(3pm)
π Courier::Filter::Module::FakeDate(3pm) π
ok so this is a page from the User Contributed Perl Documentation, and bestie, we are about to learn about the FakeDate module β a fake "Date:" message header filter module for the Courier::Filter framework. yes the header of the page got chopped down to Courie...akeDate(3pm) by the terminal, we don't talk about that. π
β¨ NAME β¨
Courier::Filter::Module::FakeDate β a fake "Date:" message header filter module, living its best life inside the Courier::Filter framework. π°οΈ
πΈ SYNOPSIS πΈ
use Courier::Filter::Module::FakeDate;
my $module = Courier::Filter::Module::Header->new(
forward_tolerance => {
# years, months, weeks, days, hours, minutes, seconds
hours => 2
},
backward_tolerance => {
# years, months, weeks, days, hours, minutes, seconds
days => 5
},
ignore_unparseable => 0,
logger => $logger,
inverse => 0,
trusting => 0,
testing => 0,
debugging => 0
);
my $filter = Courier::Filter->new(
...
modules => [ $module ],
...
);
like. look at that. gorgeous. β¨
π¦ DESCRIPTION π¦
so this class is a filter module class meant to be used with Courier::Filter. what does it do? it matches a message if that message has a "Date" header field that is sitting too far in the future or in the past, measured against the local system's time. β°
and here's the lil plot twist: if the message has a "Resent-Date" header field (peep RFC 2822, 3.6.6 π), then that one gets examined instead β bc the message could just be an old one that somebody recently re-sent, and honestly? that's perfectly legitimate behavior. we respect it. π«Ά
when it does match, the response politely informs the sender that their "Date" header is implausible and that they should maybe, idk, check their clock. π
Note: times in different time zones are compared correctly. no cap. π
Note: when you're running this filter module, it is essential that the local system's own clock is set correctly β otherwise there's an increased risk of legitimate messages getting rejected. so like. ntp is your bestie. π
π Constructor
the following constructor is provided:
new(%options): returns Courier::Filter::Module::FakeDateβ creates a new FakeDate filter module. slay.
%options is a list of key/value pairs representing any of the following options:
forward_tolerancebackward_toleranceβ the maximum durations by which a message's"Date"or"Resent-Date"header may diverge into the future and the past, respectively, from the local system's time. each duration has to be specified as a hash-ref containing one or more time units and their respective quantity/ies, exactly as specified byDateTime::Duration."forward_tolerance"defaults to 2 hours."backward_tolerance"defaults to 5 days, to account for transmission delays. (yes it really does say that. iconic.)
for example:
forward_tolerance => { hours => 4 },
backward_tolerance => { days => 1, hours => 12 }
ignore_unparseableβ a boolean value controlling whether messages whose"Date"or"Resent-Date"header does not loosely conform to RFCs 822 or 2822 should be ignored (true) or matched (false). defaults to false. π
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. that's it. that's the section. β¨
π SEE ALSO π
Courier::Filter::ModuleCourier::Filter::Overview
for AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. π
β AUTHOR β
Julian Mehnle <julian@mehnle.net> β thank you for your service bestie π«‘π
and that's the whole page!! this doc shipped as part of perl v5.34.0, dated 2022-10-21, and it was served up in that classic User Contributed Perl Documentation style. mwah. π no notes. periodt. π
β¨
π¦ 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