Allow custom rejection messages for RBLs that do not return a TXT record
The following thread describes the problem:
Basically, when a message is rejected because it is found in an RBL, cPanel relies upon the resultant TXT record information to fully populate the reason for the rejection.
As an example, if an IP address is on the zen.spamhaus.org RBL, both an A-record (one or more) will be returned and a TXT record will be populated, and it is that TXT record that is used to fully complete the text in the rejection notice.
Example 1 (Spamhaus -- provides both one or more A-record as well as a TXT record)
220.127.116.11.zen.spamhaus.org. 235 IN A 127.0.0.4
18.104.22.168.zen.spamhaus.org. 235 IN A 127.0.0.2
22.214.171.124.zen.spamhaus.org. 235 IN A 127.0.0.10
dig 126.96.36.199.zen.spamhaus.org TXT
188.8.131.52.zen.spamhaus.org. 900 IN TXT "http://www.spamhaus.org/query/bl?ip=127.0.0.2"
Example 2 (BRBL - b.barracudacentral.org only provides A-records on a match)
184.108.40.206.b.barracudacentral.org. 746 IN A 127.0.0.2
dig 220.127.116.11.b.barracudacentral.org TXT
;18.104.22.168.b.barracudacentral.org. IN TXT
;note that no TXT record is provided
The text in the TXT record is then used to populate the rejection message:
[22.214.171.124]:2078 is in an RBL, see http://www.spamhaus.org/query/bl?ip=126.96.36.199
However, for some custom RBLs (such as b.barracudacentral.org), only A-records are available on a positive match. There is no resulting TXT provided by b.barracudacentral.org, and as such the rejection message text ends up looking like this:
[188.8.131.52]:2078 is in an RBL, see
cPanel needs to add a way for admins to add a custom rejection message that, if present, will override anything found in a TXT record when querying that particular RBL.
Not only must we be able to grep our logs and easily find "b.barracudacentral.org" (or whatever custom RBL you are using), but the sender who is being rejected deserves to have a meaningful response sent back to them during SMTP rejection. As it stands right now, you can't grep your exim logs to see what hits occurred for an RBL that doesn't provide TXT record, and any sender rejected by that RBL is not provided with a meaningful rejection message.