CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • amavisd debug error. . .
Pages: [1]

Author Topic: amavisd debug error. . .  (Read 4463 times)

pattyk

  • Guest
amavisd debug error. . .
June 23, 2008, 12:17:11 pm
Question 1:  When I start amavisd with the debug option it's complaining:

[root@myhost/]# amavisd debug
Config file "Not a directory: --list" does not exist, at /usr/sbin/amavisd line 1264.

I don't know perl I but for what it's worth,  line 1264 is here:

Code: [Select]
1252    # read and evaluate configuration files (one or more)
1253    sub read_config(@) {
1254      my(@config_files) = @_;
1255      for my $config_file (@config_files) {
1256        my($msg);
1257        my($errn) = stat($config_file) ? 0 : 0+$!;
1258        if    ($errn == ENOENT) { $msg = "does not exist" }
1259        elsif ($errn)      { $msg = "is inaccessible: $!" }
1260        elsif (-d _)       { $msg = "is a directory" }
1261        elsif (!-f _)      { $msg = "is not a regular file" }
1262       elsif ($> && -o _) { $msg = "is owned by EUID $>, should be owned by root"}
1263        elsif ($> && -w _) { $msg = "is writable by EUID $>, EGID $)" }
1264        if (defined $msg)  { die "Config file \"$config_file\" $msg," }
1265        $! = 0;
1266        if (defined(do $config_file)) {}
1267        elsif ($@ ne '') { die "Error in config file \"$config_file\": $@" }
1268        elsif ($! != 0)  { die "Error reading config file \"$config_file\": $!" }
1268      }

And the only instance of --list I find is here:

2039    # my($old_path) = $ENV{PATH};
2040    # $ENV{PATH} = "/bin:/usr/bin";
2041      foreach my $dir (@dirs) {
2042        push(@config_files, `run-parts --list "$dir"`);
2043    }


Question 2: Does CiviMail "play nice" with clamd? I ask because the 40-civimail addition to amavisd.conf provided turns off av-scanning. Can I just enable it?


If it makes a difference, my set up is as follows:

CiviCRM 2.0.4 w/Joomla 1.0.15

vps centos-5-x86-eapps

Packages:
postfix        2.3.3-2
amavisd-new     2.5.4-1.el5.rf   
dovecot     1.0-1.2.rc15.el5
mysql         5.0.51-1eapps
php         5.2.5-1eapps
perl        5.8.8-10.el5_0.2
perl-SOAP-Lite    0.71-1.el5.rf

Email/Verp version 0.06
./usr/lib/perl5/site_perl/5.8.8/Mail/Verp.pm

spamassassin     3.2.4-1.el5.rf
clamav-db     0.93.1-1.el5.rf
clamd         0.93.1-1.el5.rf
clamav         0.93.1-1.el5.rf

And the many dependencies. . .

bienvolio

  • Guest
Re: amavisd debug error. . .
August 09, 2008, 12:08:10 am
I'm attempting to set up CiviMail using the standard installation, and I'm encountering the same issue with amavisd that Patty describes above.

I have completed all of the steps before the step "Restart Postfix and AMaViS."

As I complete this step, Postfix starts just fine. But when I attempt to restart AMaViS I get the following:

# amavisd restart
Config file "Not a directory: --list" does not exist, at /usr/sbin/amavisd line 1264.


Can anyone help me to debug this?


Here's my environment:
CiviCRM 2.0.1
Drupal 5.7
AMaViS 2.4.2
Perl 5.8.8
MySQL 5.0.51a
PHP 5.2.5
Apache 2.2.6
Fedora Core 6

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: amavisd debug error. . .
August 09, 2008, 12:43:32 pm

your best bet will be to check the offending line and figuring out whats wrong. alternatively, you might want to check on an amavisd specific mailing list

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bienvolio

  • Guest
Re: amavisd debug error. . .
August 09, 2008, 03:51:18 pm
Thanks Lobo, let me be more precise.  Here is the offending line, with context:

# my($old_path) = $ENV{PATH};
# $ENV{PATH} = "/bin:/usr/bin";
  foreach my $dir (@dirs) {
    push(@config_files, `run-parts --list "$dir"`);
  }
# $ENV{PATH} = $old_path;

This offending line is UNIQUE to the modified version of amavisd which is provided in the CiviMail configuration instructions.  It is NOT in the original version of amavisd.
(See http://svn.civicrm.org/civicrm/branches/v1.9/tools/amavisd-new/amavisd-new-2.4.2/amavisd)

That's why I'm posting here.  Someone in the CiviCRM project modified the original amavisd code in this way, so I'm really looking for that person to help debug a problem that seems to be affecting a number of CiviCRM users.

I'm willing to help in anyway I can, but I'm not sure where to start.  I simply don't have the context for why the code was modified in this way.  I'm hoping that you or another expert on CiviCRM can help.  Can you?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: amavisd debug error. . .
August 09, 2008, 11:26:25 pm

hmm, i dont think we added that line. a search for "amavisd run-parts", i get quite a few results

http://www.google.co.nz/search?q=amavisd+run-parts&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

i'm pretty sure that we did not change or modify that part of the code.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bienvolio

  • Guest
Re: amavisd debug error. . .
August 10, 2008, 11:23:42 am
Instead of doing a Google search, please search the code in the amavisd file itself, and then you will see the discrepancy I'm referring to. 

If you look at the modified version of amavisd provided by the CiviCRM team, you will see that "run-parts" and "--list" only occur on one line in the file:
http://svn.civicrm.org/civicrm/branches/v1.9/tools/amavisd-new/amavisd-new-2.4.2/amavisd

If you look at the original version of amavisd that is installed by default in version 2.4.2 (the version specifically requested in the CiviMail configuration), a search for "run-parts" or "--list" finds NO matches.
http://www.ijs.si/software/amavisd/amavisd-new-2.4.2.tar.gz

There is clearly a discrepancy between the two.  It is possible that the Amavis folks actually wrote this line but later removed it for version 2.4.2, but in that case, the CiviCRM modified version is still out of synch and is the troublemaker.

I am eager to help debug this issue.  How can I help us get started?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: amavisd debug error. . .
August 10, 2008, 01:54:00 pm

check: http://patches.ubuntu.com/a/amavisd-new/extracted/30_conf.d_support_builtin.dpatch

we use the ubuntu distribution. the comments explain why they patched it. You might want to fix it for fedora and post the patch here

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bienvolio

  • Guest
Re: amavisd debug error. . .
August 13, 2008, 09:11:32 am
Thanks again Lobo, but I took a look at this file, and it's simply too obscure to help. 

I don't have the context to understand what it's attempting to do, or what changes I would need to make it work in the context of CiviCRM on Fedora.

Don't get me wrong - I have been writing code for years, but when debugging systems, context is everything.  I hoped someone with better context here could help me out.

I must admit I'm disappointed.  I (and others) am hitting a roadblock down a *supported, mainline* installation path for CiviMail, and the only response here is a terse "not our problem" and then "fix it yourself."

I am a huge fan of CiviCRM. It seems CiviMail needs some further investment to meet the same quality bar. I'd like to help it get there in any way I can.   

I have a bug here in a mainline installation scenario.  I can repro it on my server, and I am happy to document the resolution for the community.  I just need someone with better context to help me debug. 

Can anyone help me debug this issue?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: amavisd debug error. . .
August 13, 2008, 11:56:21 am

If we were experts / more knowledgeable about amavisd and had any idea about why that code is there, we would definitely help out and give you a workaround. amavisd is much a blackbox to us, as it is to you. We dont have much better context either (unfortunately). This issue is an upstream patch for us, so a bit transparent to us.

You can start helping by getting better context and helping fix / resolve this issue.

lobo



A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

bienvolio

  • Guest
Re: amavisd debug error. . .
August 14, 2008, 09:37:40 pm
Thanks Lobo - that makes sense.   

If there is an Amavisd expert out there who can help, please jump on the thread. 

I am willing to buy pizza and beer for whoever can help me resolve this issue and define a workaround for the community.  ;D

I'll then post the resolution to the community. 

Anyone out there?

blargman

  • Guest
Re: amavisd debug error. . .
September 26, 2008, 02:27:10 am
Just reverse the patch that he posted. It's for debian and breaks fedora/redhat systems.   I did this and it worked great.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • amavisd debug error. . .

This forum was archived on 2017-11-26.