sisimai / p5-sisimai

Mail Analyzing Interface for email bounce: A Perl module to parse RFC5322 bounce mails and generating structured data as JSON from parsed results. Formerly known as bounceHammer 4: an error mail analyzer.
https://libsisimai.org
BSD 2-Clause "Simplified" License
78 stars 24 forks source link

Sisimai::Lhost::Exim cannot parse an email with subject "error(s) in forwarding or filtering" #103

Closed azumakuniyuki closed 4 months ago

azumakuniyuki commented 8 years ago

https://github.com/Exim/exim/blob/master/test/mail/0266.postmaster

moan_write_from(f);
fprintf(f, "To: %s\n", s);
fprintf(f, "Subject: error(s) in forwarding or filtering\n\n");
From: Mail Delivery System <Mailer-Daemon@test.ex>
To: postmaster@test.ex
Subject: error(s) in forwarding or filtering
Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
Date: Tue, 2 Mar 1999 09:44:33 +0000

The r1 router encountered the following error(s):

  domain missing or malformed in the address
  "@@test.ex (This has a syntax error)"

Other addresses were processed normally.
azumakuniyuki commented 4 months ago
[
    [0] Sisimai::Fact  {
        internals: {
            action           "failed",
            addresser        Sisimai::Address  {
                internals: {
                    address   "postmaster@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "postmaster@test.ex",
                    user      "postmaster",
                    verp      ""
                }
            },
            alias            "",
            catch            {
                decoded    "2024-06-27 20:44:01",
                mailsize   711,
                queue-id   "",
                sender     "",
                x-mailer   ""
            },
            deliverystatus   "5.0.901",
            destination      "test.ex",
            diagnosticcode   "Other addresses were processed normally.",
            diagnostictype   "SMTP",
            feedbacktype     "",
            hardbounce       0,
            lhost            "root",
            listid           "",
            messageid        "",
            origin           "0266.postmaster",
            reason           "onhold",
            recipient        Sisimai::Address  {
                internals: {
                    address   ""@@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "",
                    user      ""@",
                    verp      ""
                }
            },
            replycode        "",
            rhost            "myhost.test.ex",
            senderdomain     "test.ex",
            smtpagent        "Exim",
            smtpcommand      "",
            subject          "",
            timestamp        Tue Mar  2 18:44:33 1999,
            timezoneoffset   "+0000",
            token            "e90ac32219bf41aba074beee2d35d030a67f3d44"
        }
    },
    [1] Sisimai::Fact  {
        internals: {
            action           "failed",
            addresser        Sisimai::Address  {
                internals: {
                    address   "postmaster@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "postmaster@test.ex",
                    user      "postmaster",
                    verp      ""
                }
            },
            alias            "",
            catch            {
                decoded    "2024-06-27 20:44:01",
                mailsize   705,
                queue-id   "",
                sender     "",
                x-mailer   ""
            },
            deliverystatus   "5.0.901",
            destination      "test.ex",
            diagnosticcode   "No valid addresses were generated.",
            diagnostictype   "SMTP",
            feedbacktype     "",
            hardbounce       0,
            lhost            "root",
            listid           "",
            messageid        "",
            origin           "0266.postmaster",
            reason           "onhold",
            recipient        Sisimai::Address  {
                internals: {
                    address   ""@@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "",
                    user      ""@",
                    verp      ""
                }
            },
            replycode        "",
            rhost            "myhost.test.ex",
            senderdomain     "test.ex",
            smtpagent        "Exim",
            smtpcommand      "",
            subject          "",
            timestamp        Tue Mar  2 18:44:33 1999,
            timezoneoffset   "+0000",
            token            "e90ac32219bf41aba074beee2d35d030a67f3d44"
        }
    },
    [2] Sisimai::Fact  {
        internals: {
            action           "failed",
            addresser        Sisimai::Address  {
                internals: {
                    address   "postmaster@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "postmaster@test.ex",
                    user      "postmaster",
                    verp      ""
                }
            },
            alias            "",
            catch            {
                decoded    "2024-06-27 20:44:01",
                mailsize   706,
                queue-id   "",
                sender     "",
                x-mailer   ""
            },
            deliverystatus   "5.0.901",
            destination      "test.ex",
            diagnosticcode   "No valid addresses were generated.",
            diagnostictype   "SMTP",
            feedbacktype     "",
            hardbounce       0,
            lhost            "root",
            listid           "",
            messageid        "",
            origin           "0266.postmaster",
            reason           "onhold",
            recipient        Sisimai::Address  {
                internals: {
                    address   ""@@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "",
                    user      ""@",
                    verp      ""
                }
            },
            replycode        "",
            rhost            "myhost.test.ex",
            senderdomain     "test.ex",
            smtpagent        "Exim",
            smtpcommand      "",
            subject          "",
            timestamp        Tue Mar  2 18:44:33 1999,
            timezoneoffset   "+0000",
            token            "e90ac32219bf41aba074beee2d35d030a67f3d44"
        }
    },
    [3] Sisimai::Fact  {
        internals: {
            action           "failed",
            addresser        Sisimai::Address  {
                internals: {
                    address   "postmaster@test.ex",
                    alias     "",
                    comment   "",
                    host      "test.ex",
                    name      "postmaster@test.ex",
                    user      "postmaster",
                    verp      ""
                }
            },
            alias            "",
            catch            {
                decoded    "2024-06-27 20:44:01",
                mailsize   763,
                queue-id   "",
                sender     "",
                x-mailer   ""
            },
            deliverystatus   "5.0.901",
            destination      "in.valid",
            diagnosticcode   "No valid addresses were generated.",
            diagnostictype   "SMTP",
            feedbacktype     "",
            hardbounce       0,
            lhost            "root",
            listid           "",
            messageid        "",
            origin           "0266.postmaster",
            reason           "onhold",
            recipient        Sisimai::Address  {
                internals: {
                    address   ""@@in.valid",
                    alias     "",
                    comment   "",
                    host      "in.valid",
                    name      "",
                    user      ""@",
                    verp      ""
                }
            },
            replycode        "",
            rhost            "myhost.test.ex",
            senderdomain     "test.ex",
            smtpagent        "Exim",
            smtpcommand      "",
            subject          "",
            timestamp        Tue Mar  2 18:44:33 1999,
            timezoneoffset   "+0000",
            token            "68a8f36cc81e945ebc593ca19079098ec56b2ff2"
        }
    }
]