Re: [Exim] Re: invert queue_only_file?

Inizio della pagina
Delete this message
Reply to this message
Autore: Odhiambo G. Washington
Data:  
To: exim-users
Oggetto: Re: [Exim] Re: invert queue_only_file?
--
* Björn Lindström <bkhl@???> [20031020 19:47]: wrote:
> Sheldon Hearn <sheldonh@???> writes:
>
> > On (2003/10/18 03:12), Björn Lindström wrote:
> >
> >> I have this thing in my exim.conf:
> >>
> >> queue_only_file = smtp/var/run/offline
> >>
> >> and it works alright. But I think there should be a way to invert this,
> >> so it can just check for /var/run/pppd0.pid instead. Is there some way
> >> to do that?
> >
> > I don't think so. However, it seems to me that it would make more sense
> > to get the thing that manages your ppp connections to write a file.
> >
> > FreeBSD's ppp(8), for example, has the notion of linkup and linkdown
> > scripts. When the link comes up, /etc/ppp/ppp.linkup is run; when it
> > goes down, /etc/ppp.linkdown is run.
> >
> > So you could just "touch /var/run/exim.queue_only" in ppp.linkup and
> > "rm /var/run/exim.queue_only" in ppp.linkdown.
> >
> > Given that there are many things you may want to do when the link comes
> > up and goes down, your ppp manager is a good place for this to be
> > implemented, rather than Exim having to learn another hoop to jump
> > through.
>
> Duh, that's just the thing I'm doing now. It just feels redundant to
> have to touch/remove stuff in the ip-up/down scripts, when pppd is
> already creating a file for this very purpose when it connects.
>
> Also, since Exim's configuration files are so flexible otherwise, it
> would feel strange if it isn't possible to invert a simple statement
> like this.


You could be able to do this if the queue_only_file was expandable, coz
you could do something like ${if exists{/var/run/pppd0.pid} ...} but it
is a string, so you are out of luck in the Exim's config, or so I think.



        cheers
       - wash
+----------------------------------+-----------------------------------------+
Odhiambo Washington                     . WANANCHI ONLINE LTD (Nairobi, KE)  |
<wash at wananchi dot com>              . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121                 . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"
                         --from a /. post
--
[ Content of type application/x-pkcs7-signature deleted ]
--