Adding custom header on outgoing mail
I am attempting to stop Microsoft users sending 'reactions' to email from our server by adding a custom header. The header that needs to be added is:
x-ms-reactions: disallow
I can't find any documentation on this for cPanel. Is this possible to at both a server, user, or domain level?
-
Hey there! Yes, Exim, the mail transport that cPanel uses, does support adding custom headers. However, *we* don't support doing that work or troubleshooting that for clients, as then customizing email would likely turn into our entire job.
I did some research on this and couldn't find anyone who has implemented this in Exim yet, so I'm wondering if this option is specific to Microsoft systems.
Unfortunately I just don't have a good answer on this one and you may need to look into custom Exim headers to find out where and if this can be implemented.
0 -
cPRex Thanks for your thoughts and, yes, I understand that this would be out of scope for cPanel support as it would properly open a can of worms!
I got the original idea from https://neilzone.co.uk/2024/07/attempting-to-stop-microsoft-users-sending-reactions-to-email-from-me-by-adding-a-postfix-header/
I think what I was looking at was that, at a high level, whether this approach would work in a cPanel environment and that it wouldn't dramatically break anything?
Is there any documentation on either adding these, or whether it could be done at a domain level?
0 -
I'm a big believer of "anything is possible" but performing this work on just one domain instead of all mail headers is even more complicated. That would require a conditional filter that watches the sender domain and then applies custom headers based on that.
0 -
I am going to hazard a guess here that it might be possible by editing the /etc/exim_outgoing.conf and injecting the header there by putting it under a ACL as a extra line add_header = x-ms-reactions: disallow
However Exim is very sensitive to wrong configurations so before even attempting such a thing my recommendation is to use a staging server with no clients on it except yourself.
And again this is a guess.
Here is the exim4 main ACL information guide
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-access_control_lists.html0
Please sign in to leave a comment.
Comments
4 comments