diff options
author | Eric Wong <e@80x24.org> | 2019-11-29 12:25:08 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-12-12 03:51:18 +0000 |
commit | 56643bfddba2f7bca60955e5c48435fe58cc8e1c (patch) | |
tree | 5a193061fa4d55572189e8adf32a3464e2a9c108 /lib/PublicInbox | |
parent | b474aff922a07da7c4d9db00dec9cebb4744aa8c (diff) | |
download | public-inbox-56643bfddba2f7bca60955e5c48435fe58cc8e1c.tar.gz |
-mda should not be dealing with broken Date: headers nowadays, and deprioritize it in our documentation and internal checks.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/Admin.pm | 2 | ||||
-rw-r--r-- | lib/PublicInbox/MDA.pm | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm index dddeeae9..3d0d80b9 100644 --- a/lib/PublicInbox/Admin.pm +++ b/lib/PublicInbox/Admin.pm @@ -136,7 +136,7 @@ EOF } # TODO: make Devel::Peek optional, only used for daemon -my @base_mod = qw(Email::MIME Date::Parse Devel::Peek); +my @base_mod = qw(Email::MIME Devel::Peek); my @over_mod = qw(DBD::SQLite DBI); my %mod_groups = ( -index => [ @base_mod, @over_mod ], diff --git a/lib/PublicInbox/MDA.pm b/lib/PublicInbox/MDA.pm index b0dfac45..ef5e7dfa 100644 --- a/lib/PublicInbox/MDA.pm +++ b/lib/PublicInbox/MDA.pm @@ -6,7 +6,7 @@ package PublicInbox::MDA; use strict; use warnings; use Email::Simple; -use Date::Parse qw(strptime); +use PublicInbox::MsgTime; use constant MAX_SIZE => 1024 * 500; # same as spamc default, should be tunable use constant MAX_MID_SIZE => 244; # max term size - 1 in Xapian @@ -51,8 +51,7 @@ sub usable_str { } sub usable_date { - my @t = eval { strptime(@_) }; - scalar @t; + defined(eval { PublicInbox::MsgTime::str2date_zone($_[0]) }); } sub alias_specified { |