Unable to get WebMail working

Discussion in 'ISPConfig 3 Priority Support' started by peterpetr, Oct 8, 2020.

  1. peterpetr

    peterpetr Member

    Hello, I installed the latest (non-beta) version of ISPconfig about 3 months ago on Ubuntu 18.04 using this script: https://www.howtoforge.com/tutorial/ubuntu-ispconfig-automated-install-script/

    I selected the default Mail Server type: Dovecot. Webserver is Nginx. ISPconfig is installed on this example domain: u18n.domain1.com

    After setting up ISPconfig and adding a website, ISPconfig and the website worked well. Now, I've added another static website on this example domain: newdomain2.com.

    I setup DNS on ISPconfig for this newdomain2.com but then decided to use my domain registrar's DNS, so turn OFF the DNS in ISPconfig.
    My DNS records are as follows:
    A Host: mail Value: 152.11.11.11 TTL: 1 min.
    A Host: @ Value: 152.11.11.11 TTL: 1 min.
    A
    Host: www Value: 152.11.11.11 TTL: 1 min.
    TXT Host: default_domainkey Value: v=DKIM1; t=s; p=MIIBIj((as generated by ISPconfig)) TTL: 1 min.
    MX Host: newdomain2.com Value: mail.newdomain2.com Priority: 10 TTL: 1 min.

    In u18n.domain1.com ISPconfig's MAIL I added a Domain for newdomain2.com
    Then, I added a mailbox user: [email protected]
    When I click on the [webmail] icon following the above mailbox user, I get a new browser opening on:
    https://u18n.domain1.com:8080/webmail << this is using the ISPconfig / host domain >>

    MxToolBpox.com gives me the following results when Test Email Server is done on: mail.newdomain2.com
    https://www.screencast.com/t/tqftJdh0JibY

    I believe my DNS records are ok.
    I'm not sure what to diagnose or try next to get working webmail accounts?
    Please reply with explicit details, as I'm not an expert with email server setup. Thank you.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I never use port number (that :8080) when accessing webmail.
    It is not a matter of believe. You must verify DNS works correctly.
    I did not understand what is not working in your setup. Explicit details, please.
    My signature has links to e-mail and dns tutorials, they have info on testing and troubleshooting.
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You didn't tell us what happened after you clicked on the webmail icon, besides the page that opens. What do you see there?

    Have you tried removing :8080 from the url?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Webmail on nginx is on port 8081 (by default HTTP unless you manually configured https in apps vhost). Set URL:

    http://u18n.domain1.com:8081/webmail

    in webmail URL field under System > Interface > main config in ISPConfig.
     
  5. peterpetr

    peterpetr Member

    Thank you for your advise and suggestions.
    I set the Webmail URL in System>Interface>MainConfig>Mail, till instructed:
    .. http://u18n.domain1.com:8081/webmail (result: 404 Not Found)
    I also tried:
    .. https://u18n.domain1.com:8081/webmail (result: Error code: SSL_ERROR_RX_RECORD_TOO_LONG)
    Please suggest what to check or try next to get WebMail working?

    I installed SquirrelMail which seems to be last updated in March of 2014 according to http://squirrelmail.org. Would https://roundcube.net have been a better choice when setting up my VPS/Ubuntu 18.04 system? Roundcube was last updated in September of 2020. If Squirrelmail continues to be a problem with ISPconfig, is there a way to change to Roundcube without needing a Linux expert?

    My DNS records are correct, but after trying to send an email to [email protected]
    the response was: The recipient server did not accept our requests to connect. Learn more at https://support.google.com/mail/answer/7720 [mail.newdomain2.com 152.11.11.11: unable to read banner]
    "Reverse DNS does not match SMTP Banner" was reported by the test I did at MxToolBpox.com (gives me the following results when Test Email Server is done on: mail.newdomain2.com -- results screenshot image shown here: https://www.screencast.com/t/tqftJdh0JibY (also image attached).

    The fourth line in the MxToolbox screenshot is showing a green checkmark for "SMTP Reverse DNS Mismatch: Ok - 152.11.11.11 resolves to 152.11.11.11.isp-name.host. The first line warns about the "SMTP Banner Check -- Reverse DNS does not match SMTP Banner"

    I wonder if my ISPconfig (and Squirrelmail has some config settting for setting the "SMTP Banner"?
    Or, maybe my registrar's DNS is lacking the Reverse DNS record? (all my DNS records are shown in my first post in this thread).

    In summary, there are two problems:
    #1. WebMail does not work, and
    #2. Squirrelmail does not receive inbound emails giving the "unable to read banner" message as described above.

    I feel like I'm in over my head here, but willing to learn. Any guidance is very much appreciated.
    Thank you.
     

    Attached Files:

  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You should not use Squirrelmail anymore, it's deprecated and there are security issues. Roundcube is the way to go. Uninstall Squirrelmail, by doing the steps for installing in reverse. Then install roundcube following the perfect server guide.
     
  7. peterpetr

    peterpetr Member

    @Th0m Thank you for your reply. After checking my install documentation (for Ubuntu 18.04 and ISPconfig) and the choices I made using the following script: https://www.howtoforge.com/tutorial/ubuntu-ispconfig-automated-install-script/ -- I see that I installed the Dovecot mail server (not SquirrelMail). Checking Dovecot.org, it looks like a current email server with recent updates, so I'll stay with it unless instructed otherwise.

    So the two issues I describe in my last post to this thread still remain.
     
  8. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Dovecot is a mail (MDA) server, Squirrelmail and Dovecot are for webmail, which connects to dovecot. Postfix is used as SMTP (MTA) server, which roundcube will connect to aswell.
     
  9. peterpetr

    peterpetr Member

    Many thanks for your patience and help.
    In ISPconfig under Sites, the website domain is: newdomain2.com This is the domain that I want tho have functioning for my email server.
    In ISPconfig under Email > Email Domain:
    1. I specify the Server: u18a.domain1.com (using the only option in the drop-list);
    2. But in the Domain field, I can type what I want.
    Do enter: mail.newdomain2.com ?
    or newdomain2.com ?
    Given my DNS records are as follows:
    Type: A Host: mail Value: 152.11.11.11 TTL: 1 min.
    Type: A Host: @ Value: 152.11.11.11 TTL: 1 min.
    Type: A Host: www Value: 152.11.11.11 TTL: 1 min.
    Type: TXT Host: default_domainkey Value: v=DKIM1; t=s; p=MIIBIj... ((as generated by ISPconfig)) TTL: 1 min.
    Type: MX Host: newdomain2.com Value: mail.newdomain2.com Priority: 10 TTL: 1 min.
    (Note: I'll change the TTL to 10 or 30 min. after the mail server is working)

    In summary, there are two problems I'm still trying to resolve:
    #1. WebMail does not work, and
    #2. mail.newdomain2.com does not receive inbound emails giving the "unable to read banner" message as described above.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    This script is not from ISPConfig nor from Howtoforge, it's a third party script of an ISPConfig user, so I can't tell you what it installs in detail. I recommend that you use the perfect server guide, which is the official ISPConfig installation guide, next time.

    Apache servers:
    https://www.howtoforge.com/tutorial...l-pureftpd-bind-postfix-doveot-and-ispconfig/

    Nginx Servers:
    https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18-04-nginx-bind-dovecot-and-ispconfig-3/

    You enter your email domain there, so: newdomain2.com

    I've posted above the links to the ISPConfig installation instructions (perfect server guide), choose the nginx one and install roundcube as described in that tutorial.

    That's actually not an installation problem of your server, it means that the DNS record of the IP, as that's what the reverse record is, is not set to your server hostname. Contact your ISP, the one that assigned you that IP address, and ask them to set the reverse record to your server hostname, which is probably u18n.domain1.com.
     
  11. peterpetr

    peterpetr Member

  12. peterpetr

    peterpetr Member

    I have been setting up a new Ubuntu 18 server using the instructions suggested by til:
    https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18-04-nginx-bind-dovecot-and-ispconfig-3/

    At Step 13. Install Jailkit, I get an error as shown below. Please suggest how I could fix this issue?
    It can be installed as follows:

    apt-get -y install build-essential autoconf automake1.11 libtool flex bison debhelper binutils

    cd /tmp
    wget http://olivier.sessink.nl/jailkit/jailkit-2.19.tar.gz
    tar xvfz jailkit-2.19.tar.gz
    cd jailkit-2.19
    echo 5 > debian/compat


    Then build the jailkit package by running this command:

    ./debian/rules binary

    At this point, the ERROR is: "bash: ./debian/rules: No such file or directory

    I stopped the install process here. Hoping to get your instructions.
    Thank you.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Just run the exact commands you posted here on Ubuntu 18.04 and there is no error. Maybe you missed typing in the "cd jailkit-2.19" command Ensure that you type in the exact commands or even better copy/paste the commands.

    run:

    rm -rf /tmp/jailkit-2.19

    and then redo the procedure by running:

    Code:
    cd /tmp
    tar xvfz jailkit-2.19.tar.gz
    cd jailkit-2.19
    echo 5 > debian/compat
    ./debian/rules binary
     
  14. peterpetr

    peterpetr Member

    @till Thank you for your guidance and patience. I must have done a typo or some other error. I was able to complete the JailKit procedures.

    Please advise about the following:
    Earlier, I skipped a step because I was not confident about how to make the edit. I now need to complete this:.
    #10. Install PureFTPd and Quota: I was proceeding until:
    nano /etc/fstab (I was not sure about doing the edit/add-text correctly)

    Can you please tell me where to insert the text that you added to your file?
    My file contains only the following text:


    UUID=5bebbe60-0b42-11eb-9216-6a79d7127b83 / ext4 defaults 0 0
    /swap.img none swap sw 0 0

    But, the Perfect Server instructions at #10 say:
    Edit /etc/fstab.
    Mine looks like this (I added ,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 to the partition with the mount point /):
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    /dev/mapper/server1--vg-root / ext4 errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 1
    # /boot was on /dev/sda1 during installation
    UUID=39762f15-3a49-4982-add3-139d5040b48a /boot ext2 defaults 0 2
    /dev/mapper/server1--vg-swap_1 none swap sw 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Change the file from:

    Code:
    UUID=5bebbe60-0b42-11eb-9216-6a79d7127b83 / ext4 defaults 0 0
    /swap.img none swap sw 0 0
    to

    Code:
    UUID=5bebbe60-0b42-11eb-9216-6a79d7127b83 / ext4 defaults,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0 0
    /swap.img none swap sw 0 0
     
  16. peterpetr

    peterpetr Member

    @till Thank you, I have completed the VPS cloud server setup.
    I will do a backup, then install ISPconfig.

    I very much appreciate your guidance, help and the explicit Perfect Server tutorial.
     
  17. peterpetr

    peterpetr Member

    @till I thought I setup my new instance of an Ubuntu 18.04 cloud server, using the Perfect Server tutorial and your guidance correctly. I followed: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18-04-nginx-bind-dovecot-and-ispconfig-3/

    In the section with a heading: 15. Install Roundcube Webmail
    I thought I have to wait until ISPconfig is installed before pasting the NGINX Directives text...
    so I did not do any more of the configuration in this section. For instance, I didn't do:

    nano /etc/nginx/nginx.conf
    [...]
    http {
    [...]
    ## Detect when HTTPS is used
    map $scheme $fastcgi_https {
    default off;
    https on;
    }
    [...]
    }
    [...]

    I thought all the avove could be done after ISPconfig was installed?

    During the ISPconfig installation, I got the following errors (in bold text):
    MySQL database to create [dbispconfig]:
    MySQL charset [utf8]:
    [INFO] service Postgrey not detected
    Configuring Postfix
    Can't load /home/ruut/.rnd into RNG
    140623260885440:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/ruut/.rnd

    Generating a RSA private key
    ................++++
    .++++
    writing new private key to 'smtpd.key'

    And, then these errors (in bold text below):
    Configuring Mailman
    Configuring Dovecot
    [INFO] service Spamassassin not detected
    [INFO] service Amavisd not detected
    [INFO] service Rspamd not detected
    Configuring Getmail
    Configuring Jailkit
    Configuring Pureftpd
    Configuring BIND
    Configuring nginx
    [INFO] service OpenVZ not detected
    Configuring Ubuntu Firewall
    [INFO] service Metronome XMPP Server not detected <peter> purposely not installed </peter>
    Configuring Fail2ban
    Configuring Apps vhost
    Installing ISPConfig
    ISPConfig Port [8080]:
    Admin password [a70bef3b]: <<my password>>
    Re-enter admin password []: <<my password>>
    Do you want a secure (SSL) connection to the ISPConfig web interface (y,n) [y]:
    Generating RSA private key, 4096 bit long modulus (2 primes)
    ............................................................++++
    ..................++++
    e is 65537 (0x010001)
    Can't load /home/ruut/.rnd into RNG
    139907824411072:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/ruut/.rnd

    ...
    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    Can't load /home/ruut/.rnd into RNG
    139995006398912:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/home/ruut/.rnd

    writing RSA key
    Configuring DBServer
    Installing ISPConfig crontab
    Installing ISPConfig crontab
    no crontab for root
    no crontab for getmail

    Detect IP addresses
    Restarting services ...
    Installation completed.

    I am not sure if I made some errors or if you have any insights/instructions regarding the bold text items (errors?) above?

    Again, thank you for your patients and assistance with my ISPconfig setup.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    To me it looks as if you run the ispconfig installer as a wrong user "ruut" instead of the Linux 'root' user, you must be logged in as root, or if you logged in as another user, you must have used the usual Ubuntu command "sudo -s" to become root, before you install any software or install ISPConfig.
     
  19. peterpetr

    peterpetr Member

    @till Yes, you are correct. I'll restore my backup that I made prior to attempting the ISPconfig install (with the wrong user). Then will do the ISPconfig install after issuing "sudo -s" to become root.

    Or, from your wording, should I use an alternative to "sudo -s" ?
    (as I've always used "sudo -s" for installing/updating Ubuntu)

    Hopefully, it looks like my error will be simple to resolve -- after restoring my backup.
    Thank you.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    No, sudo -s is fine.
     

Share This Page