imap

Discussion in 'Installation/Configuration' started by chrno, Apr 29, 2006.

  1. chrno

    chrno New Member

    I've setup my debian box according to the "The Perfect Setup - Debian Sarge (3.1)" Guide. I've choiced to use courier as my imap and pop3 daemon. The POP3 works fine but imap doesn't seem to be working.

    So I did a netstat -tap and found that imaps and imap2 is running but it's by inetd? Is this courier? So I thought I ask the experts :D

    Code:
    netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:imaps                 *:*                     LISTEN     13761/inetd
    tcp        0      0 *:pop3s                 *:*                     LISTEN     14038/couriertcpd
    tcp        0      0 *:mysql                 *:*                     LISTEN     16858/mysqld
    tcp        0      0 *:pop3                  *:*                     LISTEN     18931/couriertcpd
    tcp        0      0 *:imap2                 *:*                     LISTEN     13761/inetd
    tcp        0      0 *:www                   *:*                     LISTEN     15345/apache2
    tcp        0      0 *:81                    *:*                     LISTEN     14118/ispconfig_htt
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     15442/named
    tcp        0      0 *:ftp                   *:*                     LISTEN     19761/proftpd: (acc
    tcp        0      0 *:ssh                   *:*                     LISTEN     14683/sshd
    tcp        0      0 *:postgresql            *:*                     LISTEN     10658/postmaster
    tcp        0      0 *:smtp                  *:*                     LISTEN     17292/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     15442/named
    tcp        0      0 *:https                 *:*                     LISTEN     15345/apache2
    
    Any help/advice will be much appreciated !!!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you also install the courier-imap package?
    Run this:
    Code:
    apt-get install courier-imap courier-imap-ssl courier-pop courier-pop-ssl
    and try again.
     
  3. chrno

    chrno New Member

    Thanks for your quick reply falko!

    I did.

    Code:
    apt-get install courier-imap courier-imap-ssl courier-pop courier-pop-ssl
    Reading package lists... Done
    Building dependency tree... Done
    courier-imap is already the newest version.
    courier-imap-ssl is already the newest version.
    courier-pop is already the newest version.
    courier-pop-ssl is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
    
    Now this is interesting! When I restarted the courier-imap there's an error. Netstat is still the same as above. Could there be another imap server interfering with Courier Imap? How can I check this?

    Code:
    /etc/init.d/courier-imap restart
    Stopping Courier IMAP server: imapd.
    Starting Courier IMAP server:bind: Address already in use
    ll_daemon_start: Resource temporarily unavailable
    
    Code:
    /etc/init.d/courier-imap-ssl restart
    Restarting Courier IMAP-SSL server: done.
    
    Code:
    /etc/init.d/courier-pop restart
    Stopping Courier POP3 server: pop3d.
    Starting Courier POP3 server: pop3d.
    
     
  4. falko

    falko Super Moderator Howtoforge Staff

    That's the IMAP server run by inetd which is listed in your netstat output. What's in /etc/inetd.conf?
     
  5. chrno

    chrno New Member

    Code:
    # /etc/inetd.conf:  see inetd(8) for further informations.
    #
    # Internet server configuration database
    #
    #
    # Lines starting with "#:LABEL:" or "#<off>#" should not
    # be changed unless you know what you are doing!
    #
    # If you want to disable an entry so it isn't touched during
    # package updates just comment it out with a single '#' character.
    #
    # Packages should modify this file by using update-inetd(8)
    #
    # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
    #
    #:INTERNAL: Internal services
    #echo		stream	tcp	nowait	root	internal
    #echo		dgram	udp	wait	root	internal
    #chargen	stream	tcp	nowait	root	internal
    #chargen	dgram	udp	wait	root	internal
    #discard	stream	tcp	nowait	root	internal
    #discard	dgram	udp	wait	root	internal
    #daytime	stream	tcp	nowait	root	internal
    #daytime	dgram	udp	wait	root	internal
    #time		stream	tcp	nowait	root	internal
    #time		dgram	udp	wait	root	internal
    
    #:STANDARD: These are standard services.
    #<off># ftp	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/proftpd
    
    #:BSD: Shell, login, exec and talk are BSD protocols.
    
    #:MAIL: Mail, news and uucp services.
    imap2	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/imapd
    imaps	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/imapd
    #<off># pop3	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/ipop3d
    #<off># pop3s	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/ipop3d
    
    #:INFO: Info services
    #<off># ident		stream	tcp	wait	identd	/usr/sbin/identd	identd
    
    #:BOOT: Tftp service is provided primarily for booting.  Most sites
    # run this only on machines acting as "boot servers."
    
    #:RPC: RPC based services
    
    #:HAM-RADIO: amateur-radio services
    
    #:OTHER: Other services
    
    
    
     
  6. oliver.blaha

    oliver.blaha New Member

    Change this:

    Code:
    #:MAIL: Mail, news and uucp services.
    imap2	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/imapd
    imaps	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/imapd
    #<off># pop3	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/ipop3d
    #<off># pop3s	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/ipop3d
    to:

    Code:
    #:MAIL: Mail, news and uucp services.
    #<off># imap2	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/imapd
    #<off># imaps	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/imapd
    #<off># pop3	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/ipop3d
    #<off># pop3s	stream	tcp	nowait	root	/usr/sbin/tcpd /usr/sbin/ipop3d
    After that restart inet.d, then try starting courier.
     
  7. chrno

    chrno New Member

    Code:
    nano /etc/inetd.conf
    /etc/init.d/inetd reload
    Reloading internet superserver: inetd.
    
    Code:
    /etc/init.d/courier-imap restart
    Stopping Courier IMAP server: imapd.
    Starting Courier IMAP server: imapd.
    

    Many thanks! Courier imap is now running :D
    Just out of curiousity, what's the imapd that's started by inetd ?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    I think it's the UW-imapd ( http://www.washington.edu/imap/ ).
     

Share This Page