Re: [exim] Perl integration - context?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andrew C Aitchison
Ημερομηνία:  
Προς: Felipe Gasper
Υ/ο: exim users
Αντικείμενο: Re: [exim] Perl integration - context?
On Thu, 10 Jun 2021, Felipe Gasper via Exim-users wrote:

>> On Jun 10, 2021, at 00:52, Andrew C Aitchison <andrew@???> wrote:
>>
>>> On Wed, 9 Jun 2021, Felipe Gasper via Exim-users wrote:
>>>
>>> The idea is more to prevent message delivery during a backup or account reconfiguration.
>>
>> exim_lock is the tool you are looking for.
>
> With this tool is there any way to differentiate
> "waiting for lock"from "lock acquired"
> other than parsing the output stream?


>From spec.txt 54.15 Mailbox maintenance (exim_lock)

The utility requires the name of the file as its first argument.
If the locking is successful, the second argument is run as a command
(using C's system() function); if there is no second argument, the
value of the SHELL environment variable is used; if this is unset or
empty, /bin/sh is run. When the command finishes, the mailbox is
unlocked and the utility ends.

Your backup/account maintenance script doesn't need to know anything
about the lock; exim_lock only runs your command or script once it has
acquired a lock. Neither spec.txt nor the Debian/Ubuntu man page say
anything about return codes so you would have to investigate further
to see how to check whether your job succeeded.

-- 
Andrew C. Aitchison                    Kendal, UK
             andrew@???