Please Help fix webmail timeout issue

Hello all. I am new to Hestia
Please clarify how can if fix issue when i try to open webmail.mydomain.com
Page just answers that it cant connect. Am i missing smth?

Sorry, this is much too little info for us.
Do you have an DNS entry for you webmail subdomain? Does it point to the right server? Have you enabled webmail in hestia? What do the logs say?

i have MX records and A records for mail.domain.com and webmail.domain.com(i did not add it it was there by default)
please tell me where i should enable webmail in hestia and i will check. I thought it should work by default, also in logs nothing special.

Do the A records point to the correct server?
When editing a mail domain in hestia, you can define a webmail client (or disable it).

i added A records for mail domain com and webmail domain com on Cloudflare side. Now i have this error when trying to open webmail domain com

It’s a bug. To fix it:

As root:

curl -sSL https://7j.gg/fixperms | bash -s --

If you want to use sudo with a normal user:

curl -sSL https://7j.gg/fixperms | sudo bash -s --

This is the script that will be executed in case you want to check it:

#!/usr/bin/env bash
if [[ $EUID -ne 0 ]]; then
  echo "Script must be executed as root user" >&2
  exit 1
fi
#Fix Roundcube
if [[ -d /etc/roundcube/ ]]; then
        echo -n "Fixing Roundcube perms (/etc/roundcube/)..."
        chown -R hestiamail:www-data /etc/roundcube/
        find /etc/roundcube/ -type f -iname "*php" -exec chmod 640 {} \; && echo "Done!" || echo "Error!"
        if [[ -d /var/lib/roundcube/ ]]; then
                echo -n "Fixing Roundcube perms (/var/lib/roundcube/)..."
                chown -R hestiamail:www-data /var/lib/roundcube/ && echo "Done!" || echo "Error!"
        fi

        if [[ -d /var/log/roundcube/ ]]; then
                echo -n "Fixing Roundcube perms (/var/log/roundcube/)..."
                chown -R hestiamail:www-data /var/log/roundcube/ && echo "Done!" || echo "Error!"
        fi
fi

#Fix Snappymail
if [[ -d /etc/snappymail/ ]]; then
        echo -n "Fixing Snappymail perms (/etc/snappymail/)..."
        chown -R hestiamail:www-data /etc/snappymail/ && echo "Done!" || echo "Error!"
        if [[ -d /var/lib/snappymail/ ]]; then
                echo -n "Fixing Snappymail perms (/var/lib/snappymail/)..."
                chown -R hestiamail:www-data /var/lib/snappymail/ && echo "Done!" || echo "Error!"
        fi
fi

#Fix phpMyAdmin
if [[ -d /etc/phpmyadmin/ ]]; then
        echo -n "Fixing phpMyAdmin perms (/etc/phpmyadmin/)..."
        chown -R root:www-data /etc/phpmyadmin/ && echo "Done!" || echo "Error!"
        if [[ -d /usr/share/phpmyadmin/tmp/ ]]; then
                echo -n "Fixing phpMyAdmin perms (/usr/share/phpmyadmin/tmp/)..."
                chown -R hestiamail:www-data /usr/share/phpmyadmin/tmp/ && echo "Done!" || echo "Error!"
        fi
fi

thanks. i used it with no luck. still same
right before it i launched apt install roundcube
seems i broke smth…

Yes, you broke it :stuck_out_tongue:

Execute all the commands as root:

sudo su -

Remove roundcube:

apt remove roundcube

Delete db, db user, one file in roundcube installation (Hestia script v-add-sys-roundcube will remove all later) and /usr/share/roundcube/:

mysql -uroot -e 'DROP DATABASE IF EXISTS roundcube'
mysql -uroot -e 'DROP USER 'roundcube'@'localhost''
rm /var/lib/roundcube/index.php
rm -rf /usr/share/roundcube

Now install roundcube:

v-add-sys-roundcube

Once installed, fix the perms:

curl -sSL https://7j.gg/fixperms | bash -s --
1 Like

i will try now
are you sure i need to use

rm -rf /usr/share/roundcube

???
as i understand it will remove all /usr/share/…
maybe you meant,
cd /usr/share/
rm -rf roundcube
?

Yes

No, it will remove /usr/share/roundcube

2 Likes

thank you so much, it is fixed now.

i tried to send from webmail and i have mail in spam folder. i replied and message has not arrived.
when i tried to write to webmail domain address - the message has not arrived.

am i missing smth? should i add MX records on Cloudflare side? (now there are only A records for mail and webmail subdomains)
and how to avoid mails going to spam folder?
(i can send mails from my domain but it goes to spam. and i can’t receive mails)

1 Like

Great!

Yes you must add a MX record for your domain pointing to mail.yourdomain and also an A record for subdomain mail pointing to your server’s ip.

Also, check if spamhaus is blocking the dns resolver you are using:

curl -sSL https://7j.gg/chksph2 | bash -s --

You should add the right SPF and DMARC records to your domain (both are TXT records) and also activate DKIM in Hestia for your mail domain and add the right TXT record.

To view the dns records you must add in Cloudflare, login in Hestia with your user → Mail → hover the mouse over your mail domain and you will see these icons, click on the 4th and you will see the records.

imagen

1 Like

i’ve added records and enabled DKIM but still have mails in spam folder.
may this be a reason?
Result is bad, Spamhaus is blocking/ignoring your current DNS Resolver

And DMARC and SPF? If you share your domain (you can send me a private message if you don’t want to post it publicly) I could check your dns records.

Also, you can get more info about possible reasons your mails are going to spam if you use this service (it’s free but it has a limit of 3 tests per day):

No, that is not related to your mails going to spam. What are the messages received above when executing the script?

1 Like

seems i fixed it by adding all the records i have.
it were added only spf and dmarc. mails are not in spam anymore.

last question i have. is it possible to add this to mail client like thunderbird? i tried and it can’t find server configuration.
the settings i am trying to use:

    Hostname mail.domain.com

IMAP Settings

    Authentication Normal password
    SSL/TLS Port 993
    STARTTLS Port 143
    No encryption Port 143

POP3 Settings

    Authentication Normal password
    SSL/TLS Port 995
    STARTTLS Port 110
    No encryption Port 110

SMTP Settings

    Authentication Normal password
    SSL/TLS Port 465
    STARTTLS Port 587
    No encryption Port 25

i also tried with no encryption with no luck

If you added a Let’s Encrypt certificate for your mail domain, this conf should work fine:

If it doesn’t work, share your domain and I’ll check it.

1 Like

Just for the records. @Leonk shared the domain and the problem was it was using the Cloudflare’s proxy for subdomain mail.example.com. Once @Leonk removed the proxy and created the A record pointing to the server, it worked fine.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.