LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-03-2015, 10:36 AM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Rep: Reputation: Disabled
amavisd-new not running or refusing connection


I have Postfix/Dovecot setup correctly and compiled from Slackbuilds.org (I also have compiled amavisd-new from slackbuilds). I know it works fine as I can send and receive emails if I comment any of my config settings that have to do with amavisd-new. Once I uncomment them however I can no longer send or receive email.

In my /var/log/mailllog I get this when trying to send an email to an external domain

Code:
Aug  3 11:24:47 mypc postfix/qmgr[5955]: 6E240880EA7: from=<bob@mydomain.com>, size=1441, nrcpt=1 (queue active)
Aug  3 11:24:47 mypc postfix/lmtp[5963]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Aug  3 11:24:47 mypc postfix/lmtp[5963]: 6E240880EA7: to=<phillip@externaldomain.com>, relay=none, delay=0.21, delays=0.21/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Now there is no reason for the connection to be refused. It is allowed on my iptables firewall rule, which leads me to believe amavisd-new isn't really running.

netstat -tap shows this

Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 *:imaps                 *:*                     LISTEN      1369/dovecot        
tcp        0      0 *:nfsd                  *:*                     LISTEN      -                   
tcp        0      0 mypc-mydom.ain.com:64738 *:*                    LISTEN      1422/murmurd        
tcp        0      0 *:pop3s                 *:*                     LISTEN      1369/dovecot        
tcp        0      0 *:time                  *:*                     LISTEN      5505/inetd          
tcp        0      0 localhost:10025         *:*                     LISTEN      5953/master         
tcp        0      0 *:submission            *:*                     LISTEN      5953/master         
tcp        0      0 localhost:20203         *:*                     LISTEN      1358/perl           
tcp        0      0 *:netbios-ssn           *:*                     LISTEN      1244/smbd           
tcp        0      0 *:56109                 *:*                     LISTEN      -                   
tcp        0      0 *:pop3                  *:*                     LISTEN      1369/dovecot        
tcp        0      0 *:imap                  *:*                     LISTEN      1369/dovecot        
tcp        0      0 *:20111                 *:*                     LISTEN      1261/vsftpd         
tcp        0      0 *:sunrpc                *:*                     LISTEN      652/rpc.portmap     
tcp        0      0 *:x11                   *:*                     LISTEN      5007/X              
tcp        0      0 *:auth                  *:*                     LISTEN      5505/inetd          
tcp        0      0 *:51442                 *:*                     LISTEN      730/rpc.mountd      
tcp        0      0 192.168.122.1:domain    *:*                     LISTEN      1493/dnsmasq        
tcp        0      0 necc-data.datagl:domain *:*                     LISTEN      688/named           
tcp        0      0 localhost:domain        *:*                     LISTEN      688/named           
tcp        0      0 localhost:ipp           *:*                     LISTEN      858/cupsd           
tcp        0      0 *:34679                 *:*                     LISTEN      656/rpc.statd       
tcp        0      0 *:smtp                  *:*                     LISTEN      5953/master         
tcp        0      0 localhost:rndc          *:*                     LISTEN      688/named           
tcp        0      0 *:892                   *:*                     LISTEN      712/rpc.rquotad     
tcp        0      0 *:microsoft-ds          *:*                     LISTEN      1244/smbd           
tcp        0      0 *:20222                 *:*                     LISTEN      685/sshd            
tcp        0      0 mypc-mydom.ain.com:smtp server202.179.itc:31486 ESTABLISHED 6028/smtpd          
tcp        0      0 mypc-mydom.ain.com:smtp static-93-581-133:39048 ESTABLISHED 5956/smtpd          
tcp        0      0 mypc-mydom.ain.com:imaps static-93-2581-133:65137 ESTABLISHED 4717/dovecot/imap-l 
tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      1369/dovecot        
tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      1369/dovecot        
tcp6       0      0 [::]:submission         [::]:*                  LISTEN      5953/master         
tcp6       0      0 [::]:netbios-ssn        [::]:*                  LISTEN      1244/smbd           
tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      1369/dovecot        
tcp6       0      0 [::]:imap               [::]:*                  LISTEN      1369/dovecot        
tcp6       0      0 [::]:x11                [::]:*                  LISTEN      5007/X              
tcp6       0      0 [::]:http               [::]:*                  LISTEN      1232/httpd          
tcp6       0      0 ::1:ipp                 [::]:*                  LISTEN      858/cupsd           
tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      5953/master         
tcp6       0      0 ::1:rndc                [::]:*                  LISTEN      688/named           
tcp6       0      0 [::]:https              [::]:*                  LISTEN      1232/httpd          
tcp6       0      0 [::]:microsoft-ds       [::]:*                  LISTEN      1244/smbd           
tcp6       0      0 [::]:20222              [::]:*                  LISTEN      685/sshd
So it seems the amavisd services are started, all except amavisd-new ?

And finally if I do /etc/rc.d/rc.amavisd-new I get
Code:
/etc/rc.d/rc.amavisd-new restart
amavis-mc daemon is not running
Starting amavis-mc daemon
Stopping amavisd-signer daemon
Starting amavisd-signer daemon
Restarting amavisd-new daemon
The amavisd daemon is apparently not running, no PID file /var/amavis/amavisd.pid
For one, there is no directory amavis in my /var folder and I remember when compiling from Slackbuilds it told me the home directory for amavis was /var/lib/amavis but maybe that isn't important. The rc.amavisd-new calls for a pid file in /var/run/amavis

Furthre more,

Code:
/etc/rc.d/rc.amavisd-new status
cat: /var/run/amavis/amavis-mc.pid: No such file or directory
amavis-mc daemon running with PID: 
cat: /var/run/amavis/amavisd.pid: No such file or directory
amavisd-new daemon running with PID: 
amavisd-signer daemon running with PID: 6133
Which is exactly what I thought...now...why is it doing this?

Last edited by Altiris; 08-03-2015 at 10:41 AM.
 
Old 08-03-2015, 12:20 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
What do you have in your conf file? If it is being carried over from CentOS, it may have files/logs/binaries in different locations than the SlackBuild sets up, which can prevent it from starting. Can you post your conf file?

Also, did you follow all the setup instructions at the bottom of the README.SBo?

Something that can sometimes also help you find out the issue is to grab the actual command line from the rc.amavisd-new and run it on a command line and see if you get any helpful output. In general, you may need to modify options slightly if it is redirecting output or starting in daemon mode. I'm not familiar enough with these programs to know what the options do, but according to the rc.amavisd-new file, they should be started in this order:

amavis-mc
amavisd-signer
amavisd
 
Old 08-03-2015, 02:19 PM   #3
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
What do you have in your conf file? If it is being carried over from CentOS, it may have files/logs/binaries in different locations than the SlackBuild sets up, which can prevent it from starting. Can you post your conf file?

Also, did you follow all the setup instructions at the bottom of the README.SBo?

Something that can sometimes also help you find out the issue is to grab the actual command line from the rc.amavisd-new and run it on a command line and see if you get any helpful output. In general, you may need to modify options slightly if it is redirecting output or starting in daemon mode. I'm not familiar enough with these programs to know what the options do, but according to the rc.amavisd-new file, they should be started in this order:

amavis-mc
amavisd-signer
amavisd
My .conf file carries things from CentOS, yes but basically, I did NOT just replace the conf file that was in Slackware when it was compiled and slap on the CentOS one. I opened them side by side and looked for changes. I believe I made one or two changes in the .conf that had to do with the path. Ill point it out when I paste the conf. I believe I followed all of the steps in that README.SBo file....I remember now in that README file under -Setup-, Number 5 there was no /var/lib/spamassassin folder, and when I ran spamd it created the folder but as root:root so I just did chowned it root:amavis to see if that was enough. I have not turned on debugging mode though...which I will do.
I'll try starting it on its own, although I don't know how far I can get there. Debug mode will probably be best for me.


Here is /etc/amavisd.conf
http://pastebin.com/6Se5pq67

Some things I would like to point out, I changed the $daemon_user and $daemon_group from vscan to amavis (there was nothing about vscan in README.SBo so I figured I had to do that). I also changed the $MYHOME....I see that's commented now...the $ throws me off as I forget about the hashtag...hopefully that wasn't the problem. Basically, I changed the home from I believe /var/amavis to /var/lib/amavis ....and that option is commented which I only noticed now as I am using a client terminal (SSHed, and gedit color codes things unlike leafpad on Slackware). Although I don't know if I should leave that commented or not. I edited the $myhostname and $mydomain option, and I also uncommented the thing about clamav/clamd and made sure the Socket was the same as in /etc/clamd.conf I believe I just had to make it from .sock to .socket in amavisd.

I will turn on debugging and see what I can get.
 
  


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
Amavisd error running uptime eugenz Linux - Server 3 09-25-2012 04:02 AM
Amavisd Running - Amavis-milter is Not carlosinfl Linux - Server 2 06-18-2008 10:16 AM
sshd refusing connection ??? mayank_a Linux - Security 1 10-16-2005 12:50 AM
rndc refusing connection? bulzbb Fedora 7 06-21-2004 05:04 AM
ssh refusing connection Sonny Linux - Security 3 01-24-2002 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:27 AM.

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