Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am getting bald with this guys:

On a Linux VPS (CentOS), I have setup a mail server (Exim+Dovecot+Clamav+SpamAssassin) but scanning mail for spam using SpamAssassin is proving to be a challenge. I am not a Linux expert, especially when it comes to challenges associated with VPS, but I can pretty much RTFM and succeed. This one is beating me:

On my FreeBSD servers, I can easily get the desired results:

(15:59:00 <~>) 0 $ sockstat -l | grep 783
root     perl       83997 5  tcp4   127.0.0.1:783         *:*
root     perl       83996 5  tcp4   127.0.0.1:783         *:*
root     perl       10281 5  tcp4   127.0.0.1:783         *:*

(15:57:21 <~>) 0 $ telnet 127.0.0.1 783
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
CONT
SPAMD/1.0 76 Bad header line: CONT
Connection closed by foreign host.`

However, on the Linux VPS when I run the same test, it just hangs there ... nothing responds on the port, even though I can see spamd listening on 783:

[root@vps exim]# netstat -anp | grep 783
tcp   0   0  127.0.0.1:783   0.0.0.0:*   LISTEN   21602/spamd.pid

If any of you runs their servers on VPSes and are able to communicate with spamd, please tell me where to look.

Af it might help, I can connect to the POP3 port on this server from remote locations, BUT not from localhost (127.0.0.1)! Since spamd is set to listen on 127.0.0.1, I cannot test it from a remote server, and I don't intend to change it to listen on the public IP for test purposes.

Could it be something I need to change on the Linux?

share|improve this question
1  
Con you connect to any service running on the machine from localhost at all, or is it just spamd? One suggestion I have (although this is pretty much a shot in the dark) is to check your iptables settings (try iptables -L). –  Cedric Feb 28 '11 at 19:00
    
How far along does telnet get? Does it say Escape character is... Also, try using spamc and scan an email file as a test. –  penguin359 Mar 31 '11 at 10:50
add comment

3 Answers

It works for me on a Linode VPS running Debian. If it can't connect that seems like iptables to me too. What happens if you kill spamd then try telnet? Do you get a connection refused (as you should) or does it still hang, trying to connect? If so it's definitely iptables/firewall.

In that case something like iptables -I INPUT 1 -i lo -j ACCEPT should do the trick.

share|improve this answer
add comment

Can you please let us know what VPS technology the ISP is using? I have run up against similar problems running some software under an Ubuntu VPS in the XEN environment. The VPS was not getting the resources that were required to allow the software to run properly.

share|improve this answer
add comment

First of all, lets see if you can connect to you're loopback. Nine out of ten times, this is your problem ;)

Open a shell on your virtual, choose a nearby port number.

$ sudo nc -l 790

Open another shell.

$ echo 'MehMeh' | nc localhost 790

You should see something like ... MehMeh on your previous shell. But i'm guessing you don't, in that case. Have a look at your iptables

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.