E-mail configuration problem

Discussion in 'Installation/Configuration' started by Rui Queiros, Mar 20, 2018.

  1. Rui Queiros

    Rui Queiros New Member

    I have installed ispconfig3 on my debian distribution and I probably made a mistake since neither domain.com/webmail or domanin.com/roundcube are not working and when I send an e-mail to the mailbox I have created, it always fail.
    How can I know if I have a problem with my installation and how can I re-install the e-mail configuration again?
     
  2. Ghostdare

    Ghostdare Member

    Try to view and identify errors in your mail log (in your case I think that is located in /var/log/mail.log) post here some of them to form an opinion.
     
  3. Rui Queiros

    Rui Queiros New Member

    Code:
    )
    Mar 20 17:13:28 1packteam postfix/qmgr[4386]: 24D88626C
    E: from=<[email protected]>, size=678, nrcpt=1 (queue ac
    tive)
    Mar 20 17:13:28 1packteam postfix/smtp[24339]: connect
    to 127.0.0.1[127.0.0.1]:10024: Connection refused
    Mar 20 17:13:28 1packteam postfix/smtp[24339]: E02F962D
    60: to=<[email protected]>, relay=none, delay=6
    3567, delays=63567/0.01/0/0, dsn=4.4.1, status=deferred
    (connect to 127.0.0.1[127.0.0.1]:10024: Connection ref
    used)
    Mar 20 17:13:28 1packteam postfix/smtp[24339]: connect
    to 127.0.0.1[127.0.0.1]:10024: Connection refused
    Mar 20 17:13:28 1packteam postfix/smtp[24339]: 24D88626
    CE: to=<[email protected]>, orig_to=<amavis>, relay=none
    , delay=71725, delays=71725/0.03/0.01/0, dsn=4.4.1, sta
    tus=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Co
    nnection refused)
    Mar 20 17:13:54 1packteam postfix/smtpd[24344]: connect
    from unknown[37.49.230.129]
    Mar 20 17:13:56 1packteam postfix/smtpd[24344]: NOQUEUE
    : reject: RCPT from unknown[37.49.230.129]: 504 5.5.2 <
    windows-2012-r2-server-rdp>: Helo command rejected: nee
    d fully-qualified hostname; from=<[email protected]> t
    o=<[email protected]> proto=ESMTP helo=<windows-2012-r
    2-server-rdp>
    Mar 20 17:13:56 1packteam postfix/smtpd[24344]: disconn
    ect from unknown[37.49.230.129]
    Mar 20 17:15:01 1packteam postfix/smtpd[24344]: connect
    from localhost[::1]
    Mar 20 17:15:01 1packteam postfix/smtpd[24344]: lost co
    nnection after CONNECT from localhost[::1]
    Mar 20 17:15:01 1packteam postfix/smtpd[24344]: disconn
    ect from localhost[::1]
    Mar 20 17:15:01 1packteam dovecot: imap-login: Disconne
    cted (no auth attempts in 0 secs): user=<>, rip=::1, li
    p=::1, secured, session=<LVRuYNpnywAAAAAAAAAAAAAAAAAAAA
    AB>
    Mar 20 17:15:01 1packteam dovecot: pop3-login: Disconne
    cted (no auth attempts in 0 secs): user=<>, rip=::1, li
    p=::1, secured, session=<MF1uYNpn6wAAAAAAAAAAAAAAAAAAAA
    AB>
    Mar 20 17:16:48 1packteam postfix/scache[24343]: statis
    tics: start interval Mar 20 17:13:28
    Mar 20 17:16:48 1packteam postfix/scache[24343]: statis
    tics: domain lookup hits=0 miss=1 success=0%
    Mar 20 17:18:22 1packteam postfix/anvil[24264]: statist
    ics: max connection rate 1/60s for (smtp:37.49.230.129)
    at Mar 20 17:10:53
    Mar 20 17:18:22 1packteam postfix/anvil[24264]: statist
    ics: max connection count 1 for (smtp:37.49.230.129) at
    Mar 20 17:10:53
    Mar 20 17:18:22 1packteam postfix/anvil[24264]: statist
    ics: max message rate 1/60s for (smtp:37.49.230.129) at
    Mar 20 17:10:53
    Mar 20 17:18:22 1packteam postfix/anvil[24264]: statist
    ics: max cache size 1 at Mar 20 17:10:53
     
    Last edited: Mar 20, 2018
  4. Ghostdare

    Ghostdare Member

    From your log seems that Amavis service is not running, or miss configured (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    paste this command in shell -> /etc/init.d/amavis status
    if it's stopped start it with the same command but change "status" with "start"

    Also, review the main.cf and master.cf to have the appropriate modifications like in the tutorial that you used.
    From log
    "NOQUEUE: reject: RCPT from unknown[37.49.230.129]: 504 5.5.2 < windows-2012-r2-server-rdp>: Helo command rejected: need fully-qualified hostname; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<windows-2012-r2-server-rdp>" - this it's OK, your server accept mails only from mail server with proper DNS settings.
     
  5. Rui Queiros

    Rui Queiros New Member

    Code:
    [email protected]:/etc/init.d#
    [email protected]:/etc/init.d# /etc/init.d/amavis status 
    ● amavis.service - LSB: Starts amavisd-new mailfilter
       Loaded: loaded (/etc/init.d/amavis)
       Active: failed (Result: exit-code) since Tue 2018-03
    -20 17:40:03 CET; 1min 8s ago
      Process: 25316 ExecStart=/etc/init.d/amavis start (co
    de=exited, status=1/FAILURE)
    
    Mar 20 17:40:03 1packteam amavis[25316]: Starting am...
    Mar 20 17:40:03 1packteam amavis[25316]: a fully qua...
    Mar 20 17:40:03 1packteam amavis[25316]: You must ex...
    Mar 20 17:40:03 1packteam amavis[25316]: in /etc/ama...
    Mar 20 17:40:03 1packteam amavis[25316]: network name!
    Mar 20 17:40:03 1packteam amavis[25316]: (failed).
    Mar 20 17:40:03 1packteam systemd[1]: amavis.service...
    Mar 20 17:40:03 1packteam systemd[1]: Failed to star...
    Mar 20 17:40:03 1packteam systemd[1]: Unit amavis.se...
    Hint: Some lines were ellipsized, use -l to show in ful
    l.
    [email protected]:/etc/init.d# /etc/init.d/amavis start
    [....] Starting amavis (via systemctl): amavis.serviceJ
    ob for amavis.service failed. See 'systemctl status ama
    vis.service' and 'journalctl -xn' for details.
    failed!
    [email protected]:/etc/init.d# systemctl status amavis.ser
    vice
    ● amavis.service - LSB: Starts amavisd-new mailfilter
       Loaded: loaded (/etc/init.d/amavis)
       Active: failed (Result: exit-code) since Tue 2018-03
    -20 17:41:39 CET; 10s ago
      Process: 25423 ExecStart=/etc/init.d/amavis start (co
    de=exited, status=1/FAILURE)
    
    Mar 20 17:41:38 1packteam amavis[25423]: Starting am...
    Mar 20 17:41:38 1packteam amavis[25423]: a fully qua...
    Mar 20 17:41:38 1packteam amavis[25423]: You must ex...
    Mar 20 17:41:38 1packteam amavis[25423]: in /etc/ama...
    Mar 20 17:41:38 1packteam amavis[25423]: network name!
    Mar 20 17:41:39 1packteam amavis[25423]: (failed).
    Mar 20 17:41:39 1packteam systemd[1]: amavis.service...
    Mar 20 17:41:39 1packteam systemd[1]: Failed to star...
    Mar 20 17:41:39 1packteam systemd[1]: Unit amavis.se...
    Hint: Some lines were ellipsized, use -l to show in ful
    l.
    [email protected]:/etc/init.d#  
     
  6. Ghostdare

    Ghostdare Member

    Basically, you do not have a hostname configured.
    Paste the output from the following commands:
    hostname
    hostname -f
    cat /etc/hosts

    Also, give the link to the tutorial that you used.
     
  7. Rui Queiros

    Rui Queiros New Member


    Code:
    [email protected]:~# hostname
    1packteam
    [email protected]:~# hostname -f
    1packteam
    [email protected]:~# cat /etc/hosts
    127.0.0.1       localhost
    127.0.1.1       debian
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    80.211.134.86 1packteam
    [email protected]:~#
    https://www.howtoforge.com/tutorial/ispconfig-install-script-debian/
     
  8. Ghostdare

    Ghostdare Member

    From my point of view using the script is the lazy way... anyway, try to modify your installation using this tutorial -> https://www.howtoforge.com/tutorial...-9-stretch-apache-bind-dovecot-ispconfig-3-1/ (guess that your installation is Debian 9)

    Modify your installation as point 4 and reboot the server.
    Your hosts file must look like that.
    --
    127.0.0.1 localhost.localdomain localhost
    192.168.1.100 server1.example.com server1
    --
    Replace 192.168.1.100 with your IP and server1.example.com, with your FQDN

    Your script installation has done something wrong somehow
     
  9. Rui Queiros

    Rui Queiros New Member

    my hostname has this:
    Code:
    127.0.0.1       localhost
    127.0.1.1       debian
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    80.211.134.86 1packteam
    
    
    
    
    is this incorrect?
     
  10. Ghostdare

    Ghostdare Member

    No, it is not OK.
    First, you got to have a name for your server - something like server.1packtem.com (.com it is just a guess). Replace "server" with something you want.

    Your /etc/hosts file must look like in the link from the tutorial that I gave you.
    --
    127.0.0.1 localhost.localdomain localhost
    80.211.134.86 server.1packteam.com server

    The line with 127.0.0.1 debian must be deleted

    I had some typos ... corrected them.
     
    Last edited: Mar 20, 2018
  11. Ghostdare

    Ghostdare Member

    Because your server responds as hostname "1packteam".
    1. Is your server exposed directly to Internet? Your Network card it's configured with the external IP?
    2. Was your server rebooted after the change? Not, reboot it. After reboot, after "hostname" command it's still output "1packteam" edit "/etc/hostname" -> reboot the server

    make sure that you have an A record for this hostname "server.1packteam.com" and you have a PTR record for this IP.
     

Share This Page