Re: [Exim] Delivering one mail at a time

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Ceri
Ημερομηνία:  
Προς: Sheldon Hearn
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Delivering one mail at a time
On Wed, Mar 20, 2002 at 07:22:12PM +0200, Sheldon Hearn wrote:
>
>
> On Wed, 20 Mar 2002 16:49:45 GMT, Ceri wrote:
>
> > I have a *very* slow program that I pipe mails for a certain local user
> > to, which will end up rejecting any mails after 10 attempts to lock the
> > files it's writing to (as another instance of the program is still
> > delivering an earlier mail).
>
> If speed isn't too much of an issue, just write a shell wrapper for the
> program that makes use of FreeBSD lockf(1) as follows:
>
> #!/bin/sh
> #
> lockf -ks /path/to/.tmp/slowprog.lock /path/to/slowprog


That looks excellent, thanks Sheldon.

Speed is not an issue at all - as long as the mail eventually gets there
(and it's ok if it takes days) as opposed to bouncing then I'll be happy.

How will this deal with pipes though ?
I've just played with this a bit and lockf doesn't seem to pass on the
standard input.

> It doesn't solve the problem of having a potentially large number of
> Exim procresses all waiting around for their instance of the wrapper to
> grab the lock on slowprog.lock. :-)


That's cool, as long as they just keep on trying...

> Of course, this assumes (because I've seen you active on the FreeBSD
> mailing lists) that you're trying this on a FreeBSD system.


That's the case, yes.
Just got straddled with a commit bit as it happens :)

Ceri

--
keep a mild groove on