diff options
| author | fukachan <fukachan> | 2001-04-12 14:09:07 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-04-12 14:09:07 +0000 |
| commit | 5f4815657ad8c9bc5992eeee3395ec487e719118 (patch) | |
| tree | bdc06fd813bd966b7f11f2c2112343b971b52c95 | |
| parent | c8955ddb49afe39f56d9b6f288b230f88acc52b2 (diff) | |
| download | fml8-5f4815657ad8c9bc5992eeee3395ec487e719118.tar.gz fml8-5f4815657ad8c9bc5992eeee3395ec487e719118.tar.bz2 fml8-5f4815657ad8c9bc5992eeee3395ec487e719118.zip | |
move _addr_clean_up() to Mail::Bounce::address_clean_up()
check address by Mail::Bounce::address_clean_up()
| -rw-r--r-- | fml/lib/Mail/Bounce/SimpleMatch.pm | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/fml/lib/Mail/Bounce/SimpleMatch.pm b/fml/lib/Mail/Bounce/SimpleMatch.pm index 6be1fdb7..6c620e34 100644 --- a/fml/lib/Mail/Bounce/SimpleMatch.pm +++ b/fml/lib/Mail/Bounce/SimpleMatch.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: SimpleMatch.pm,v 1.7 2001/04/12 13:39:56 fukachan Exp $ +# $FML: SimpleMatch.pm,v 1.8 2001/04/12 13:50:23 fukachan Exp $ # @@ -191,7 +191,7 @@ sub _address_match last SCAN if /$end_regexp/; if (/(\S+\@\S+)/) { - my $addr = $self->_addr_clean_up($mta_type, $1); + my $addr = $self->address_clean_up($mta_type, $1); if ($addr) { $result->{ $addr }->{ 'Final-Recipient' } = $addr; $result->{ $addr }->{ 'Status'} = '5.x.y'; @@ -199,7 +199,7 @@ sub _address_match } if (/$addr_regexp/) { - my $addr = $self->_addr_clean_up($mta_type, $1); + my $addr = $self->address_clean_up($mta_type, $1); if ($addr) { $result->{ $addr }->{ 'Final-Recipient' } = $addr; $result->{ $addr }->{ 'Status'} = '5.x.y'; @@ -210,28 +210,6 @@ sub _address_match } -sub _addr_clean_up -{ - my ($self, $type, $addr) = @_; - - # nuke predecing and trailing strings around user@domain pattern - my $prev_addr = $addr; - do { - $prev_addr = $addr; - $addr =~ s/\.$//; - $addr =~ s/^<//; - $addr =~ s/>$//; - } while ($addr ne $prev_addr); - - if ($type eq 'nifty.ne.jp' && $addr !~ /\@/) { - $addr . '@nifty.ne.jp'; - } - else { - $addr; - } -} - - =head1 AUTHOR Ken'ichi Fukamachi |
