mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Other
3.81k stars 472 forks source link

getting duplicate e-mails #471

Closed br4nnigan closed 2 years ago

br4nnigan commented 2 years ago

I'm sorry to bother as this might not be a bug but maybe you can help:

this is my crontab: 7 00 22 * * * sudo /usr/local/sbin/update-ngxblocker -e cron@mydomain.com

for a while this has been working fine (which is odd in itself as the default value for SEND_MAIL is N and I didnt edit it, and -e just changes the address, but I dont mind). this is the mail:

subject: "nginx bad bot blocker updated" from: "mydomain.local" to: "cron@mydomain.com"

now I've had to fix some issue* and since then I noticed I'm getting another mail simultaneously:

subject: "Cron root@mydomain sudo /usr/local/sbin/update-ngxblocker -e cron@mydomain.com" from: "root@mydomain.com (Cron Daemon)" to: "root@mydomain.com"

What could be the reason for this? And which of those mails should not exist?

*I noticed I wasnt getting mails since a couple of months due to not reloading dovecot when I last updated my ssl cert, I also created an alias from root to my non admin account which was probably wrong and I deleted it again

br4nnigan commented 2 years ago

I'm just using update-ngxblocker | sed 's/\x1b\[[0-9;]*m//g' | mail now