Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 10.04

Discussion in 'HOWTO-Related Questions' started by Doles, Jul 14, 2010.

  1. Doles

    Doles New Member

    Hi there.
    I have run through this Howto, and at the end result I get the following error from squirrelmail.
    Error connecting to IMAP server: tls://localhost.
    0 : 
    It is happening before any authentication is done because I've put bogus details in and get the same result.

    I've done everything according to the HowTo, and sent the Welcome email with mailx. This didn't work :/ I tried to send an email to my gmail from mailx but no luck. Could that be a clue?

    Squirrelmail configtest shows this at the end
    Checking outgoing mail service....
        SMTP server OK (220 ESMTP Postfix (Ubuntu))
    Checking IMAP service....
        ERROR: Error connecting to IMAP server "localhost:143".Server error: (0) 
    So there is definitely something wrong with courier-imap

    [email protected]:~$ sudo netstat -tap
    [sudo] password for doles: 
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:www                   *:*                     LISTEN      3685/apache2    
    tcp        0      0 *:cisco-sccp            *:*                     LISTEN      3535/asterisk   
    tcp        0      0 *:32112                 *:*                     LISTEN      1209/sshd       
    tcp        0      0 *:x11-1                 *:*                     LISTEN      3893/Xvnc4      
    tcp        0      0 *:x11-2                 *:*                     LISTEN      3949/Xvnc4      
    tcp        0      0 localhost:domain        *:*                     LISTEN      2896/dnsmasq    
    tcp        0      0 server1:domain           *:*                     LISTEN      2896/dnsmasq    
    tcp        0      0 localhost:ipp           *:*                     LISTEN      3627/cupsd      
    tcp        0      0 *:smtp                  *:*                     LISTEN      19029/master    
    tcp        0      0 *:microsoft-ds          *:*                     LISTEN      566/smbd        
    tcp        0      0 localhost:imaps         *:*                     LISTEN      17671/couriertcpd
    tcp        0      0 *:nfs                   *:*                     LISTEN      -               
    tcp        0      0 *:4002                  *:*                     LISTEN      3401/rpc.mountd 
    tcp        0      0 localhost:10024         *:*                     LISTEN      17891/amavisd (mast
    tcp        0      0 localhost:10025         *:*                     LISTEN      19029/master    
    tcp        0      0 *:33641                 *:*                     LISTEN      -               
    tcp        0      0 *:mysql                 *:*                     LISTEN      1246/mysqld     
    tcp        0      0 *:netbios-ssn           *:*                     LISTEN      566/smbd        
    tcp        0      0 *:57772                 *:*                     LISTEN      1249/rpc.statd  
    tcp        0      0 localhost:5038          *:*                     LISTEN      3535/asterisk   
    tcp        0      0 *:sunrpc                *:*                     LISTEN      1220/portmap    
    tcp6       0      0 localhost:domain        [::]:*                  LISTEN      2896/dnsmasq    
    tcp6       0      0 fe80::219:d1ff:f:domain [::]:*                  LISTEN      2896/dnsmasq    
    tcp6       0      0 localhost:ipp           [::]:*                  LISTEN      3627/cupsd      
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      19029/master    
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      17733/couriertcpd
    tcp6       0      0 [::]:5900               [::]:*                  LISTEN      3953/vino-server
    tcp6       0      0 [::]:5901               [::]:*                  LISTEN      3893/Xvnc4      
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      17700/couriertcpd
    tcp6       0      0 [::]:5902               [::]:*                  LISTEN      3949/Xvnc4      
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      19371/couriertcpd
    tcp6       0      0 server1:5901    ESTABLISHED 3893/Xvnc4    
    Any ideas?

    I've tried dovecot as a replacement, but got a different error, still IMAP related but error:111. I'm unsure how to set up dovecot to replace courier like this

    Thanks for any help :)
  2. Mark_NL

    Mark_NL Member

    i don't see anything on port 143?
  3. Doles

    Doles New Member

    Yes, you're right. What about the ones that say
    Are one of those 143?
  4. Mark_NL

    Mark_NL Member

    imap2 = 143 .. but it's on ipv6
  5. Doles

    Doles New Member

    Ahh I see now. But where do I change it? I remember seeing it, but I can't find it now.

    Thanks mate :)
  6. Mark_NL

    Mark_NL Member

    run: /etc/init.d/courier-imap start

    netstat -tapn | grep :143
  7. Doles

    Doles New Member

    tcp6       0      0 :::143                  :::*                    LISTEN      19371/couriertcpd
    Still on ivp6. I'm not quite sure why that would cause it to not work. And how do I fix this?
    Last edited: Jul 15, 2010
  8. Doles

    Doles New Member

    [email protected]:~$ sudo telnet localhost 143
    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.
    login [email protected]
    login NO Error in IMAP command received by server.
    Connection closed by foreign host.
    does this give any clues?
  9. Mark_NL

    Mark_NL Member

    well it runs .. and ofc, i forgot ::1 .. if it's ipv4 it'll forward it to ipv6 so that's no problem.

    Let's put it this way: If you followed the how-to here on how-to-forge by the letter, everything WILL work .. so i'm thinking you forgot a step, made a typo or made custom changes to the installation.

    So i suggest you run through the how to one more time
  10. Doles

    Doles New Member

    Ah yes, thanks mark, I ran through the howto again and now have it working. I'm not sure what the typo was, but It was a typo or a misunderstanding.:confused:
    Anyway, all good now.
    I can pass local mail from users on the mail server, but can't send or receive to gmail, and I can send to my ISP mail, but not receive from it. Anyway, I think it has something to do with MX records or something for me to figure out myself.
    Thanks for your help :)
  11. Mark_NL

    Mark_NL Member

    haha good news you're a step closer to getting this thing up and running :)

    also check if you have authentication ON when you want to send mail through your mailserver.

    good luck!

Share This Page