SpamAssassin: Unable to bind to port

Discussion in 'Installation/Configuration' started by rrhode, Mar 20, 2009.

  1. rrhode

    rrhode New Member

    Hi there,

    I am having some troubles setting up Spamassassin. Hopefully someone can help me out with their great knowledge =)

    I attempted to follow this guide (I now realize that it seems to be outdated and likely redundant): http://howtoforge.com/virtual-hosting-with-virtualmin-on-centos5.1

    Only to foolishly discover later on that I can install Virtualmin with its install script and forget all this mess. However since I have come this far it seems like it is only possible to continue the rest of the way without formatting and starting over. They told me on the Virtualmin forums that if I were to use the install script now I would likely run into even more troubles.

    So I have followed the guide for the most part but I am getting some errors in a couple places.

    I installed proftp instead of vsftp and I have imapproxy disabled because I haven't managed to get it working. I doubt I would even use IMAP anyway so maybe I can find some way to disable it some day. I also installed Horde instead of Roundcube. In fact that guide makes you install an insecure version of Roundcube.

    First of all when I am trying to do this step on page 2:

    * Install perl modules required by spamassassin:

    perl -MCPAN -e 'install Mail::SPF'
    perl -MCPAN -e 'install Mail::SPF::Query'
    perl -MCPAN -e 'install Net::Ident'
    perl -MCPAN -e 'install IP::Country::Fast'
    perl -MCPAN -e 'install Mail::DomainKeys'
    perl -MCPAN -e 'install Mail::DKIM'

    At the line perl -MCPAN -e 'install Mail::SPF::Query' it does not ever pass all the tests for some reason. It just doesn't seem to go. Oddly it seems to pass a random number of tests each time. There are always a few that it fails but sometimes it may fail 2, sometimes 9. I don't get it. Maybe I don't need to do the tests. I don't know. Maybe I already installed the moduels some. Maybe I have a huge mess and I should start over anyway.

    I then am not sure if the rest of the lines work either. However maybe I already have these modules installed somewhere I do not know how to check, I havent found that out yet either.

    When I run /etc/init.d/spamass-milter start the maillog fills up. I once got around this by playing with the sock file permissions and modifying its location but since I have put it back because all I got were more errors by playing with it.

    Currently I believe it is setup the way it is in the guide and in my mail log I get this over and over and over again. It will constantly send me emails and it seems the spamass-milter will constantly restart itself.

    Mar 20 00:08:40 server1 spamass-milter[18099]: spamass-milter 0.3.1 starting
    Mar 20 00:08:40 server1 spamass-milter[18099]: SpamAssassin: Unable to bind to port /var/run/spamass.sock: Address already in use
    Mar 20 00:08:40 server1 spamass-milter[18099]: SpamAssassin: Unable to create listening socket on conn /var/run/spamass.sock
    Mar 20 00:08:40 server1 spamass-milter[18099]: spamass-milter 0.3.1 exiting
    Mar 20 00:08:41 server1 postfix/pickup[16942]: 6FBABA3003A: uid=101 from=<sa-milt>
    Mar 20 00:08:41 server1 postfix/cleanup[17797]: warning: connect to Milter service unix:/var/run/spamass.sock: Connection refused
    Mar 20 00:08:41 server1 postfix/cleanup[17797]: 6FBABA3003A: message-id=<[email protected]>
    Mar 20 00:08:41 server1 postfix/qmgr[15339]: 6FBABA3003A: from=<[email protected]>, size=519, nrcpt=1 (queue active)
    Mar 20 00:08:41 server1 postfix/local[17799]: 6FBABA3003A: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.86, delays=0.78/0/0/0.08, dsn=2.0.0, status=sent (delivered to maildir)
    Mar 20 00:08:41 server1 postfix/qmgr[15339]: 6FBABA3003A: removed

    I am guessing you probably will either know a fix for this or want some more info so just let me know what I gotta do and send me some of that beautiful guidance you have =)

    I appreciate any help you can give!

    Ryan
     
  2. rrhode

    rrhode New Member

    Figured I should give an update incase anyone looks at this.

    I completely removed SpamAssassin, and Clamav and Clamav milter and then reinstalled SA and Clamav with amavisd-new. There are numerous guides that I had to follow and piece together to make this work for me on my server but maybe just because of they way I had it all messed up.

    Including:

    http://postfixmail.com/blog/?p=360
    http://www.linux.com/feature/52506
    http://etbe.coker.com.au/2008/08/12/spamassassin-during-smtp/

    And some other various sites I went to. I probably just had things configured oddly though so maybe someone else would just easily be able to follow one of them.

    I was unable to find a guide to set up Postfix, SpamAssassin, ClamAV and amavisd-new on CentOS 5.2 on this site. Also I am using Virtualmin. Perhaps it would automatically set that up but I have yet to discover this because I set it up manually by accident.
     
    Last edited: Mar 21, 2009

Share This Page