Can't receive email on ISPConfig 3

Discussion in 'Server Operation' started by CupOfTea696, Aug 6, 2015.

  1. CupOfTea696

    CupOfTea696 New Member

    I can't receive mail on my server I recently set up with ISPConfig 3. I'm running on Ubunutu 15.04 and followed this tutorial to setup my server.
    When I try and telnet my server on port 25, it says "Connection refused". I've configured ISPConfig to use the ufw firewall, and it seems to be working correctly for all other ports.

    ufw status output:
    Code:
    To                         Action      From
    --                         ------      ----
    22/tcp                     ALLOW       Anywhere
    25/tcp                     ALLOW       Anywhere
    53/tcp                     ALLOW       Anywhere
    80/tcp                     ALLOW       Anywhere
    110/tcp                    ALLOW       Anywhere
    123/tcp                    ALLOW       Anywhere
    143/tcp                    ALLOW       Anywhere
    443/tcp                    ALLOW       Anywhere
    587/tcp                    ALLOW       Anywhere
    993/tcp                    ALLOW       Anywhere
    995/tcp                    ALLOW       Anywhere
    3306/tcp                   ALLOW       Anywhere
    8080/tcp                   ALLOW       Anywhere
    8081/tcp                   ALLOW       Anywhere
    10000/tcp                  ALLOW       Anywhere
    53/udp                     ALLOW       Anywhere
    80/udp                     ALLOW       Anywhere
    3306/udp                   ALLOW       Anywhere
    10024/tcp                  ALLOW       Anywhere
    22/tcp (v6)                ALLOW       Anywhere (v6)
    25/tcp (v6)                ALLOW       Anywhere (v6)
    53/tcp (v6)                ALLOW       Anywhere (v6)
    80/tcp (v6)                ALLOW       Anywhere (v6)
    110/tcp (v6)               ALLOW       Anywhere (v6)
    123/tcp (v6)               ALLOW       Anywhere (v6)
    143/tcp (v6)               ALLOW       Anywhere (v6)
    443/tcp (v6)               ALLOW       Anywhere (v6)
    587/tcp (v6)               ALLOW       Anywhere (v6)
    993/tcp (v6)               ALLOW       Anywhere (v6)
    995/tcp (v6)               ALLOW       Anywhere (v6)
    3306/tcp (v6)              ALLOW       Anywhere (v6)
    8080/tcp (v6)              ALLOW       Anywhere (v6)
    8081/tcp (v6)              ALLOW       Anywhere (v6)
    10000/tcp (v6)             ALLOW       Anywhere (v6)
    53/udp (v6)                ALLOW       Anywhere (v6)
    80/udp (v6)                ALLOW       Anywhere (v6)
    3306/udp (v6)              ALLOW       Anywhere (v6)
    10024/tcp (v6)             ALLOW       Anywhere (v6)
    /var/log/mail.log:
    Code:
    Aug  6 15:25:38 cupoftea dovecot: imap-login: Login: user=<admin@cupoftea.io>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=13671, secured, session=<hjwQS6Uc5wB/AAAB>
    
    Aug  6 15:25:38 cupoftea dovecot: imap(admin@cupoftea.io): Disconnected: Logged out in=79 out=777
    
    Aug  6 15:30:01 cupoftea sm-mta[13773]: t76EU1ew013773: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-v4
    
    Aug  6 15:30:01 cupoftea dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<9WfJWqUc7AB/AAAB>
    
    Aug  6 15:30:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=</s3JWqUcHQB/AAAB>
    
    Aug  6 15:35:01 cupoftea sm-mta[13878]: t76EZ1Vh013878: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-v4
    
    Aug  6 15:35:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<vKakbKUcIwB/AAAB>
    
    Aug  6 15:35:01 cupoftea dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<NaikbKUc8gB/AAAB>
    
    Aug  6 15:35:38 cupoftea dovecot: imap-login: Login: user=<admin@cupoftea.io>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=13931, secured, session=<mp3bbqUc9AB/AAAB>
    
    Aug  6 15:35:38 cupoftea dovecot: imap(admin@cupoftea.io): Disconnected: Logged out in=79 out=777
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you run sendmail instead of postfix. Stop sendmail and then start postfix.
     
  3. CupOfTea696

    CupOfTea696 New Member

    I stopped sendmail using service sendmail stop, and then restarted postfix, but it's still not working. And I still can't telnet to port 25.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the mail.log
     
  5. CupOfTea696

    CupOfTea696 New Member

    Here's the last couple of lines:
    Code:
    Aug  6 18:00:01 cupoftea dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:00:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:05:01 cupoftea dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs$
    
    Aug  6 18:05:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:10:02 cupoftea dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:10:02 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:15:01 cupoftea dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs$
    
    Aug  6 18:15:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:20:01 cupoftea dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:20:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:25:01 cupoftea dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs$
    
    Aug  6 18:25:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:30:01 cupoftea dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:30:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:35:02 cupoftea dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs$
    
    Aug  6 18:35:02 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:40:01 cupoftea dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:40:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
    
    Aug  6 18:45:01 cupoftea dovecot: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs$
    
    Aug  6 18:45:01 cupoftea dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0$
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    These are successful tests of the system monitor for pop3 and IMAP. Restart postfix and check which errors you get when it is not starting.
     
  7. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    And the output of "netstat -tanp|grep 25", too.
     
  8. CupOfTea696

    CupOfTea696 New Member

    Sorry for the late reply, been busy with other stuff.
    Anyway, restarting postfix does not result in any errors.
    The netstat command didn't give any output, so I tried "netstart -tanp" which gave this result:
    Code:
    Active Internet connections (servers and established)
    
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    
    tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      13520/dovecot
    
    tcp        0      0 127.0.0.1:11300         0.0.0.0:*               LISTEN      936/beanstalkd
    
    tcp        0      0 127.0.0.1:10024         0.0.0.0:*               LISTEN      8283/amavisd-new (m
    
    tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1400/mysqld  
    
    tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      973/memcached
    
    tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN      847/redis-server 12
    
    tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      13520/dovecot
    
    tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      13520/dovecot
    
    tcp        0      0 46.101.21.98:80         0.0.0.0:*               LISTEN      8232/nginx -g daemo
    
    tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      8232/nginx -g daemo
    
    tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      8232/nginx -g daemo
    
    tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      1499/pure-ftpd (SER
    
    tcp        0      0 46.101.21.98:53         0.0.0.0:*               LISTEN      858/named    
    
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      858/named    
    
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      4300/sshd    
    
    tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      858/named    
    
    tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      13520/dovecot
    
    tcp        0      0 127.0.0.1:49505         127.0.0.1:21            TIME_WAIT   -            
    
    tcp        0    360 46.101.21.98:22         81.11.220.46:50927      ESTABLISHED 30959/sshd: cupofte
    
    tcp        0      0 46.101.21.98:8081       81.11.220.46:51062      TIME_WAIT   -            
    
    tcp        0      0 46.101.21.98:8081       81.11.220.46:51085      TIME_WAIT   -            
    
    tcp6       0      0 :::995                  :::*                    LISTEN      13520/dovecot
    
    tcp6       0      0 :::110                  :::*                    LISTEN      13520/dovecot
    
    tcp6       0      0 :::143                  :::*                    LISTEN      13520/dovecot
    
    tcp6       0      0 :::21                   :::*                    LISTEN      1499/pure-ftpd (SER
    
    tcp6       0      0 :::53                   :::*                    LISTEN      858/named    
    
    tcp6       0      0 :::22                   :::*                    LISTEN      4300/sshd    
    
    tcp6       0      0 ::1:953                 :::*                    LISTEN      858/named    
    
    tcp6       0      0 :::993                  :::*                    LISTEN      13520/dovecot
     
  9. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Postfix is not running. run /etc/init.d/postfix status and check you /etc/postfix/master.cf
     
  10. CupOfTea696

    CupOfTea696 New Member

    Turns out postfix wasn't properly installed somehow.
    postfix status now returns "postfix/postfix-script: the Postfix mail system is running: PID: 4485"
    Found this is my mail.log now:
    Code:
    Sep  1 12:21:26 cupoftea postfix/qmgr[4287]: 0FA0EE3936: from=<webmaster@sport.dev.cupoftea.io>, size=677, nr$
    
    Sep  1 12:21:28 cupoftea amavis[8284]: (08284-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var$
    
    Sep  1 12:21:28 cupoftea amavis[8285]: (08285-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var$
    
    Sep  1 12:21:28 cupoftea amavis[8284]: (08284-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x47ddad8) unexpect$
    
    Sep  1 12:21:28 cupoftea amavis[8285]: (08285-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x47ddad8) unexpect$
    
    Sep  1 12:21:28 cupoftea amavis[8285]: (08285-01) (!)WARN: all primary virus scanners failed, considering bac$
    
    Sep  1 12:21:28 cupoftea amavis[8284]: (08284-01) (!)WARN: all primary virus scanners failed, considering bac$
    
    Sep  1 12:21:40 cupoftea postfix/postfix-script[4319]: the Postfix mail system is running: PID: 4285
    
    Sep  1 12:22:06 cupoftea postfix/master[4285]: terminating on signal 15
    and this in my mail.err:
    Code:
    Sep  1 12:27:20 cupoftea amavis[8284]: (08284-01) (!!)AV: ALL VIRUS SCANNERS FAILED
    
    Sep  1 12:27:20 cupoftea amavis[8285]: (08285-01) (!!)AV: ALL VIRUS SCANNERS FAILED
     
  11. CupOfTea696

    CupOfTea696 New Member

    Whenever I send an email now, I get this reply even though I've set up a mailbox in ISPConfig.
    Code:
    This is the mail system at host cupoftea.io. 
    
    I'm sorry to have to inform you that your message could not 
    
    be delivered to one or more recipients. It's attached below. 
    
    For further assistance, please send mail to postmaster. 
    
    If you do so, please include this problem report. You can 
    
    delete your own text from the attached returned message. 
    
    The mail system 
    
    <admin@cupoftea.io>: unknown user: "admin" 
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    check postfix main.cf file, the domain cupoftea.io may not be mentioned in that file, all domains are in mysql as ispconfig uses a virtual mail system. If the hostname of your server is cupoftea.io, then change it to e.g. server1.cupoftea.io and cahnge it also in /etc/mailname and /etc/postfix/main.cf
     
  13. CupOfTea696

    CupOfTea696 New Member

    The domain cupoftea.io is mentioned in both of those files. Not sure why I need to change it to server1.cupoftea.io? That'd change the email address as well.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The email addresses are defined in ispconfig and not in postfix main.cf. A domain that is used for virtual email addresses may not be defined in postfix main.cf.
     
  15. CupOfTea696

    CupOfTea696 New Member

    So I changed cupoftea.io to server1.cupoftea.io in those files and the DB, but now nothing is happening...
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    You should not change it in the db, just in the files /etc/postfix/main.cf and /etc/mailname and then restart postfix.
     
  17. CupOfTea696

    CupOfTea696 New Member

    That did it! It's finally working!
    Thanks for all the help guys! Sorry for being such a noob at this :p
     

Share This Page