Can't send and receive mail

Discussion in 'Installation/Configuration' started by Gustavs, Jul 27, 2015.

  1. Gustavs

    Gustavs New Member

    Hello.
    I was following tutorial (The Perfect Server - Ubuntu 15.04 (nginx, BIND, Dovecot and ISPConfig 3)) and installed ISPConfig, but my mail server is not working.



    I have MX record for domain bluedroid.lv

    When I sent mail by squirrelmail to any email adress (I tried local adress (info@bluedroid[dot]lv) and external (my gmail email), i did not received email messages.
    When I sent mail to info@bluedroid[dot]lv from gmail email, i dod not received email message too.

    Can you please help me?
    I can show you aney configuration/logs needed.

    Thank you/
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please take a look at the /var/log/mail.log of your server, which messages get added at the end of the file when you send a message?
     
    Gustavs likes this.
  3. Gustavs

    Gustavs New Member

    I have cleared log file, to see what new will be added. After trying to send and receive email nothing were added to this file
     
  4. Gustavs

    Gustavs New Member

    Can you help me? After trying to send emails, I did not got anything in log file
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats most likely caused by emptying the log. Please try to restart syslog and if this wont help then restart the server.
     
    Gustavs likes this.
  6. Gustavs

    Gustavs New Member

    Thamk you for reply. I restarted rsyslog service and nothing changed - i tried to send email and log was empty anyway, after server reboot - the same thing.
    Maybe there's any other way to fix this?
     
  7. Gustavs

    Gustavs New Member

    tried to send and receive email today, also rebooted my server, nothing changed, log is empty
     
  8. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    How did you empty the log? Did you delete and recreate the file or did you echo -n "" > file name ?
     
    Gustavs likes this.
  9. Gustavs

    Gustavs New Member

    I deleted it and then created an empty file with this name again.
     
  10. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Check if the file permissions are still correct. Maybe the log system cannot write to it. Compare the log permissions to the other log files (e. g. syslog, messages, mail.info etc.)
     
    Gustavs likes this.
  11. Gustavs

    Gustavs New Member

    Thank you, I fixed permissions to this file.
    This is the log, when I tried to sent email to my gmail email and to local [email protected] email
    Code:
    Jul 28 06:19:11 packer-ubuntu-15-04-i386 dovecot: master: Dovecot v2.2.9 starting up (core dumps disabled)
    Jul 28 06:19:14 packer-ubuntu-15-04-i386 postfix/master[1115]: daemon started -- version 2.11.3, configuration /etc/postfix
    Jul 28 06:20:00 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: connect from webserver[::1]
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: warning: table "mysql:/etc/postfix/mysql-virtual_client.cf": empty query string -- ignored
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: 13D221212EA: client=webserver[::1]
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/cleanup[1365]: 13D221212EA: message-id=<5474f73c82a52602050138f8c498c41c.squirrel@_>
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/qmgr[1117]: 13D221212EA: from=<[email protected]>, size=673, nrcpt=1 (queue active)
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: disconnect from webserver[::1]
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/smtp[1366]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 postfix/smtp[1366]: 13D221212EA: to=<[email protected]>, relay=none, delay=0.2, delays=0.13/0.07/0/0, dsn=4.4.1, st$
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=1372, secured, session=<$
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 dovecot: imap([email protected]): Disconnected: Logged out in=567 out=525
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=1374, secured, session=<$
    Jul 28 06:20:01 packer-ubuntu-15-04-i386 dovecot: imap([email protected]): Disconnected: Logged out in=117 out=1541
    Jul 28 06:20:03 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: connect from webserver[::1]
    Jul 28 06:20:03 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: lost connection after CONNECT from webserver[::1]
    Jul 28 06:20:03 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: disconnect from webserver[::1]
    Jul 28 06:20:03 packer-ubuntu-15-04-i386 dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<ExQ50O$
    Jul 28 06:20:03 packer-ubuntu-15-04-i386 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<Hyc50O$
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: connect from webserver[::1]
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: warning: table "mysql:/etc/postfix/mysql-virtual_client.cf": empty query string -- ignored
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: 6A8EA1212EB: client=webserver[::1]
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/cleanup[1365]: 6A8EA1212EB: message-id=<ca0e37dbf53e8673dac98c7359ad8bc8.squirrel@_>
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/qmgr[1117]: 6A8EA1212EB: from=<[email protected]>, size=698, nrcpt=1 (queue active)
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/smtp[1366]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/smtpd[1354]: disconnect from webserver[::1]
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 postfix/smtp[1366]: 6A8EA1212EB: to=<[email protected]>, relay=none, delay=0.07, delays=0.06/0/0/0, dsn=4.4$
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=1430, secured, session=<$
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 dovecot: imap([email protected]): Disconnected: Logged out in=584 out=525
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=1432, secured, session=<$
    Jul 28 06:20:09 packer-ubuntu-15-04-i386 dovecot: imap([email protected]): Disconnected: Logged out in=117 out=1541
    
    When I tried to send email to info@bluedroid[dot]lv those lines were added
    Code:
    Jul 28 06:21:53 packer-ubuntu-15-04-i386 postfix/smtpd[1444]: connect from mail-la0-f54.google.com[209.85.215.54]
    Jul 28 06:21:53 packer-ubuntu-15-04-i386 postfix/smtpd[1444]: DB2D21212EC: client=mail-la0-f54.google.com[209.85.215.54]
    Jul 28 06:21:53 packer-ubuntu-15-04-i386 postfix/cleanup[1446]: DB2D21212EC: message-id=<CAAHmAzXHHdr4spibgmeth2keH64iUNsMqhvrqEmR2ajL0txTjg@mail.gmail.com>
    Jul 28 06:21:54 packer-ubuntu-15-04-i386 postfix/qmgr[1117]: DB2D21212EC: from=<[email protected]>, size=2069, nrcpt=1 (queue active)
    Jul 28 06:21:54 packer-ubuntu-15-04-i386 postfix/smtpd[1444]: disconnect from mail-la0-f54.google.com[209.85.215.54]
    Jul 28 06:21:54 packer-ubuntu-15-04-i386 postfix/smtp[1447]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    Jul 28 06:21:54 packer-ubuntu-15-04-i386 postfix/smtp[1447]: DB2D21212EC: to=<[email protected]>, relay=none, delay=0.2, delays=0.12/0.08/0/0, dsn=4.4.1, st$
    
    
     
  12. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    It seams your amavis is not running. Try restarting amavis and check log files for errors on restart.
     
    Gustavs likes this.
  13. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    In addition it seams that your postfix might not be correctly configured (see the postfix mysql error message). You might try updating/reinstalling ISPConfig and choose reconfigure services "yes" during the process.
     
    Gustavs likes this.
  14. Gustavs

    Gustavs New Member

    this is the output when i try to restart amavis and try following commands
    Code:
    root@packer-ubuntu-15-04-i386:~# service amavis restart
    Job for amavis.service failed. See "systemctl status amavis.service" and "journalctl -xe" for details.
    root@packer-ubuntu-15-04-i386:~# systemctl status amavis.service
    * amavis.service - LSB: Starts amavisd-new mailfilter
       Loaded: loaded (/etc/init.d/amavis)
       Active: failed (Result: exit-code) since Tue 2015-07-28 08:03:20 EDT; 13s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 3814 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)
    
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: The value of variable $myhostname is "", but should have been
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: a fully qualified domain name; perhaps uname(3) did not provide such.
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: You must explicitly assign a FQDN of this host to variable $myhostname
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: network name!
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: (failed).
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: amavis.service: control process exited, code=exited status=1
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: Unit amavis.service entered failed state.
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: amavis.service failed.
    root@packer-ubuntu-15-04-i386:~# journalctl -xe
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit UNIT has finished starting up.
    --
    -- The start-up result is done.
    Jul 28 08:03:12 packer-ubuntu-15-04-i386 systemd[3772]: Startup finished in 24ms.
    -- Subject: System start-up is now complete
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- All system services necessary queued for starting at boot have been
    -- successfully started. Note that this does not mean that the machine is
    -- now idle as services might still be busy with completing start-up.
    --
    -- Kernel start-up required KERNEL_USEC microseconds.
    --
    -- Initial RAM disk start-up required INITRD_USEC microseconds.
    --
    -- Userspace start-up required 24259 microseconds.
    Jul 28 08:03:12 packer-ubuntu-15-04-i386 systemd[1]: Started User Manager for UID 0.
    -- Subject: Unit [email protected] has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit [email protected] has finished starting up.
    --
    -- The start-up result is done.
    Jul 28 08:03:12 packer-ubuntu-15-04-i386 systemd[3772]: Starting Default.
    -- Subject: Unit UNIT has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit UNIT has begun starting up.
    Jul 28 08:03:18 packer-ubuntu-15-04-i386 systemd[1]: Cannot add dependency job for unit udev-finish.service, ignoring: Unit udev-finish.service is masked.
    Jul 28 08:03:18 packer-ubuntu-15-04-i386 systemd[1]: Starting LSB: Starts amavisd-new mailfilter...
    -- Subject: Unit amavis.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit amavis.service has begun starting up.
    Jul 28 08:03:19 packer-ubuntu-15-04-i386 amavis[3814]: Starting amavisd: hostname: Name or service not known
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: The value of variable $myhostname is "", but should have been
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: a fully qualified domain name; perhaps uname(3) did not provide such.
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: You must explicitly assign a FQDN of this host to variable $myhostname
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: network name!
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 amavis[3814]: (failed).
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: amavis.service: control process exited, code=exited status=1
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
    -- Subject: Unit amavis.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit amavis.service has failed.
    --
    -- The result is failed.
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: Unit amavis.service entered failed state.
    Jul 28 08:03:20 packer-ubuntu-15-04-i386 systemd[1]: amavis.service failed.
    lines 1423-1481/1481 (END)
    
     
  15. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    This means, that your mail system is not configured correctly. Please re-install ISPConfig and set reconfigure yes.
     
    Gustavs likes this.
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    and set a fully qualified domain (e.g. server1.example.com) as hostname. currently there is no hostname set or no fqdn hostname and thats why amavis cant start.
     
    Gustavs likes this.
  17. Gustavs

    Gustavs New Member

    Thank you. I changed fqdn hostname, now it is correct and amavis can start - it started. I reinstalled ISPC and reconfigured it.
    Now when I try to send email, mail.log shows this:
    Code:
    Jul 28 08:37:07 gustavs postfix/smtpd[2925]: connect from webserver[::1]
    Jul 28 08:37:07 gustavs postfix/smtpd[2925]: warning: table "mysql:/etc/postfix/mysql-virtual_client.cf": empty query string -- ignored
    Jul 28 08:37:07 gustavs postfix/smtpd[2925]: 25ED61212F5: client=webserver[::1]
    Jul 28 08:37:07 gustavs postfix/cleanup[2934]: 25ED61212F5: message-id=<9d5323d08b573598fb9541dc26b7c2d4.squirrel@_>
    Jul 28 08:37:07 gustavs postfix/smtpd[2925]: disconnect from webserver[::1]
    Jul 28 08:37:07 gustavs postfix/qmgr[2765]: 25ED61212F5: from=<[email protected]>, size=690, nrcpt=1 (queue active)
    Jul 28 08:37:07 gustavs postfix/error[2936]: 25ED61212F5: to=<[email protected]>, relay=none, delay=0.23, delays=0.13/0.03/0/0.06, dsn=4.4.1, status$
    Jul 28 08:37:07 gustavs dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=3075, secured, session=<AlNsuu4bpgAAAAAAA$
    Jul 28 08:37:07 gustavs dovecot: imap([email protected]): Disconnected: Logged out in=576 out=525
    Jul 28 08:37:07 gustavs dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=3077, secured, session=<h9dyuu4bqAAAAAAAA$
    Jul 28 08:37:07 gustavs dovecot: imap([email protected]): Disconnected: Logged out in=117 out=1541
    
     
  18. Gustavs

    Gustavs New Member

    Okay, it looks like working, but messages are sending slowly.
     
  19. Gustavs

    Gustavs New Member

    Thank you, all problems are fixed!

    Admins can lock this theard.
     

Share This Page