We use exim4’s ‘pipe’ transport to send email into rt-mailgate on our system. When it does this, the “From line”, which precedes each email, looking something like:
From user@example.com mon feb 03 11:28:53 2025
is left intact, and it ends up in the list of headers on the relevant attachment in RT.
Having that line in the headers causes problems any time RT needs to reconstruct the message, (for example, trying to forward it) because the line will end up in a random spot, breaking the mime hierarchy, or mess it up in other ways.
In trying to fix this once, I patched RT::Attachment::ContentAsMIME so that when it runs into this line, it puts it at the top of the message, instead of a random spot, but I think the real problem is that this isn’t actually an email header, and it shouldn’t be in there at all.
Is this a bug in RT, or in exim, or in my configuration?