Filtering headers on a bounce

LoadFactor

Well-Known Member
Jul 12, 2013
59
8
133
cPanel Access Level
Root Administrator
There are some circumstances where we filter messages based on content, returning a "550 User does not exist" in an attempt to get the address cleaned from spammer's send lists. Unfortunately, the bounce message usually contains the X-Spam-* headers that can tip the spammer off as to what's really going on.

What I'd like to do is remove those headers from the response so the message is more convincing. Is this possible?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hello,

First I need to point out that this is an unsupported customization and we don't recommend making this modification, but there are a couple of configuration options for this:

 

LoadFactor

Well-Known Member
Jul 12, 2013
59
8
133
cPanel Access Level
Root Administrator
Those headers are really useful so I wouldn't want to remove them, particularly not globally. Similarly for the system filters, I wouldn't want all users to be affected. As much as I'd love to have the messages rejected at RCPT, one slip in exim and there would be hell to pay.

I'm thinking the only viable option would be to pipe the message to a program, have it strip the unwanted headers and then send a bounce, pretending to be Mailer-Daemon
 
  • Like
Reactions: cPanelLauren