> thanks very much. This is an Ubuntu server

Ah, ok.
I have now installed Ubuntu-12.04 on a virtual machine
and tried amavisd 2.8.0 on it.
 
> so, I did 'apt-get install amavisd-new'
> it complained about user amavis existing, I deluser amavis, re-run
> apt-get, dependencies get installed, etc, then, I got my previous
> /etc/amavisd.conf, adjusted host name, created /var/amavis/*lovers empty
> files, then tried, get this:
> 
> /down/amavisd-new-2.8.0-pre6# ./amavisd debug
> 
> (it's to do... tcp/unix sockets..? I have vague recollection of fighting
> this in the past...?)
> 
> May 22 13:32:31.331  ./amavisd[10514]: logging initialized, log level 2,
> syslog: amavis.mail
> May 22 13:32:31.331  ./amavisd[10514]: starting. ./amavisd at
> amavisd-new-2.8.0-pre6 (20120429), Unicode aware, LANG="en_AU.UTF-8"
> May 22 13:32:31.331  ./amavisd[10514]: perl=5.010001, user=, EUID: 117
> (117);  group=, EGID: 125 125 (125 125)
> May 22 13:32:31.355  ./amavisd[10514]: INFO: no optional modules:
> unicore::lib::Perl::Alnum.pl unicore::lib::Perl::SpacePer.pl
> unicore::lib::Perl::Word.pl unicore::lib::Alpha::Y.pl
> unicore::lib::Nt::De.pl IO::Socket::IP Unix::Getrusage
> May 22 13:32:31.356 ./amavisd[10514]: SpamControl: attempting to load
> scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
> May 22 13:32:31.356 ./amavisd[10514]: SpamControl: scanner SpamAssassin,
> module Amavis::SpamControl::SpamAssassin
> May 22 13:32:31.498 ./amavisd[10514]: INFO: SA version: 3.3.1, 3.003001,
> no optional modules: Net::CIDR::Lite Encode::Detect Razor2::Client::Agent
> IP::Country::Fast Image::Info Image::Info::GIF Image::Info::JPEG
> Image::Info::PNG Image::Info::BMP Image::Info::TIFF
> auto::NetAddr::IP::InetBase::inet_any2n
> auto::NetAddr::IP::InetBase::inet_n2ad
> auto::NetAddr::IP::InetBase::inet_n2dx
> auto::NetAddr::IP::InetBase::inet_ntoa
> auto::NetAddr::IP::InetBase::ipv6_aton
> auto::NetAddr::IP::InetBase::ipv6_ntoa
> May 22 13:32:31.499 ./amavisd[10514]: SpamControl: init_pre_chroot on
> SpamAssassin done
> May 22 13:32:31.499 ./amavisd[10514]: bind to
> /var/amavis/amavisd.sock|unix, 127.0.0.1:10024/tcp, 127.0.0.1:10026/tcp,
> 127.0.0.1:10586/tcp
> May 22 13:32:31.499 ./amavisd[10514]: (!)Net::Server: 2012/05/22-13:32:31
> Couldn't open pid file "/var/amavis/amavisd.pid" [13].\n\n  at line 318 in
> file /usr/share/perl5/Net/Server.pm
> May 22 13:32:31.499 ./amavisd[10514]: Net::Server: 2012/05/22-13:32:31
> Server closing!

Apparently you did not apply the Debian/Ubuntu patch, which lets amavisd
read config files from directories /usr/share/amavis/conf.d and
/etc/amavis/conf.d, so the assignment $pid_file in 10-debian_scripts
was not visited.

Just so that we remain on the same track, I wrapped my current code as:

  http://www.ijs.si/software/amavisd/amavisd-new-2.8.0-pre7.tar.gz

Please apply the attached patch to it, which brings it in line with
the Debian/Ubuntu modification to 2.6.5, and copy the resulting code
to /usr/sbin/amavisd-new, replacing the installed 2.6.5.
That should get you going.

  Mark
--- amavisd~	2012-05-22 15:45:04.000000000 +0200
+++ amavisd	2012-05-22 15:48:51.685181039 +0200
@@ -3543,12 +3543,12 @@
 # # attempt to read a list of config files to use instead of the default one,
 # # using an external helper script. Used by the Debian/Ubuntu distribution.
-# sub find_config_files(@) {
-#   my(@dirs) = @_;
-#   local $ENV{PATH} = '/bin:/usr/bin';
-#   my(@config_files) = map { `run-parts --list "$_"` } @dirs;
-#   chomp(@config_files);
-#   # untaint - this data is secure as we check the files themselves later
-#   map { untaint($_) } @config_files;
-# }
+sub find_config_files(@) {
+  my(@dirs) = @_;
+  local $ENV{PATH} = '/bin:/usr/bin';
+  my(@config_files) = map { `run-parts --list "$_"` } @dirs;
+  chomp(@config_files);
+  # untaint - this data is secure as we check the files themselves later
+  map { untaint($_) } @config_files;
+}
 
 #use CDB_File;
@@ -16638,7 +16638,7 @@
 if (!@config_files) {
   @config_files = ( '/etc/amavisd.conf' );
-# # Debian/Ubuntu specific:
-# @config_files = Amavis::Util::find_config_files('/usr/share/amavis/conf.d',
-#                                                 '/etc/amavis/conf.d');
+  # Debian/Ubuntu specific:
+  @config_files = Amavis::Util::find_config_files('/usr/share/amavis/conf.d',
+                                                  '/etc/amavis/conf.d');
 }
 

Reply via email to