On September 18, 2021 1:37:19 PM GMT+03:00, Nick Howitt <n...@howitts.co.uk> 
wrote:
>
>
>On 18/09/2021 11:32, Jaroslaw Rafa wrote:
>> 
>> Dnia 18.09.2021 o godz. 08:39:41 Vladimir Mishonov pisze:
>>> 2. While the above is mostly for aesthetical reasons, there is one
>>> other thing: the templates for mailer-daemon messages have obsolete
>>> "From" and "To" header formats, e.g.:
>>>
>>>> From: mailer-dae...@mydomain.com (Mail Delivery System)
>>>> To: postmas...@mydomain.com (Postmaster)
>>>
>>> This appears to be the legacy RFC5322 header format (see
>>> https://github.com/roundcube/roundcubemail/issues/5402). I'm not
>>> very well versed in the RFC stuff, but what I can say for sure is
>>> that so far I've ONLY seen this format in these templates, and
>>> nowhere else. It looks like some email clients (like Roundcube, see
>>> the link above) do not handle this format very well, probably for
>>> the reason that it's barely used nowadays, if at all.
>> 
>>  From the very link you quoted, you can know that this format is still used
>> and can be still seen in the regular emails you get, because (quote from
>> your link):
>> 
>> "at least two current programs use this syntax:
>> The MUA called ELM, and the unix tool to send email from the command line
>> (often used by cron jobs): mailx."
>> 
>> Wouldn't it be better to patch Roundcube? Also from the link you quoted, the
>> developers say they'll accept a patch. Someone even tried to submit a patch,
>> but failed. It shouldn't be too hard to patch however. If I were you, I
>> would rather try to patch Roundcube and not Postfix.
>> 
>>> Postfix. I understand that I can make changes to the source code and
>>> recompile the program, but even if I am able to accomplish this, it
>>> would only be half of the job done, if not even less than that. I'd
>>> also have to arrange a process to create packages in the appropriate
>>> format for my OS distribution and keep them updated.
>> 
>> You don't have to. You can get rid of packaged Postfix and use the
>> one installed from source. Of course everytime new Postfix version is
>> released, if you want to upgrade, you need to download the new source
>> version, apply your patch and recompile. You can try to automate that :).
>> 
>> But again, if I were you, I would rather go towards modifying Roundcube. It
>> would be probably easier, and that's actually the place where the error is,
>> so it should be fixed there, not worked around in Postfix, because you can
>> get emails with headers in this forma from other sources too, as noted
>> above.
>> 
>>> The postconf(5) manual says
>>> that postmaster notifications generated by smtp and smtpd _can_ be
>>> inspected by adding "notify" to "internal_mail_filter_classes".
>>> Unfortunately, while it does seem to enable DKIM signing for them
>>> (via the milter application that I've configured), it still does not
>>> apply any header checks to them.
>> 
>> If you are able to apply a milter to them, you can write a milter that
>> rewrites those headers.
>> 
>I've not been paying particular attention to the thread, but can 
>header_checks be used to rewrite MAILER-DAEMON to mailer-daemon?
>
>Nick

Hey, nice to see that there is actually some activity going on here.

Like I said before, header checks can be used to change the address and the 
header format, but it does not apply to certain kinds of notifications, e.g. 
SMTP protocol violation reports with session transcripts. The same effect is 
achievable with bounce_template_file, which does not affect these types of 
notifications either and generally feels a bit less hacky to me.

In regard to what Jaroslaw has suggested, it still seems to me that most of it 
deals with the symptoms instead of the actual cause of the problem, in addition 
to being quite difficult to implement for an average user like me.

Also, the Roundcube issue that I linked to is somewhat old, and I am pretty 
certain that the problematic header format is mostly non-existent in the wild 
as of today - especially considering that it was the only mention of it that I 
could find at all. It looks as if its usage in Postfix mailer daemon 
notifications is a remnant of a very distant past that has never been paid much 
(if at all) attention to since it was first implemented.

--
Kind regards,
Vladimir

Reply via email to