[SOLVED] Banned IP information

Chriswiss

Well-Known Member
Mar 14, 2017
65
5
48
35
Hello,

Is it possible to have a function that informs the administrator if an email is "bounced" due to banned IP?

An example to better understand the demand.

Code:
status=bounced (host positivecoating-ch.mail.protection.outlook.com[104.47.1.36] said: 550 5.7.606 Access denied, banned sending IP [AAA.BBB.CCC.DDD]. To request removal from this list please visit https://sender.office.com/ and follow the directions. For more information please go to http://go.microsoft.com/fwlink/?LinkID=526655 (AS16012609) (in reply to RCPT TO command))

If such a message passes from the Syslog/Tracking center have a return by email.
So it allows the admin to do the necessary things.

Thank you very much.
Grüße
 
Hi,
Those bounce messages do not have a particular format and contain free text, thus making it difficult to get only the desired ones.

You can configure postfix to drop you(postmaster for the domain) a mail for each bounced mail - but this usually contains far too many mails to be an actual help - see http://www.postfix.org/postconf.5.html#notify_classes for details.

Alternatively you can take a look at fail2ban - which is AFAIR a rather nice and generic framework, parsing logs and setting actions (usually blocking via firewall, but you could probably use it as well to send you an email when a logline matches a regular expression)

Hope this helps!
 
Hello,

That's right, yes! I hadn't thought about using Fail2ban !
Thank you so much.

CG
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!