LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-04-2007, 09:31 PM   #1
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27
Blog Entries: 1

Rep: Reputation: 15
Spamd not able to start.


Hi All,

I'm a newbie to linux mail server.
Currently I'm using Slackware 10 and sendmail 8.13.2 in my office.
Recently, I notice that the spamd is not working and I try to start it, the spamd starts and later it stops again.

No mails are filtered by spamd.

And currently I have faced slow connection with the mail server. The mail has to be stuck in the outbox for awhile then can be sent out.

Anyone expert here please assist me on the above problem.

Thanks.
 
Old 09-04-2007, 10:50 PM   #2
andrewfeberwee
Member
 
Registered: Feb 2007
Posts: 30

Rep: Reputation: 15
That's not a lot to go on. Have you set up your procmairc to send mail through Spamassassin?
 
Old 09-04-2007, 11:58 PM   #3
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Hi,

How do i check on that ?
The system setup by a vendor last time and no documentation about it.
Now my turn to support it, i really do not have any idea.
 
Old 09-05-2007, 01:45 AM   #4
andrewfeberwee
Member
 
Registered: Feb 2007
Posts: 30

Rep: Reputation: 15
I am not sure about your release but on mine (RHEL3) it goes like this

1 ) make sure spamassassin is running
[root@lift01 temp]# service spamassassin status
spamd (pid 25564 24257 2445) is running...

2 ) check procmailrc in /etc mine looks something like this

# send mail through spamassassin
SHELL=/bin/sh
PMDIR=/etc/Procmail
LOGFILE=$PMDIR/pmlog
MAILDIR=$HOME/mail

:0fw
| /usr/bin/spamc

:0:
* ^Subject:.*SPAM
Spam

#EOF


I use Linux as a PDC , spam is automatically put in a user subfolder called SPAM using the above script for anything with a score > 7.5
 
Old 09-05-2007, 02:23 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can try to debug spamassassin, running:
Code:
spamassassin -D --lint
 
Old 09-05-2007, 04:30 AM   #6
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Hi bathory,

I have run the command and below is the result.

root@infra:/etc# spamassassin -D --lint
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/bin', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/usr/games', keeping.
debug: PATH included '/opt/www/htdig/bin', keeping.
debug: PATH included '/usr/lib/java/bin', keeping.
debug: PATH included '/usr/lib/java/jre/bin', keeping.
debug: PATH included '/opt/kde/bin', keeping.
debug: PATH included '/usr/lib/qt/bin', keeping.
debug: PATH included '/usr/share/texmf/bin', keeping.
debug: Final PATH set to: /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bi n:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/j ava/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin
debug: ignore: using a test message to lint rules
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin" for user state dir
debug: using "/root/.spamassassin" for user state dir
Created user preferences file: /root/.spamassassin/user_prefs
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: using "/root/.spamassassin" for user state dir
debug: bayes: no dbs present, cannot scan: /root/.spamassassin/bayes_toks
debug: Score set 1 chosen.
debug: Initialising learner
debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200
debug: bayes: 17323 untie-ing
debug: bayes: 17323 untie-ing db_toks
debug: is Net:NS::Resolver available? no
debug: is DNS available? 0
debug: running header regexp tests; score so far=0
debug: running body-text per-line regexp tests; score so far=1.27
debug: Razor2 is not available
debug: running raw-body-text per-line regexp tests; score so far=1.27
debug: running uri tests; score so far=1.27
debug: uri tests: Done uriRE
debug: running full-text regexp tests; score so far=1.27
debug: Razor2 is not available
debug: Current PATH is: /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin: /bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/jav a/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin
debug: Pyzor is not available: pyzor not found
debug: DCCifd is not available: no r/w dccifd socket found.
debug: DCC is not available: no executable dccproc found.
debug: all '*From' addrs: ignore@compiling.spamassassin.taint.org
debug: all '*To' addrs:
debug: running meta tests; score so far=1.27
debug: is spam? score=1.27 required=5 tests=DATE_MISSING,NO_REAL_NAME

anyway I'm not understand result of the debug??!!
 
Old 09-05-2007, 06:28 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
It looks normal even though you miss some modules.
Take a look at your logs (probably mail.log or maillog) to see if you find something about the problem. You can also run spamd in debug mode, using the "-D" option, to have more things logged.
 
Old 09-05-2007, 09:57 AM   #8
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Hi Bathory,

when I run the spamd -D, bellow are the result:

debug: Score set 0 chosen.
debug: Running in taint mode, removing unsafe env vars, and resetting PATH
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/bin', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/usr/games', keeping.
debug: PATH included '/opt/www/htdig/bin', keeping.
debug: PATH included '/usr/lib/java/bin', keeping.
debug: PATH included '/usr/lib/java/jre/bin', keeping.
debug: PATH included '/opt/kde/bin', keeping.
debug: PATH included '/usr/lib/qt/bin', keeping.
debug: PATH included '/usr/share/texmf/bin', keeping.
debug: Final PATH set to: /usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin

Could not create INET socket: Address already in use IO::Socket::INET: Address already in use

when I run netstat -lpm, bellow are the results

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN 868/inetd
tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 9890/amavisd (maste
tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 9899/sendmail: acce
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 945/mysqld
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 9896/sendmail: acce
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 957/smbd
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 868/inetd
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 5934/spamd -d
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 868/inetd

It looks like spamd is running and listening to port 783.
But I do not see any spamd in the maillog??!!
 
Old 09-06-2007, 02:30 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Could not create INET socket: Address already in use IO::Socket::INET: Address already in use
That's normal since spamd was running. What I told you is to start spamd using -D among the other startup options.

From the output of netstat I see that you're running amavisd. When you run amavisd as a spam/virus filter there is no need for spamd to run. Whenever a mail arrives it's amavisd that uses spamassassin to score the mail and decide if it's spam or not. So you better stop spamd from running and make sure it's not configured to run at system startup. Then restart amavisd (you can also use the debug option for it) and watch the amavisd logs if you suspect that it's not working as expected.

Regards
 
Old 09-06-2007, 03:59 AM   #10
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Blog Entries: 1

Rep: Reputation: 15
Hi Bathory,

Thanks for the information. Now I understand why my spamd is not running.Actually amavisd is doing the filtering job.

Recently I notice my smtp is slow for sending out mail messages and I have the following message when I restart sendmail service.

LibClamAv Error: hex2int() translation problem(40)
LibClamAv Error: readdb(): Malformed pattern line 30284 (file /tmp/clamav-ea3e7e6c8dbe5d3f/main.db)

Does it mean something wrong with my clamd or amavisd?
 
Old 09-06-2007, 04:48 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
So you should stop spamd from running and make sure it's not starting on system boot.
As for clamav, I think you should upgrade clamav to the latest version (0.91.2) to see if it solves your problem.

Regards

Last edited by bathory; 09-06-2007 at 05:15 AM.
 
Old 09-06-2007, 05:03 AM   #12
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Blog Entries: 1

Rep: Reputation: 15
The spamd is stopped and I try to find the tmp/clamav-ea3e7e6c8dbe5d3f/main.db, but unable to find it.

i'm not sure after upgrade , the amavisd still working or not or anything happens after upgrade.

Anyway I will find the document and try upgrade it.
 
Old 09-06-2007, 06:17 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can find your current clamd version running:
Code:
clamd -V
 
Old 09-08-2007, 06:43 PM   #14
Wilson_Lee
LQ Newbie
 
Registered: Apr 2007
Posts: 27

Original Poster
Blog Entries: 1

Rep: Reputation: 15
The command does not work on my system.....error show and nothing show in result.
 
Old 09-09-2007, 09:16 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Perhaps clamd is not in your PATH. You can use the whole path to it to run the command:
Code:
/path/to/clamd -V or
/path/to/clamscan -V
If you upgrade clamav successfully amavisd will work without any problems since it connects with clamd to scan for virusses through a socket (usually /tmp/clamd).
Mind that /tmp/clamd and /tmp/clamav-ea3e7e6c8dbe5d3f/main.db are 2 different things. The first one is the socket used by other programs to connect to clamd and the second is a temporary file created more likely during clamav virus definition updates.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Installing and configuring spamd LXer Syndicated Linux News 0 04-05-2007 04:31 PM
postfix + amavids + spamd saavik Linux - Networking 2 08-15-2006 12:19 AM
HELP, need to disable Spamd kyletaz Linux - Software 7 11-22-2005 02:45 PM
OpenBSD 3.4 - spamd log file 2G Sigkill(9) *BSD 2 10-11-2005 01:23 PM
How to filter postfix with spamd pembo13 Linux - Networking 2 09-10-2004 07:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration