[exim-dev] [Bug 1559] New: Diagnostic-Code: Field for EXPERI…

Góra strony
Delete this message
Reply to this message
Autor: Wolfgang Breyha
Data:  
Dla: exim-dev
Nowe tematy: [exim-dev] [Bug 1559] Diagnostic-Code: Field for EXPERIMENTAL-DSN wrong
Temat: [exim-dev] [Bug 1559] New: Diagnostic-Code: Field for EXPERIMENTAL-DSN wrong
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1559
           Summary: Diagnostic-Code: Field for EXPERIMENTAL-DSN wrong
           Product: Exim
           Version: 4.84
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Delivery in general
        AssignedTo: nigel@???
        ReportedBy: wbreyha@???
                CC: exim-dev@???



Created an attachment (id=771)
--> (http://bugs.exim.org/attachment.cgi?id=771)
fix for Diagnostic-Code field of EXPERIMENTAL_DSN

This bug and patch is for 4.85_RC2 only.

EXPERIMENTAL_DSN had two bugs in 4.84. The first is already fixed in 4.85_RCx.
addr->host_used is set correctly now (outside the EXPERIMENTAL_DSN code).
Thanks Jeremy!

The second flaw was not visible until host_used was available. The
Diagnostic-Code field of the machine readable part of a DSN was wrong.

It looked like:
Remote-MTA: dns; mail.example.tld
Diagnostic-Code: smtp; 0

This patch fixes this. Instead of using basic_errno, which is also not
available at this point of deliver.c, I use addr->message which contains the
complete and sanitized error message from the remote host.

I added a function to make some specific checks, strip the leading information
Exim added by searching for the first ": " and print the SMTP message as
required by RFC 3461:9.2.

I tested it for single- and multiline 5xx errorcodes. As far as I can tell it
should work for 4xx as well.

Now it looks like (multiline example):
Remote-MTA: dns; mail.example.tld
Diagnostic-Code: smtp; 550-unknown user/Adresse existiert nicht
<unknown@???>
550 non existent


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email