CyberPanel Community

ClosedMail server not working (==> help)

pe
peakminute #1

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?

19 replies
pe
peakminute #4

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

ay
ayobpro #5

Have any error logs?

pe
peakminute #8

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?

sh
shoaibkk #9

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

ay
ayobpro #11

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
pe
peakminute #12

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 ?

ay
ayobpro #13

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.

ay
ayobpro #15

Here

and you need to use this command instead of yours

pe
peakminute #16

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

ay
ayobpro #17

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:

pe
peakminute #18

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.

ay
ayobpro #19

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.

ay
ayobpro #21

Yes
Yes
Empty
Just put 8.1
Yes
No
Yes

pe
peakminute #22

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

Sign in to reply