Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply patch from @0xcdcdcdcd to resolve issue #151 #157

Merged
merged 1 commit into from Jan 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Sisimai/MTA/Postfix.pm
Expand Up @@ -97,7 +97,7 @@ sub scan {

if( $readcursor & $Indicators->{'message-rfc822'} ) {
# After "message/rfc822"
if( $e =~ m/\A([-0-9A-Za-z]+?)[:][ ]*.+\z/ ) {
if( $e =~ m/\A([-0-9A-Za-z]+?)[:][ ]*.*\z/ ) {
# Get required headers only
my $lhs = lc $1;
$previousfn = '';
Expand Down
4 changes: 3 additions & 1 deletion lib/Sisimai/Message.pm
Expand Up @@ -296,7 +296,8 @@ sub takeapart {

for my $e ( @hasdivided ) {
# Header name as a key, The value of header as a value
if( $e =~ m/\A([-0-9A-Za-z]+?)[:][ ]*(.+)\z/ ) {
# if( $e =~ m/\A([-0-9A-Za-z]+?)[:][ ]*(.+)\z/ ) {
if( $e =~ m/\A([-0-9A-Za-z]+?)[:][ ]*(.*)\z/ ) {
# Header
my $lhs = lc $1;
my $rhs = $2;
Expand Down Expand Up @@ -327,6 +328,7 @@ sub takeapart {

} else {
# ASCII Characters only: Not MIME-Encoded
$e =~ s/\A[ \t]+//; # unfolding
$takenapart->{ $previousfn } .= $e;
$mimeborder->{ $previousfn } //= 0;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Sisimai/RFC5322.pm
Expand Up @@ -67,7 +67,8 @@ sub HEADERFIELDS {
sub LONGFIELDS {
# Fields that might be long
# @return [Hash] Long filed(email header) list
return { 'to' => 1, 'from' => 1, 'subject' => 1 };
# return { 'to' => 1, 'from' => 1, 'subject' => 1 };
return { 'to' => 1, 'from' => 1, 'subject' => 1, 'message-id' => 1 };
}

sub is_emailaddress {
Expand Down