Postfix - Reject Emails w/ No Subject?
I was wondering how mail administrators handle emails w/o any subject material? I don't know if this is an RFC guideline that requires email to have a subject but I find it extremely annoying when email doesn't have a subject. I don't know if that's just personal preference or if it's an actual guideline for mail to have 'subject' data. Do you guys reject mail if no 'subject' is present in the message?
|
I personally do not reject mail based upon the subject, or lack there of. I agree that it is annoying. Whether or not it is a violation of any RFC, I don't know and even if it is, most mail programs would probably ignore the rule by default anyway. I also know that I myself have been guilty of sending emails without a subject on occasion, by accident rather than deliberately.
You mention Postfix in your subject title and there may be a header check rule that will reject messages based on the lack of a subject. You will need to look at the postfix documentation to verify; the list of available content checks is quite long. |
This is an old thread, but the answer of how to reject and e-mail with no subject in Postfix is not properly answered anywhere on the internet.
Now that I have finally figured out how to do it, here is the answer: Code:
/etc/postfix/main.cf Code:
header_checks = regexp:/etc/postfix/header-checks Code:
cat > /etc/postfix/header-checks << "EOF" Code:
# /^Subject:.*I[[:space:]]spam[[:space:]]you/ REJECT I don't want your spam. Code:
/^subject:[[:space:]]*$/ REJECT No Subjecto! You seem to be Subjectless. Code:
/^subject:[[:space:]]*Re:$/ REJECT No Subjecto! You seem to be Subjectless. Wayne Sallee Wayne@WayneSallee.com http://www.WayneSallee.com |
All times are GMT -5. The time now is 02:19 PM. |