Over reactive fail2ban

Discussion in 'ISPConfig 3 Priority Support' started by Jonathon Gilbert, Feb 16, 2023.

  1. pyte

    pyte Well-Known Member HowtoForge Supporter

    We could help you more if you provide the helo name. helo=<[email sender domain]>. As you posted the rspamd output, i assume it's "mail.gazley.com"?
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    @till @Jonathon Gilbert

    I must correct myself here. I've just searched through alot of mailserver logs and came to the conclusion that there are next to none mails that have a invalid helo that send valid mail. There was 1 valid sender with a invalid helo.
    So as @till already mentioned this is working on loads of systems and invalid helo are not the norm anymore and you should use helo rejects. In the early 2010's this was still an issue IIRC.

    However regarding your case, if gazley.com uses mail.gazley.com as there helo name, they are the ones messing up here. If the helo name is gazley.com everything seems perfectly fine to me.
     
    till likes this.
  3. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    awesome. This has answered what i needed to know.
    I think the primary issue is that my clients are repair and panel shops and their clients are small businesses with basic email services.
    many of the issue i have had to deal with since setting up the new server is because of minor issue around ptr and missing a records. this sort of thing shouldnt stop emails coming into the server. the spamfilter should be doing that. having emails being blocked prior to the spam filter makes finding the issues really frustrating.

    Thank you for your help guys. as always i couldnt have gotten back on track without you guys
     
  4. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    i wasnt sure about posting the actual names of domains but these guys have been getting really frustrating to work with in fixing the issue.
    this is the full message:

    ""Feb 17 01:22:33 itmail postfix/smtpd[594488]: NOQUEUE: reject: RCPT from mail.gazley.com[103.212.54.190]: 450 4.7.1 <GAZWLGEX01.gtgroup.co.nz>: Helo command rejected: Host not found; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<GAZWLGEX01.gtgroup.co.nz>""
     
  5. pyte

    pyte Well-Known Member HowtoForge Supporter

    This is the issue and it is their fault not yours. You may want to contact the their IT department and let them know of the issue.

    Well no. It is correct to not waste any time on this by the spam services, as the most basic check can already say this is odd and not wanted mail. Why should this make finding the issue frustrating? In case of an issue check the mail logs and rspamd logs.
     
    till likes this.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    As mentioned earlier, you can configure that in the ISPConfig GUI if you want to reject at postfix level for basic system misconfiguration that typically indicate hacked spam sending systems. When you don't want to reject wrong configured systems in postfix, you can do that directly under system > server config > mail. Personally, I think its way easier to debug this in postfix than in Rspamd, as postfix tells you directly what's wrong with the other system, while in rspamd, the mails get likely rejected as well due to the wrong sending server configuration but this will happen in conjunction with other rules, so it's not so easy to figure out which exact rule combination caused the rejection of that email. Your clients won't be able to send emails to most other mail systems anyway today with such a wrong configuration or at least their mails end up in spam folders, they will learn sooner or later after not reaching many of their recipients that it's better to fix their system. Trying to communicate with other systems on the internet while the hostname of your system does not exists is just not a good idea.

    I guess most of the confusion that arose in this thread came from the title which mentioned fail2ban as source of the problem while fail2ban is not involved at all.
     
    pyte likes this.
  7. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    haha yeah i guess im still a noob at all this. kinda fell into running these servers and have staggered my way through it for the past 6 or 7 years... every time something goes wrong or i get hit with something new its frustrating haha. not the softwares fault. more my noviceness.

    and il let them know because my client is ready to blow his top. most of the emails not coming through are from automated systems sending my client invoices. all small businesses with little to no IT support. so its no surprises there are a few issues.

    but thanks to the advise. il leave the standard config alone and leave that option disabled as i havnt seen any more being blocked for that reason. and now i know what im looking for it will make it obvious to spot when the next issue comes through.
     
  8. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    yes absolutely able to see now that. the reason i thought it was fail2ban was because the last few issues i had to edit the fail2ban whitelist for the emails to come through. and i only found them because they were getting blocked and showing in the fail2ban logs. i had not previously realised that the mail log would have anything useful as the IP was blocked so the email would never arrive.

    cheers for your help Til. the premium membership for the past 5 years has been priceless.
     
    till likes this.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    There is maybe one aspect we have not talked about yet, when your customers are delivering emails through your server, do they use the right port? Years ago, it was normal to use port 25 for everything regarding mail sending, but today one would use only port 587 as the configuration for both ports differs. So when your customers use your server as SMTP out (e.g. in Outlook or Thunderbird, but also when they run e.g. a local exchange server in their office), then they must use port 587 (with SMTP authentication) and not port 25 to avoid being rejected. Port 25 is used only for communication between internet mail servers e.g. when your system gets contacted from gmail to deliver an email to a local mailbox on your server or when your system connects to gmail to deliver an email, it will use port 25 too.
     
  10. Jonathon Gilbert

    Jonathon Gilbert Member HowtoForge Supporter

    Yep everyone is using 587. with ssl.
     
    till likes this.

Share This Page