New Beta 4.58.6 released

Julian Field MailScanner at ecs.soton.ac.uk
Tue Jan 30 10:35:02 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I just noticed a nasty obvious bug in KickMessage in Postfix.pm.

Please find the "sub KickMessage" line in Postfix.pm and change the code 
to this:

  # Send an I down the FIFO to the Postfix queue manager, so that it reads
  # its incoming queue.
  # I am passed a hash of queues --> space-separated string of message ids
  sub KickMessage {
    my($queue2ids) = @_;
    my($queue);

    # Do a kick for every queue that contains some message ids
    foreach $queue (keys %$queue2ids) {
      next unless $queue2ids->{$queue};

      # Using the spool directory with the last element chopped off,
      # find the public directory wth the qmgr FIFO in it. Send an I
      # to that FIFO.
      my $public = $queue;
      $public =~ s/[^\/]+$/public/;
      next unless $public; # Sanity checking!
      my $fh = new FileHandle;
      $fh->open(">$public/qmgr") or
        MailScanner::Log::WarnLog("KickMessage failed as couldn't write 
to " .
                                  "%s, %s", "$public/qmgr", $!);
      print $fh "I";
      $fh->close;
    }
    return 0;
  }

That stands rather more chance of working properly. But please do test 
this to ensure it works. If you remove the "Sanity checking!" line 
completely and then run it as you were before, you should not get any 
error message again. Let me know how you get on.

Thanks!

Jules.


Dave wrote:
> I'm getting an error in the new version:
> KickMessage failed as couldn't write to /qmgr, Permission denied
>
> I'm guessing that is path error on my part somewhere, but being a mailscanner
> newbie, I'm just not sure where to begin with it.
>
>
>
>   

Jules

- -- 
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654



-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.5.2 (Build 4075)
Comment: (pgp-secured)
Charset: ISO-8859-1

wj8DBQFFvxGIEfZZRxQVtlQRAootAKC5YCoQkDw0iw3EqWAgI5l7okjTfwCg9deu
miBvm0OkAP+TdvNXKYY5w7I=
=6I5P
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk



More information about the MailScanner mailing list