Menu

#168 Customize the SMTP reject reason when RejectFailures is true

1.3.1
open
2016-12-18
2016-05-12
No

Hello,

many domains reject mails which fails DMARC with p=reject providing detailed SMTP reject reasons. If you have this need, the attached patch allows to customize the SMTP reject reason when RejectFailures is true.

I have added the RejectString option, with the special word "%s", replaced by the RFC5322.From domain. In this implementation only one "%s" is admitted (it's easier), but you could consider to improve the mechanism.
Hope this help. I tested it only for few days, any feedback is appreciated.

1 Attachments

Discussion

  • A. Schulze

    A. Schulze - 2016-05-18

    the \s trigger a compiler warning:

    opendmarc.c: In function ‘dmarcf_config_load’:
    opendmarc.c:1397:55: warning: unknown escape sequence: '\s'
    snprintf(err, errlen, "%s: The RejectString doesn't contain %%\s!",

    I assume the backslash may be removed.

     
  • Marco Favero

    Marco Favero - 2016-05-19

    Of course, without the backslash the warning disappears and OpenDMARC works as expected. I attached the modified patch, which differs only on the two wrong backslashes. Thank you.

     
  • Murray S. Kucherawy

    I'm not sure this is complete. If I provide a RejectString of "hi there %%s", it passes your one occurrence test, but in fact when passed to snprintf() the domain substitution won't take place; the output will always be a literal "hi there %s". Internally there will still be a dangling parameter passed to snprintf().

     
  • Murray S. Kucherawy

    • assigned_to: Murray S. Kucherawy
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.