aboutsummaryrefslogtreecommitdiffstats
path: root/pullimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-08 06:53:19 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-08 22:07:26 +0100
commitd08ee23dccf56af292a9616986e58cc39386e3fb (patch)
tree6e552f66230050a09b4c63c352f10c18b3568561 /pullimap
parent37ebe331178e2b7d225a31f64463aef5448d4970 (diff)
Remove deprecated/buggy 'o' regexp modifier.
Diffstat (limited to 'pullimap')
-rwxr-xr-xpullimap3
1 files changed, 2 insertions, 1 deletions
diff --git a/pullimap b/pullimap
index dcbe59b..f983fe1 100755
--- a/pullimap
+++ b/pullimap
@@ -286,6 +286,7 @@ my $ATTRS = "ENVELOPE INTERNALDATE";
$ATTRS .= " BODY.PEEK[]" unless $CONFIG{'no-delivery'};
my $RE_ATOM = qr/[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x41-\x5A\x5E-\x7E]+/;
+my $DOT_STRING = qr/\A$RE_ATOM(?:\.$RE_ATOM)*\z/;
sub pull_callback($$) {
my ($uids, $mail) = @_;
return unless exists $mail->{RFC822} or $CONFIG{'no-delivery'}; # not for us
@@ -294,7 +295,7 @@ sub pull_callback($$) {
my $e = $mail->{ENVELOPE}->[3];
my $sender = '';
if (defined $e and defined (my $l = $e->[0]->[2]) and defined (my $d = $e->[0]->[3])) {
- if ($l =~ /\A$RE_ATOM(?:\.$RE_ATOM)*\z/o) {
+ if ($l =~ $DOT_STRING) {
$sender = $l.'@'.$d;
} elsif ($l =~ /\A[\x20-\x7E]*\z/) {
# quote the local part if not Dot-string (RFC 5321)