On 8/15/2016 8:29 AM, Thomas Keller wrote:
> In my logs, I have thousands of:
> 
>   postfix/smtpd: connect from unknown [186.225.115.62]
>   postfix/smtpd: disconnect from unknown [186.225.115.62]
> 
> when I watch the traffic on port 25, I see that the client tried AUTH
> LOGIN and was rejected:
> 
>   220 mail.<myserver>.com ESMTP
>   HELO mail.<myserver>.com
>   250 mail.<myserver>.com
>   AUTH LOGIN
>   503 5.5.1 Error: authentication not enabled
>   QUIT
>   221 2.0.0 Bye
> 
> but I don't see the failed AUTH LOGIN in my logs (neither mail.log, nor
> mail.err)
> 
> I am using a custom script to block offending IPs (similar to fail2ban),
> but I cannot block these IPs when I don't see them in the logs.
> 
> How can I make sure failed AUTH LOGIN is being logged ?
> 
> 


A better solution is to enable postscreen and reject these
RBL-listed jokers before they get to your smtpd process.


Or you can add AUTH to the forbidden commands list for port 25,
something like:
# main.cf
smtpd_25_forbidden_commands =
  AUTH CONNECT GET POST USER HTTP HELP

# master.cf
# add to existing smtpd entry
smtpd ... smtpd
  -o smtpd_forbidden_commands=$smtpd_25_forbidden_commands




  -- Noel Jones

Reply via email to