2

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 192.168.5.122 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?

Nick
  • 4,503
  • 29
  • 69
  • 97

3 Answers3

1

There you go.

Try changing

listen="imap" to listen="192.168.5.122:imap"

I am pretty sure it should solve the issue.

solefald
  • 2,301
  • 15
  • 14
  • 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 192.168.5.122 imap" from the *same* machine its running on? – solefald Apr 15 '10 at 22:41
  • No, "telnet 192.168.5.122 imap" returns connection refused. – Nick Apr 15 '10 at 22:43
  • OK, Changed it back to just listen="imap" and restarted, and now the connection seems to be working. – Nick Apr 15 '10 at 22:45
  • 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/`. 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
  • Yay! Now on to the next issue... Aren't servers fun? ;) – Nick Apr 15 '10 at 23:09
0

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.

solefald
  • 2,301
  • 15
  • 14
  • "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="192.168.0.1:imap" prefork=0 imaplocal cmd="imapd -C /etc/imapd-local.conf" listen="127.0.0.1:imap" prefork=0 imaps cmd="imapd -s" listen="192.168.0.1:imaps" prefork=0 imapslocal cmd="imapd -C /etc/imapd-local.conf" listen="127.0.0.1:imaps" 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
  • Also, the /etc/default/cyrus2.2 file DOES exist. What am I looking for? – Nick Apr 15 '10 at 22:17
  • 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. –  Oct 14 '12 at 17:23
0

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

Peter Nunn
  • 452
  • 1
  • 11
  • 25