The officially official Devuan Forum!

You are not logged in.

#1 2020-09-23 10:11:44

ftusc
Member
Registered: 2020-07-03
Posts: 12  

Mail server don't receive mail

Hi folks,
I want to create (my first time) mail server for my organization with Devuan Beowulf.
I installed postfix, mailutils, dovecot, configured it. I was able to sending email to other, sending/receiving mail
from same domain but server refuse me ingoing mail from other domain. I don't receive email and sender receive error as:
"recipient address not accepted server", "The recipient server did not accept our requests to connect." or "RCPT address has not existent domain".
I read various document but i couldn't find a solution.
Someone can help me?

Offline

#2 2020-09-23 13:16:33

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 219  

Re: Mail server don't receive mail

Assuming you are operating a NAT, have you opened the email ports (25, 143, 443, 587, 993) in your external (router's) firewall and forwarded them to your mail server's ip?

Last edited by Marjorie (2020-09-23 20:51:47)

Offline

#3 2020-09-23 14:27:38

xinomilo
Unknown
Registered: 2017-07-02
Posts: 315  

Re: Mail server don't receive mail

do you also have MX records setup correctly for domain? check your DNS records...

Offline

#4 2020-09-24 07:53:27

ftusc
Member
Registered: 2020-07-03
Posts: 12  

Re: Mail server don't receive mail

Yes, i have not MX records. How to insert MX records? I have to install bind9 and configuring a true DNS server? I think I need a very simple DNS server for a line or two of configuration like this:

MYSERVERDNS            IN      A       MYSERVERIP
MYSERVERDNS            IN      MX      10     MYSERVERDNS

Offline

#5 2020-09-24 08:06:33

xinomilo
Unknown
Registered: 2017-07-02
Posts: 315  

Re: Mail server don't receive mail

assuming your organization has a domain name and that's the same you use for email addresses, you should add A/MX/SPF records in that domain's DNS server, not setup another one...

Offline

#6 2020-09-24 10:20:11

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 219  

Re: Mail server don't receive mail

xinomilo wrote:

assuming your organization has a domain name and that's the same you use for email addresses, you should add A/MX/SPF records in that domain's DNS server, not setup another one...

You would normally set up a MX record as mail.mydomain.tld, (though it doesn't have ot be 'mail') which is a subdomain of your domain, though it can have the same IP. You will also have to use this name in your MTA configuration and point your (external) users imap/pop3/smtp configs at it, unless you want to add additional records .

For testing purposes incoming mail should work even if you don't have a SPF record, unless you've configured your server to refuse mail that doesn't. Needless to say In my opinion a mail server should filter out email that doesn't have a SPF record, since either the email is spam or the originator hasn't set up their mailserver properly.

Reverse DNS itself is not provided by your domain name registrar (unless they also provide your IP). They come from whoever provided your IP.

In my case this is my ISP (Zen Internet). Previously I had my mailserver in the cloud and it was hosted by Linode who provided my IP (and hence SPF), however Linode wasn't my domain name provider. Of course I did have to put the IP, MX IP (in my case they are the same) and SPF record into my domain name record.

You do need to add a SPF as a TXT record to your DNS. Something like:
v=spf1 a mx ptr ip4:111.222.333.444 -all
where 111.222.333.444 is your mailserver IP4 address.

Also, though it may not be required to test your system, you should enable DKIM and DMARC and check that they are working as unless you do some email providers may reject your emails.

Last edited by Marjorie (2020-09-24 11:00:48)

Offline

#7 2020-11-02 10:27:49

ftusc
Member
Registered: 2020-07-03
Posts: 12  

Re: Mail server don't receive mail

Thanks.
The firewall ports 25 (managed from other) wasn't open.
Once opened it works.

Offline

Board footer