Mail server not working (==> help)

Could someone explain: is it necessary to have a child domain: mail.domain.com in order for the email server to work? I can’t see it via cyber panel.

Yes I do have DNS record mail.domain.com pointing to my IP
And there is a line in vHost conf:

context /.well-known/acme-challenge {
  location                /usr/local/lsws/Example/html/.well-known/acme-challenge
  allowBrowse             1

  rewrite  {

  }
  addDefaultCharset       off

  phpIniOverride  {

  }
}

At the moment I can get emails, but not able to send them.

When testing the email server I get self signed
mail ssl
SSL certificate issue

Could someone help me troubleshoot this problem?

1 Like

Anyone ???

Did you use CloudFlare? If yes please turn off Proxied for mail.domain.com and reissue SSL mail.domain.com

https://community.cyberpanel.net/docs?category=14&topic=113

No, I don’t use Cloudflare
The link you gave me leads to the same action as login to the cyber panel dashboard and issuing SSL for the mail server, which I tried already

Have any error logs?

404 means ‘File Not Found’. Have you try troubleshot using this How to fix SSL issues in CyberPanel?

Yes, I did. Can’t find the right answers, that’s why I’ve created this topic.

I have addressed this in my first post on this topic and there was no answer: I can’t see the child domain in the Cyber panel dashboard mail.domain.com

Is this a problem?
What causes the 404 error in logs?

You must have child domain of mail and also the mail domain must have the ssl

How to recreate child domain, because I’m not sure how to fill those fields properly

Try this command, replace <mail.domain.tld> to your domain.

/root/.acme.sh/acme.sh --issue -d <mail.domain.tld> --cert-file /etc/letsencrypt/live/<mail.domain.tld>/cert.pem --key-file /etc/letsencrypt/live/<mail.domain.tld>/privkey.pem --fullchain-file /etc/letsencrypt/live/<mail.domain.tld>/fullchain.pem -w /usr/local/lsws/Example/html --force --debug

After successfully generate new ssl with above command and ‘cert’ still expired at checktls.com use the command below as su -.

postmap -F hash:/etc/postfix/vmail_ssl.map
systemctl restart postfix
systemctl restart dovecot
2 Likes

I’ve tried.
Still the same problem.

I have a strange feeling it is because I don’t have a child domain.
Waiting for someone to reply to this issue maybe @usmannasir ?

Did you use command from usmannasir i gave above? If you use your command in your screenshot above it will not gonna work. You trigger wrong Example folder in your command.

This below command you use in your screenshot above, right?

sudo /root/.acme.sh/acme.sh --issue -d mail.peakminute.com --cert-file /etc/letsencrypt/live/mail.peakminute.com/cert.pem --key-file /etc/letsencrypt/live/mail.peakminute.com/privkey.pem --fullchain-file /etc/letsencrypt/live/mail.peakminute.com/fullchain.pem -w /home/peakminute.com/mail.peakminute.com -k -ec-256 --force --server letsencrypt
-w /home/peakminute.com/mail.peakminute.com <== This folder does not exist

If you dont have child domain, just create subdomain and you will have child domain.

That’s what we are talking about.
I don’t know how to create that child domain properly.

turns out I’m trying to issue a cert to a non-existing folder and the command returns 404

How to create a child domain???

Here

and you need to use this command instead of yours

dude, no!
all those videos show how to create another website on subdomain.
I need to create for mail and settings may be different.

Dude, Thats the same thing. Just left the folder with 1 index.html.

BTW, did you already try this command instead of yours? ohhh, dont foget to run it with sudo su -

If found any error you can sent it here. :wink:

Can’t issue ssl for empty directory
I don’t understand

Explain to me line by line:
I do have to select my website (aka root domain)
the domain name field will be “mail” as far as I understand
path?- do I need to enter anything in this field???
Select PHP,- do I need PHP at all here???
SSL- yes we need that!
DKIM,- do we need it here???
open_base_dir protection - do I need to tick this???

Wrong configuration will not work again I don’t want that.

Answer me this, before i explain to you line by line. Can you screenshot and sent it here that you already run command that usmannasir give above? Here i put the command again here.

You need to sudo su - before run the command.

Yes
Yes
Empty
Just put 8.1
Yes
No
Yes

1 Like

Thank you very much for your patience
Creating a child domain helped and I successfully issued SSL
I can send and get emails.