BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 23rd, 2007, 11:25 PM
satimis satimis is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 488 satimis User rank is Corporal (100 - 500 Reputation Level)satimis User rank is Corporal (100 - 500 Reputation Level)satimis User rank is Corporal (100 - 500 Reputation Level)satimis User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 12 h 27 m 23 sec
Reputation Power: 9
Fail to test amavisd-new

Hi folks,


OpenBSD 4.0
amavisd-new-2.5.0

Failed to test amavisd-new

# /usr/local/sbin/amavisd -u _clamav debug
Code:
 
....
.....
/var/amavis/db/; BerkeleyDB 0.31, libdb 4.5
May 18 12:58:42 mail.satimis.com /usr/local/sbin/amavisd[3702]: 
(!!)TROUBLE in pre_loop_hook: QUARANTINEDIR directory not writable:    

/var/virusmails at /usr/local/sbin/amavisd line 7802.
Suicide () TROUBLE in pre_loop_hook: QUARANTINEDIR directory not 
writable: /var/virusmails at /usr/local/sbin/amavisd line 7802.


cat /etc/amavisd.conf
Code:
......
$max_servers = 2;            # num of pre-forked children (2..15 is 
common), -m
$daemon_user  = '_clamav';     # (no default;  customary: vscan or 
amavis), -u
$daemon_group = '_clamav';     # (no default;  customary: vscan or 
amavis), -g

$mydomain = 'satimis.com';   # a convenient default for other settings

$MYHOME = '/var/amavis';   # a convenient default for other settings, 
-H
$TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR
$QUARANTINEDIR = '/var/virusmails';  # -Q
# $quarantine_subdir_levels = 1;  # add level of subdirs to disperse 
quarantine

# $daemon_chroot_dir = $MYHOME;   # chroot directory or undef, -R

$db_home   = "$MYHOME/db";      # dir for bdb nanny/cache/snmp 
databases, -D
$helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, 
-S
$lock_file = "$MYHOME/var/amavisd.lock";  # -L
$pid_file  = "$MYHOME/var/amavisd.pid";   # -P
......


Pls advise how to fix it. TIA


B.R.
satimis

Reply With Quote
  #2  
Old May 28th, 2007, 06:40 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,442 Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level)Scorpions4ever User rank is Major General (70000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 1 h 49 m 40 sec
Reputation Power: 797
Just a quick question. What are the permissions of /var/virusmails and is it writable by the _clamav user?
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month

Reply With Quote
  #3  
Old May 28th, 2007, 07:38 PM
satimis satimis is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 488 satimis User rank is Corporal (100 - 500 Reputation Level)satimis User rank is Corporal (100 - 500 Reputation Level)satimis User rank is Corporal (100 - 500 Reputation Level)satimis User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 12 h 27 m 23 sec
Reputation Power: 9
Quote:
Originally Posted by Scorpions4ever
Just a quick question. What are the permissions of /var/virusmails and is it writable by the _clamav user?

Hi Scorpions4ever,


Problem solved as follows;

# chown -R _clamav:_clamav /var/virusmails
No printout


# /usr/local/sbin/amavisd -u _clamav debug
Code:
......
.......
May 25 09:00:59 mail.satimis.com /usr/local/sbin/amavisd[14949]: May 25
09:00:59 mail.satimis.com /usr/local/sbin/amavisd[169]: Net::Server:
Child Preforked (14949)Net::Server: Parent ready for children.

May 25 09:00:59 mail.satimis.com /usr/local/sbin/amavisd[14949]: TIMING
[total 6 ms] - bdb-open: 6 (100%)100, rundown: 0 (0%)100

Stopped here


^C to exit;
Code:
^CMay 25 09:05:51 mail.satimis.com /usr/local/sbin/amavisd[169]:
Net::Server: 2007/05/25-09:05:51 Server closing!
May 25 09:05:52 mail.satimis.com /usr/local/sbin/amavisd[17456]:
child_finish_hook: invoking DESTROY methods
May 25 09:05:52 mail.satimis.com /usr/local/sbin/amavisd[17456]:
Amavis::Cache DESTROY called
May 25 09:05:52 mail.satimis.com /usr/local/sbin/amavisd[17456]:
Amavis::DB::SNMP DESTROY called
May 25 09:05:52 mail.satimis.com /usr/local/sbin/amavisd[14949]:
child_finish_hook: invoking DESTROY methods
May 25 09:05:52 mail.satimis.com /usr/local/sbin/amavisd[14949]:
Amavis::Cache DESTROY called
May 25 09:05:52 mail.satimis.com /usr/local/sbin/amavisd[14949]:
Amavis::DB::SNMP DESTROY called


# /usr/local/sbin/amavisd -u _clamav start
No complaint


Now I expect to run both clamav and amavisd-new as _clamav and encountered problem on performing following steps;

$ sudo chown -R _clamav:_clamav /var/db/clamav
No complaint

On clamd.conf, add:
Code:
User _clamav 



# /usr/local/sbin/clamd restart
Code:
Running as user _clamav (UID 539, GID 539)
ERROR: Can't open /var/log/clamd.log in append mode (check permissions!).
ERROR: Problem with internal logger. Please check the permissions on the
/var/log/clamd.log file. 


# ls -l /var/log | grep clamd.log
# find / -name clamd.log
Both w/o printout

If I create the file /var/log/clamd.log and;
chown _clamav /var/log/clamd.log

the file will grow continuously. I haven't figured out how to run "newsyslog" or "cron" to regulate it.


Any advice? TIA


B.R.
satimis

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Fail to test amavisd-new


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway