Run script after pmg-smtp-filter

mbrother

Member
Oct 29, 2021
35
7
13
41
Hi,

Can I run a bash script after pmg-smtp-filter process finished? Thanks for any help!
 
Last edited:
Hi Stoiko,

Thank you for your answer. I want to write log to custom file when an email is blocked by pmg-smtp-filter. Have you any idea to do that?
 
Thank you for your answer. I want to write log to custom file when an email is blocked by pmg-smtp-filter. Have you any idea to do that?
pmg-smtp-filter logs all final actions (actually most actions) and the rule-name to the journal/syslog - e.g.:
Code:
Aug 08 11:53:33 pmg7 pmg-smtp-filter[7505]: 809DF62F0DD1DBE2BC: accept mail to <xx@xxyyy.example> (DE7B46A835) (rule: default-accept)
you can use this and create a dedicated syslog file (rsyslog can match quite effectively for patterns and write those to a dedicated file) for all such actions (keep in mind that the log-lines should also end up in /var/log/syslog, if you want to use the Tracking Center)

see e.g. https://www.rsyslog.com/doc/v8-stable/configuration/filters.html
(but there's tons of HOWTOs on the internet)

I hope this helps!
 

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!