Up
English
DNS State Wrong CName
- Edited
Well you didn’t provide a lot of context. But a mail server should generally have a fixed IP address and a corresponding A record instead of a CNAME record. I’m also wondering why you only opened ports 80 and 443? It will definitely become difficult to receive any emails like that.. ;-)
mlcwuser Thanks for your reply.
Well you didn’t provide a lot of context.
Is there some specific info should I provide?
But a mail server should generally have a fixed IP address and a corresponding A record instead of a CNAME record.
I think dynamic DNS is an alternative to a fixed IP. I have “a” record but mailcow report it as CNAMe
I’m also wondering why you only opened ports 80 and 443? It will definitely become difficult to receive any emails like that.. ;-)
I think nginx should be able to forward requests to the other ports. I also tried oppenning the ports in the router but I get the same error!
- Edited
ibr I think dynamic DNS is an alternative to a fixed IP. I have “a” record but mailcow report it as CNAMe
In theory it could work with dynamic DNS. In practice however you will run into al kind of issues, especially when sending mails. Mails that are sent from residental IP ranges will almost certainly end up in the spam folder of the recipients, or in the worst case they will get bounced or rejected. Especially if you send mails to mailboxes that are hosted by big providers like Google or Microsoft…
ibr I think nginx should be able to forward requests to the other ports. I also tried oppenning the ports in the router but I get the same error!
Well while you could do that in theory, it’s not configured that way in Mailcow. Also even if Mailcow would use NGINX to proxy emails, the respective ports would still have to be open in order to receive mails from other mail servers and to be able to connect mail clients via SMTP and IMAP. Here is an example config:
- Edited
Addition: (in order to answer your original question)
The error in the DNS check of Mailcow about the CNAME record is most likely due to the fact that Mailcow only checks for an A record. Mail reception will probably work, despite the error message, if the appropriate ports are open and forwarded to your Mailcow server! However, sending emails from a residental IP address will of course still remain an issue.
- Edited
Also many ISPs are blocking Port 25 at least for outgoing connections. If that’s the case you wouldn’t be able to send emails at all, at least not directly from your Mailcow instance.
However, sending emails from a residental IP address will of course still remain an issue.
Also many ISPs are blocking Port 25 at least for outgoing connections. If that’s the case you wouldn’t be able to send emails at all, at least not directly from your Mailcow instance.
Thanks for all the explaination, as I mentioned, I can send emails. The problem is I can not recieve!!!
- Edited
I can not find ./configure file in gninx folder. It is also not clear what is the name of the file in the example or where it should be save!!!
Assuming i save it in /etc/nginx/sites-enabled/mymailserver.conf, I don’t see how it will bypass proxy to the container!!! shall I add location part to each server? I tried the contents bellow and I get this error: “mail” directive is not allowed here
worker_processes auto;
mail {
server_name mail.example.com;
auth_http localhost:9000/cgi-bin/nginxauth.cgi;
proxy_pass_error_message on;
location / {
proxy_pass http://myCT/;
client_max_body_size 1G;
}
ssl on;
ssl_certificate /etc/ssl/certs/server.crt;
ssl_certificate_key /etc/ssl/certs/server.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
server {
listen 25;
location / {
proxy_pass http://myCT/;
client_max_body_size 1G;
}
protocol smtp;
smtp_auth login plain cram-md5;
}
server {
listen 110;
location / {
proxy_pass http://myCT/;
client_max_body_size 1G;
}
protocol pop3;
pop3_auth plain apop cram-md5;
}
server {
listen 143;
location / {
proxy_pass http://myCT/;
client_max_body_size 1G;
}
protocol imap;
}
}
- Edited
ibr The problem is I can not recieve!!!
Did you forward port 25 to your server and did you put at least the minimal DNS records in place like described here:
These are the barebones minimum DNS records you’re gonna need in order to receive email, where 1.2.3.4 stands for your public IP address:
host IN A 1.2.3.4
@ IN MX 10 host.domain.org.
- Edited
ibr I can not find ./configure file in gninx folder. It is also not clear what is the name of the file in the example or where it should be save!!!
You don’t need to configure an NGINX mail proxy to get Mailcow working. Mailcow works fine as it is. Just forward all the necessary ports to it and you should be fine.
I only posted that link to support my point, which was that even if you were to use an NGINX proxy, you would still have to forward port 25. Port 25 must be forwarded as a bare minimum, if you want to be able to receive mail from other mail servers. There is no way around it. NGINX does not magically allow you to only use ports 80 and 443. Y
mlcwuser thanks for your reply!
Did you forward port 25 to your server and did you put at least the minimal DNS records
yes. if you noticed the mail-tester result above, I got 9.8/10port 25. Port 25 must be forwarded as a bare minimum
All related ports are oppened, in my nginx conf file, I listened to all ports and forward to the mailcow machine. Yet, I am not sure how to test this and make sure nothing wrong here. i used mail-tester and get a good result, is there anything else help to test this specific part related to ngninx
- Edited
ibr Yet, I am not sure how to test this and make sure nothing wrong here.
Honestly I’m not sure either. Buit I have never used Mailcow behind NAT. I installed my instance on a VPS with a fixed public IP address and everything worked more or less out of the box after I have set all relevant DNS record for my domains at my registrar.
Thanks, I don’t think the fixed IP is the problem. It would be nice if someone has the same setup or one of the mailcow staff share some knowledge.