How to restrict serverwide messages with diacritics in subject
Hello,
I would like to ask a question related to the use of this cPanel tutorial with diacritics:
https://support.cpanel.net/hc/en-us/articles/360055304654-How-to-block-spam-email-by-subject-for-the-entire-server
What should we place in the filter file when the subject line contains diacritics? The exact string we see in the email client (so the actual diacritics) or rather the MIME encoded Unicode characters (such as =C3=AE)?
Also from what I see, the subject line that contains diacritics uses underscores between words. Should I include those as sample string for $h_subject test?
And finally, should I include the start and end tags for the MIME encoding (=?UTF-8?q? and ?=)?
Thanks!
-
I would like to add that I have tried all variants (with and without underscores, with diacritics and without etc) and I don't seem to be able to make it work.
Maybe it's relevant that in Exim Configuration Manager -> Filters I can see an exclamation mark to the left of block_subjects.conf filter with this alt text: "The setting, filter_block_subjects.conf, was not set in the configuration file, so the default has been used".
0 -
Hey there! I'm not finding much on this so I've reached out to our Email team and I'll let you know what they have to say as soon as I hear back!
0 -
I spoke with the email team and they are saying the presence of the yellow exclamation could indicate another issue outside of the diacritic customizations you're working on. It would likely be best to create a ticket so the entire configuration can be examined as a whole and we can find what's wrong.
0 -
The exclamation mark was from the fact that I haven't saved it as to trigger the /etc/cpanel_exim_system_filter rebuild. I though that if it sees the filter, it will be taken into account. It did not. After saving and making sure the new rules are in cpanel_exim_system_filter, it mostly works.
But the initial questions remain:
- should we simply copy the strings with the diacritics or with the MIME encoding?
- if we should use the MIME string, should we include the start and end MIME "tags" ("=?UTF-8?Q?" and "?=") and the underscores instead of spaces?Thanks!
0 -
And a more important question: what should we do in order to restrict delivery based on a string in the body?
I have tried with this but had no luck:
if ("$message_body:" contains "string from mail body to match")
then fail
endifThanks!
0 -
I spoke with the email team again about this and they said it would likely be best to create a ticket so we can look into this directly.
0
Please sign in to leave a comment.
Comments
6 comments