On Fri, 7 Dec 2018 at 10:40, Matus UHLAR - fantomas <uh...@fantomas.sk> wrote:
> >> 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. > That is neat, but not sure in that situation how I give the script permissions to operate on the quarantined files (i.e. run amavisd-release), and update whitelist files.