postfix wont discard blank email from yahoo

Dear All,

I am running in a problem that i have put a postfix regex which needs to discard emails having no subjects, while it works fine for gmail,hotmail and other domains but it does not work for yahoo.com.The ultimate reason behind this is because yahoo does not send subject line if subject is not included in email.
Any one having solution to it?

Hi

I do not use postfix myself, but I think you could do it with:

Postfix manual - header_checks(5)

This should give you control what to do when a specific header is missing.

Well, thats not the case…
the email sent from yahoo having no subject is actually Yahoo does not include any header containing subject tag so the regex for header_checks is skipped :frowning:
if any one can help would be appreciable,

Can you process this after postfix? Then you could use formail -a to add a missing subject header and then scrap the message when this specially inserted header exists?