Archive Mail, Exim and Locking Bug? (was RE: [ MAILSCANNER] Locki ng failing?)
Julian Field
mailscanner at ecs.soton.ac.uk
Fri May 2 13:47:00 IST 2003
Brilliant. Thanks a lot for letting me know.
At 13:37 02/05/2003, you wrote:
>Hi Julian. Just wanted to let you know that the modified patch I posted
>last Friday seems to be working well. I have had this in production now for
>about 4 days now.
>
>Jason
>
> > -----Original Message-----
> > From: Julian Field [mailto:mailscanner at ECS.SOTON.AC.UK]
> > Sent: Friday, April 25, 2003 1:59 PM
> > To: MAILSCANNER at JISCMAIL.AC.UK
> > Subject: Re: [MAILSCANNER] Archive Mail, Exim and Locking
> > Bug? (was RE:
> > [ MAILSCANNER] Locki ng failing?)
> >
> >
> > If you can get this thoroughly tested before 1st May, then it
> > can go in the
> > new stable release. Otherwise it will have to wait a month or
> > so. I can put
> > it out as an "unstable" release though, so don't worry too much.
> >
> > The next release will probably be on the first Friday (or possibly the
> > weekend) after 1st May. I like releasing at awkward times, it
> > means a few
> > people test it before Monday morning, which gives me a chance
> > to fix any
> > cock-ups.
> >
> > At 18:16 25/04/2003, you wrote:
> > >"Desai, Jason" <jase at SENSIS.COM> wrote:
> > > >
> > > >Thanks Tony. I had just narrowed it down to losing the
> > lock when copying
> > > >the -D file. If you want me to test any patches just let me know.
> > >
> > >I'm testing this at the moment.
> > >
> > >--- EximDiskStore.pm 27 Mar 2003 17:28:47 -0000 1.7
> > >+++ EximDiskStore.pm 25 Apr 2003 16:33:27 -0000 1.8
> > >@@ -358,14 +358,22 @@
> > >
> > >
> > > # Copy a dfile and hfile to a directory
> > >+# This has to be done in a subprocess in order to avoid
> > breaking POSIX locks.
> > > sub CopyToDir {
> > > my($this,$dir) = @_;
> > >+ my $pid = fork;
> > >+ MailScanner::Log::DieLog("fork: $!") if not defined $pid;
> > >+ if ($pid) {
> > >+ waitpid $pid, 0;
> > >+ return;
> > >+ }
> > > my $hpath = $this->{hpath};
> > > my $dpath = $this->{dpath};
> > > my $hfile = basename($hpath);
> > > my $dfile = basename($dpath);
> > > copy($hpath, "$dir/$hfile");
> > > copy($dpath, "$dir/$dfile");
> > >+ exit;
> > > }
> > >
> > >
> > >@@ -415,8 +423,18 @@
> > > if (MailScanner::Config::Value('storeentireasdfqf')) {
> > > $this->CopyToDir($targetdir);
> > > } else {
> > >+ # Do this in a subprocess in order to avoid breaking
> > POSIX locks.
> > >+ my $pid = fork;
> > >+ MailScanner::Log::DieLog("fork: $!") if not defined $pid;
> > >+ if ($pid) {
> > >+ waitpid $pid, 0;
> > >+ return;
> > >+ }
> > > my $target = new IO::File "$targetdir/$targetfile", "w";
> > >+ MailScanner::Log::DieLog("writing to
> > $targetdir/$targetfile: $!")
> > >+ if not defined $target;
> > > $this->WriteEntireMessage($message, $target);
> > >+ return;
> > > }
> > >
> > > return 1;
> > >@@ -447,9 +465,9 @@
> > >
> > > my $pipe = new IO::Pipe;
> > > my $pid;
> > >-
> > >+
> > > if (not defined $pipe or not defined ($pid = fork)) {
> > >- MailScanner::Log::WarnLog("Cannot build message from
> > $this->{dpath} " .
> > >+ MailScanner::Log::DieLog("Cannot build message from
> > $this->{dpath} " .
> > > "and
> > $message->{headerspath}, %s", $!);
> > > } elsif ($pid) { # Parent
> > > $pipe->reader();
> > >
> > >
> > >Tony.
> > >--
> > >f.a.n.finch <dot at dotat.at> http://dotat.at/
> > >MALIN HEBRIDES: EAST OR SOUTHEAST 5 OR 6. RAIN AT TIMES.
> > MODERATE OR GOOD.
> >
> > --
> > Julian Field
> > www.MailScanner.info
> > Professional Support Services at www.MailScanner.biz
> > MailScanner thanks transtec Computers for their support
> >
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support
More information about the MailScanner
mailing list