Make email works on Ubuntu 14.04 (nginx, BIND, MySQL, PHP, Postfix, Dovecot and ISPConfig 3)

Discussion in 'HOWTO-Related Questions' started by sakhmed, Jan 16, 2015.

  1. sakhmed

    sakhmed New Member

    Using this tutorial on www.howtoforge.com, I have managed to set web server. It is basically Ubuntu 14.04 (nginx, BIND, MySQL, PHP, Postfix, Dovecot and ISPConfig 3). Currently server host only one domain that is telosmedia.org and it seems that everything works OK. However I have hard time to figure out how to make email work.

    What I have done so far:
    1. I manage domain's DNS's through amazon route 53. Here is MX record for the domain
      1 telosmedia.org.
      5 telosmedia.org.
      10 telosmedia.org.
      1 mail.telosmedia.org.
      5 mail.telosmedia.org.
      10 mail.telosmedia.org.

    2. Using ISPConfig interface, I have set email domain name and mailbox. I can access mailbox via squirrelmail. However, mailbox does not receive incoming massages. When I try to send a message, server hangs.
    Can anyone give me a hand on this issue and provide a step-by-step guidance how to make email work on the server? Thank you in advance!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. sakhmed

    sakhmed New Member

    Thank you for the quick reply! Here is a result from the test

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [WARN] ip addresses from hostname differ from ifconfig output. Please check your
    ip settings.
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.0.5.4p5
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 5.5.9-1ubuntu4.5
    
    ##### PORT CHECK #####
    
    [WARN] Port 443 (Webserver SSL) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the remaining infos as well, there must be more output and then post the file /etc/postfix/master.cf
     
  5. sakhmed

    sakhmed New Member

    Here it is, sorry

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [WARN] ip addresses from hostname differ from ifconfig output. Please check your ip settings.
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.0.5.4p5
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 5.5.9-1ubuntu4.5
    
    ##### PORT CHECK #####
    
    [WARN] Port 443 (Webserver SSL) seems NOT to be listening
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Nginx (PID 20887)
    [INFO] I found the following mail server(s):
        Postfix (PID 2057)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 897)
    [INFO] I found the following imap server(s):
        Dovecot (PID 897)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 2090)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [anywhere]:110        (897/dovecot)
    [anywhere]:143        (897/dovecot)
    [anywhere]:80        (20887/nginx)
    [anywhere]:8080        (20887/nginx)
    [anywhere]:8081        (20887/nginx)
    [anywhere]:21        (2090/pure-ftpd)
    ***.***.***.***:53        (947/named)
    [localhost]:53        (947/named)
    [anywhere]:22        (3505/sshd)
    [anywhere]:25        (2057/master)
    [localhost]:953        (947/named)
    [anywhere]:993        (897/dovecot)
    [anywhere]:995        (897/dovecot)
    [localhost]:10024        (1040/amavisd-new)
    [localhost]:10025        (2057/master)
    [anywhere]:3306        (971/mysqld)
    [localhost]10        (897/dovecot)
    [localhost]43        (897/dovecot)
    *:*:*:*::*:80        (20887/nginx)
    *:*:*:*::*:21        (2090/pure-ftpd)
    *:*:*:*::*:53        (947/named)
    *:*:*:*::*:22        (3505/sshd)
    *:*:*:*::*:25        (2057/master)
    *:*:*:*::*:953        (947/named)
    *:*:*:*::*:993        (897/dovecot)
    *:*:*:*::*:995        (897/dovecot)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    fail2ban-postfix-sasl  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 25
    fail2ban-dovecot-pop3imap  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993
    fail2ban-pureftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    fail2ban-ssh  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain fail2ban-dovecot-pop3imap (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain fail2ban-postfix-sasl (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0  
     
  6. sakhmed

    sakhmed New Member

    Attaches is master.sf file
     

    Attached Files:

  7. sakhmed

    sakhmed New Member

    Here is also a content of mail.log file stopping when Squirrelmail hangs

    Code:
    Jan 16 11:55:01 server dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN,
    
    rip=127.0.0.1, lip=127.0.0.1, mpid=6976, secured, session=<bE3kzcIMawB/AAAB>
    Jan 16 11:55:01 server dovecot: imap([email protected]): Disconnected: Logged out in=117
    
    out=1541
    Jan 16 11:55:01 server dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>,
    
    rip=127.0.0.1, lip=127.0.0.1, secured, session=<8O/xzcIM4gB/AAAB>
    Jan 16 11:55:01 server postfix/smtps/smtpd[7008]: connect from localhost[127.0.0.1]
    Jan 16 11:55:01 server postfix/smtps/smtpd[7008]: SSL_accept error from localhost[127.0.0.1]: lost
    
    connection
    Jan 16 11:55:01 server postfix/smtps/smtpd[7008]: lost connection after CONNECT from localhost
    
    [127.0.0.1]
    Jan 16 11:55:01 server postfix/smtps/smtpd[7008]: disconnect from localhost[127.0.0.1]
    Jan 16 11:55:01 server dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>,
    
    rip=127.0.0.1, lip=127.0.0.1, secured, session=<NSzyzcIMcAB/AAAB>
    Jan 16 11:55:02 server postfix/smtpd[6922]: timeout after RSET from localhost[127.0.0.1]
    Jan 16 11:55:02 server postfix/cleanup[7031]: 72D29146178: message-
    
    id=<[email protected]>
    Jan 16 11:55:02 server postfix/qmgr[2061]: 72D29146178: from=<double-
    
    [email protected]>, size=1223, nrcpt=1 (queue active)
    Jan 16 11:55:02 server postfix/smtpd[6922]: disconnect from localhost[127.0.0.1]
    Jan 16 11:55:02 server postfix/local[7032]: 72D29146178: to=<[email protected]>,
    
    orig_to=<postmaster>, relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent
    
    (delivered to mailbox)
    Jan 16 11:55:02 server postfix/qmgr[2061]: 72D29146178: removed
    Jan 16 11:55:13 server postfix/smtps/smtpd[7008]: connect from localhost[127.0.0.1]
    You have new mail in /var/mail/root
    
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You have 2 typos in the amster.cf, remove the # in front of the smtps and submission line and restart postfix. When you compare it with the tutorial, then you can see that these two lines dont have a # in front in the tutorial.
     
    sakhmed likes this.
  9. sakhmed

    sakhmed New Member

    Yep, you are absolutely right! Now, when I try to send massage to myself I get following error in Squirrelmail
    ERROR:
    Message not sent. Server replied:Requested action not taken: insufficient system storage
    452 4.3.1 Insufficient system storage
     
  10. sakhmed

    sakhmed New Member

  11. Herus

    Herus New Member

    I'm facing a similar problem here. My ISPconfig and Squirrelmail doesn't seem connected, sending and receiving emails either. I tried to send emails from Squirrelmail and it doesn't reach the destination and when I send emails from gmail to my domain account, it doesn't shows up their too (but if I open vi /var/mail/<myemailaccount> it's there). Here's my configuration files and the report.
    Any suggests? Idk from where I can restart.
     

    Attached Files:

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is that you had choosen a wrong hostname. The server hostname has to be a subdomain like server1.example.com, if you would use example.com then email for example.com will not work like in your case. So you have to change the server hostname and the msilname in postfix msin.cf to fix your problem.
     
  13. Bhawani

    Bhawani New Member

    Hi,
    I have installed ispconfig on centos 6.5, all is working good. But bydefault ispconfig installed mysql 5.1 on server, and i need latest mysql. Could you confirm how i can install and configure without effect on ispconfig
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The mysql 5.1 is not from ispconfig, its from centos. ISPConfig works with newer mysql versions as well, just ensure that you dont delete any databases.
     
  15. Herus

    Herus New Member

    I'm stuck again. I changed the hostname and a bunch of other inconveniences shows up. When I try to send an email from Squirrelmail, this error appears:
    I created a Free SSL certificate from StartSSL and linked in dovecot.conf and main.cf which I attached here. Can somebody help me again? I appreciated in advance.

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***
    [WARN] ip addresses from hostname differ from ifconfig output. Please check your ip settings.
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.0.5.4p5
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 5.5.9-1ubuntu4.5
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
        Apache 2 (PID 2127)
    [INFO] I found the following mail server(s):
        Postfix (PID 6898)
    [INFO] I found the following pop3 server(s):
        Dovecot (PID 6913)
    [INFO] I found the following imap server(s):
        Dovecot (PID 6913)
    [INFO] I found the following ftp server(s):
        PureFTP (PID 2034)
    
    ##### LISTENING PORTS #####
    (only        ()
    Local        (Address)
    [anywhere]:587        (6898/master)
    [localhost]:11211        (1908/memcached)
    [anywhere]:110        (6913/dovecot)
    [anywhere]:143        (6913/dovecot)
    [anywhere]:465        (6898/master)
    [anywhere]:21        (2034/pure-ftpd)
    ***.***.***.***:53        (961/named)
    [localhost]:53        (961/named)
    [anywhere]:22        (924/sshd)
    [anywhere]:25        (6898/master)
    [localhost]:953        (961/named)
    [anywhere]:993        (6913/dovecot)
    [anywhere]:995        (6913/dovecot)
    [localhost]:10024        (1057/amavisd-new)
    [localhost]:10025        (6898/master)
    [anywhere]:3306        (989/mysqld)
    *:*:*:*::*:587        (6898/master)
    [localhost]10        (6913/dovecot)
    [localhost]43        (6913/dovecot)
    *:*:*:*::*:8080        (2127/apache2)
    *:*:*:*::*:80        (2127/apache2)
    *:*:*:*::*:465        (6898/master)
    *:*:*:*::*:8081        (2127/apache2)
    *:*:*:*::*:21        (2034/pure-ftpd)
    *:*:*:*::*:53        (961/named)
    *:*:*:*::*:22        (924/sshd)
    *:*:*:*::*:25        (6898/master)
    *:*:*:*::*:953        (961/named)
    *:*:*:*::*:443        (2127/apache2)
    *:*:*:*::*:993        (6913/dovecot)
    *:*:*:*::*:995        (6913/dovecot)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination        
    fail2ban-dovecot-pop3imap  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 110,995,143,993
    fail2ban-pureftpd  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 21
    fail2ban-ssh  tcp  --  [anywhere]/0            [anywhere]/0            multiport dports 22
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination        
    
    Chain fail2ban-dovecot-pop3imap (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain fail2ban-pureftpd (1 references)
    target     prot opt source               destination        
    RETURN     all  --  [anywhere]/0            [anywhere]/0          
    
    Chain fail2ban-ssh (1 references)
    target     prot opt source               destination        
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    REJECT     all  --  ***.***.***.***       [anywhere]/0            reject-with icmp-port-unreachable
    RETURN     all  --  [anywhere]/0            [anywhere]/0
     

    Attached Files:

  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post your postfix master.cf file.
     
  17. Herus

    Herus New Member

    I'm reattaching the files because I didn't use scp to copy before.
     

    Attached Files:

  18. till

    till Super Moderator Staff Member ISPConfig Developer

    your master.cf had several errors, I've attached a corrected version.
     

    Attached Files:

  19. Alessandro Fonseca

    Alessandro Fonseca New Member

    I'm having the same problem can help me?
    Thank You Alessandro
     

    Attached Files:

  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the error that you get in the mail.log file.
     

Share This Page