Re: [exim] How to rotate exim file using cron

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Dominic Benson
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] How to rotate exim file using cron
On 03/11/10 08:16, Bobby Shahzad wrote:
> Hello,
>
> I want to setup a cron to rotate exim file with a backup file every 7
> minutes. But the cp command doesnt seem to be working.
>
> I use
>
>
> 35    *    *    *    *    /bin/cp -f /etc/exim.conf6 /etc/exim.conf; service
> exim restart;
> 42    *    *    *    *    /bin/cp -f /etc/exim.conf7 /etc/exim.conf; service
> exim restart;

>
>

What crontab is this in? If it's your personal one, you probably don't
have permission; if it is one of the system ones (/etc/crontab,
/etc/cron.d/*) then you need to specify the user between the timing rule
and the command (e.g. 35 * * * * root /bin/cp -f /etc/exim.conf6
/etc/exim.conf; service exim restart;)

The other possibility I can think of (depending on how your installation
is set up), is that it *does* work, but that the file [/etc/exim.conf]
is auto-generated, and so replaced when you restart Exim - I'm thinking
here of behaviour akin to /var/lib/exim4/config.autogenerated on Debian
systems.

What are you trying to achieve by changing config every 7 mins?

Dominic