How to block this kind of email?

Discussion in 'ISPConfig 3 Priority Support' started by concept21, Jun 19, 2019.

  1. concept21

    concept21 Active Member

    I received 2 emails without subject or date. How do I block this type of emails? :oops:

    ========================
    X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "Date"
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit the spamfilter policy in ispconfig mail module that you applied to this account and set bead header lover to no in the policy.
     
  3. concept21

    concept21 Active Member

    Oh yes! I find what you say! :D

    And how to block emails sent from server without a valid reverse DNS? I guess good email server must have a valid reverse DNS.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Those should be blocked already. At least on my ISPConfig setups they get blocked and I do not remember doing anything to enable that.
    But not by amavis, they are blocked by postfix, I believe.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    In addition what ISPConfig is doing already, you might want to add "reject_unknown_reverse_client_hostname" to smtpd_helo_restrictions in postfix main.cf. But not sure if that's not too strict and you might lose emails when doing it.
     
    concept21 likes this.
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Looks like I was wrong. Now that I check mail.log there is:
    Code:
    Jun 20 12:06:06 ispc6 postfix/smtpd[14840]: warning: hostname hosting-by.nstorage.org does not resolve to address 185.222.211.13: Name or service not known
    Jun 20 12:06:15 ispc6 postfix/smtpd[14840]: warning: hostname s.ba5.ab.sampa.br does not resolve to address 185.36.81.173: Name or service not known
    Jun 20 12:08:15 ispc6 postfix/smtpd[14840]: warning: hostname no.rdns.ukservers.com does not resolve to address 5.101.174.7: Name or service not known
    Jun 20 12:11:01 ispc6 postfix/smtpd[14840]: warning: hostname hosting-by.nstorage.org does not resolve to address 185.222.211.13: Name or service not known
    
    That is the reverse DNS check, and it is only a warning, not reject.
    But the 6000 of those messages all look like totally spammer hosts, so I'll try that @till suggestion.
     
  7. concept21

    concept21 Active Member

    Each mail server must point to a IP and this IP should/must resolve to a good FQDN. If there is no reverse domain name for this IP, some service does not like it.

    AOL is an example. It is very strict about accepting incoming email. You can check your own email server setup by sending a mail to an aol email account and see whether it can be accepted by aol. I do this for all my own email setup. :cool:
     

Share This Page