Author: Dan
Date: 29-11-09 19:42
I have an improvement:
grep 'RCPT from unknown' /var/log/maillog | grep 'Client host rejected: cannot find your hostname' | awk '{print $10}' | cut -d '[' -f 2 | cut -d ']' -f 1 | sort | uniq | xargs -J % -n 1 ${SPAMDB} -ta %
Why? I was getting this error:
spamdb: invalid ip address delays=0.01/0/11/0.17,
Debugging it, I found this:
Nov 29 18:12:59 supernews postfix/smtp[39989]: 3988017083: to=<tosa@example.ua>, relay=mail.example.ua[91.199.106.3]:25, delay=11, delays=0.01/0/11/0.17, dsn=4.7.1, status=deferred (host mail.example.ua[91.199.106.3] said: 450 4.7.1 Client host rejected: cannot find your hostname, [206.127.23.226] (in reply to RCPT TO command))
Ahh, they cant find MY hostname. That's OK. Thus, I started to refine my script, avoiding the error.
--
Webmaster
|
|