On 06.12.18 15:45, Dominic Raferd wrote:
>I am using incrond to monitor an mbox file (in /var/mail) for changes,

On Fri, 7 Dec 2018 at 09:15, Matus UHLAR - fantomas <uh...@fantomas.sk>
wrote:
hmmm, why?
maybe there's other way to implement your requirement

On 07.12.18 10:22, Dominic Raferd wrote:
The use case is my home-grown quarantining system. Mail server periodically
emails me about quarantined emails - I can reply to these emails using
short codes, this reply is placed by postfix in the monitored $MBOXFILE.
When $MBOXFILE changes, incrond triggers a script which looks at the latest
email in it and interprets it to take the necessary actions i.e. removing
unwanted mails from quarantine, releasing wanted ones, whitelisting sender
etc.

You can run script at the time of mail delivery by using .forward that pipes
mail to a script. You don't need to watch file for changes.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"They say when you play that M$ CD backward you can hear satanic messages."
"That's nothing. If you play it forward it will install Windows."

Reply via email to