How to reject emoji in subject line?

Questions and answers about how to do stuff
Post Reply
mobamobamoba
Posts: 11
Joined: 31 May 2017 13:39

How to reject emoji in subject line?

Post by mobamobamoba »

Is there a Postfix header check that can reject an email if it contains any emoji in the subject line? I've been getting a bunch of email with green hearts or smileys etc. in the subject line - all spam - but I can't figure out the regex for it to reject it at the Postfix level rather than waiting for Spamassassin to pick it up. thanks.
smyers119
Posts: 108
Joined: 29 Nov 2019 11:36

Re: How to reject emoji in subject line?

Post by smyers119 »

Work off of this:

https://gist.github.com/adamlwatson/9623703

Or maybe a milter that runs it through this:

https://github.com/guanting112/remove_emoji
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: How to reject emoji in subject line?

Post by shawniverson »

Following...
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: How to reject emoji in subject line?

Post by pdwalker »

This would be a good filter to add to spamassassin.

100% of mail I get with emoji's in the subject are spam.

I'm almost as certain that this applies to bodies of messages as well.
Post Reply