I'm working on setting up a Cyrus 2.2 IMAP server on Ubuntu Server 9.04.

If I telnet from the server itself:

# telnet localhost imap

I get:

* OK IMAP Cyrus IMAP4 v2.2.13-Debian-2.2.13-14ubuntu3 server ready

Which is what I should be seeing. If I try from another machine on the network:

telnet imap

I get:

telnet: Unable to connect to remote host: Connection refused

UPDATE: From /etc/cyrus.conf

# add or remove based on preferences
imap            cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100
imaps           cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100
#pop3           cmd="pop3d -U 30" listen="pop3" prefork=0 maxchild=50
#pop3s          cmd="pop3d -s -U 30" listen="pop3s" prefork=0 maxchild=50
#nntp           cmd="nntpd -U 30" listen="nntp" prefork=0 maxchild=100
#nntps          cmd="nntpd -s -U 30" listen="nntps" prefork=0 maxchild=100

To the best of my knowledge, there is no firewall running on the box. I've tried restarting the saslauthd and cyrus2.2 daemons, with no effect.

What else can I try?

  • 1
    What is the output of netstat -tnlp ? – slillibri Nov 26 '11 at 0:29
  • With an lsof -p <pid> you can find out, where this daemon is actually listening. – peterh - Reinstate Monica Dec 5 '13 at 11:55

There you go.

Try changing

listen="imap" to listen=""

I am pretty sure it should solve the issue.

  • Made the change and restarted cyrus, still can't connect though. Now I can't connect via localhost either! – Nick Apr 15 '10 at 22:37
  • 1
    Ok, looks like listen="imap" tells it to bind to all available IP addresses. Can you do "telnet imap" from the same machine its running on? – solefald Apr 15 '10 at 22:41
  • 1
    Ok, something is blocking it locally. Are you sure that you are running Cyrus as a standalone daemon and not the default inetd/xinetd way? Check your /etc/inetd.conf or /etc/xinetd.d/<imapd>. There is a possibility that it is blocking . Also, what does ufw status say? – solefald Apr 15 '10 at 22:50
  • 1
    I'm not sure what the problem was, but changing back to listen="imap" and restarting fixed the issue- I can connect remotely with telnet now. Thanks for your help! I'm not sure which answer to mark as the solution though... – Nick Apr 15 '10 at 22:59
  • 2
    Glad i could help. Probably this one :) – solefald Apr 15 '10 at 23:07

Perhaps your firewall is blocking it?

What does iptables -vnL say? Also your inetd/xinetd may not be allowing connections from anything other than localhost.

  • "bash: iptables: command not found" I'm pretty sure there's no firewall installed. – Nick Apr 15 '10 at 21:51
  • See if there is something in /etc/default/cyrus2.2 – solefald Apr 15 '10 at 21:54
  • Also check /etc/cyrus.conf for these lines: # add or remove based on preferences imap cmd="imapd" listen="" prefork=0 imaplocal cmd="imapd -C /etc/imapd-local.conf" listen="" prefork=0 imaps cmd="imapd -s" listen="" prefork=0 imapslocal cmd="imapd -C /etc/imapd-local.conf" listen="" prefork=0 – solefald Apr 15 '10 at 22:00
  • I've added that section to my original question above. It's easier to read that way ;) It's similar by not exactly what you specified. – Nick Apr 15 '10 at 22:15
  • 1
    You'll probably not have iptables in your PATH - run "/sbin/iptables --list -n", as root, to absolutely confirm that there is no firewall. – user9565 Oct 14 '12 at 17:23

Make sure the authentication deamon is also running. Had this problem with courier imap and it turned out that the authentication wasn't running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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