-1

I have 2 domains:

  1. ex1.example with IP 192.0.2.1
  2. ex2.example with IP 203.0.113.2

On ex1.example I installed postfix and dovecot with support working on multiple domains (MariaDB with tables and other stuff). Now I want to receive email for the following email addresses:

  • support@ex1.example
  • postmaster@ex1.example
  • support@ex2.example
  • postmaster@ex2.example

With postmaster@ex1.example and support@ex1.example everything okay, I can receive emails, but when I try to send email to support@ex2.example or postmaster@ex2.example - nothing happens.

DNS zone settings for domain ex1.com:

  • A Record @ 192.0.2.1
  • A Record mail 192.0.2.1
  • A Record www 192.0.2.1
  • MX Record ex1.example mail.ex1.example.
  • MX Record mail.ex1.example ex1.example.

DNS zone settings for domain ex2.com:

  • A Record @ 203.0.113.2
  • A Record mail 192.0.2.1
  • MX Record ex2.example mail.ex1.example.

When I try to send an email to support@mail.ex2.example I got an error in maillot:

Mar 25 22:47:02 ex1 postfix/smtpd[6000]: NOQUEUE: reject: RCPT from: 454 4.7.1 <support@mail.ex2.example>: Relay access denied; from=<user@domain.localdomain> to=<support@mail.ex2.example> proto=ESMTP helo=<user.localdomain>
  • 1
    You need to configure Postfix too. – Michael Hampton Mar 26 at 0:34
  • @MichaelHampton postfix configured for both domains – dikkini Mar 26 at 6:40
  • Shouldn't you send the mail to support@ex2.com? I think that is how your DNS is configured. You should add a record mail.ex2.com IN NS mail.ex1.com or mail.ex2.com IN NS ex1.com, if you want to send mails to domain mail.ex2.com. Now your only record for mail.ex2.com is an A record. Relaying for ex2.com is not entered. – nobody Mar 26 at 7:27
  • @nobody without MX entries at all? For domain ex2.com only NS record (or A record?) like mail.ex2.com IN NS mail.ex1.com? and I can send email to support@ex2.com or support@mail.ex2.com? – dikkini Mar 26 at 7:47
  • Sorry, I meant MX, not NS, and numbers for MX records priorities are missing. You will know which numbers you want to put in. – nobody Mar 26 at 8:13
1

you should make your mail server to be mail server for both domains. The configuration you have now, says that mails for domain ex2.example are handled by mail server mail.ex1.example. The line you wrote tells me that you have only defined mail for domain ex2.example and not mail.ex2.example.

  • MX Record ex2.example mail.ex1.example.

You do not have an entry for domain mail.ex2.example. I think you should add an entry for mail.ex2.example domain:

mail.ex2.example. IN MX 10 mail.ex1.example.

You also say that mails for

  • support@ex1.example
  • postmaster@ex1.example
  • support@ex2.example
  • postmaster@ex2.example

should work. However, than you complain that mail support@mail.ex2.example does not work, which is not on the list. I believe support@ex2.example should work according to configuration you have provided. When you add the line I suggest, I think also support@mail.ex2.example should work, too.

  • actually you are wrong understand me. in my current configuration email: support@ex1.com, postmaster@ex1.com works perfectly, but support@ex2.com, postmaster@ex2.com DOES NOT work at all. – dikkini Mar 26 at 13:00
  • I would suggest to go through your logs and find out where and why the mail is stopped. It is either wrong DNS or mail server configuration. According to your description I suspected that DNS is wrong, because your question shows that you have not configured it for mail.ex2.com domain. It may be anything. Take a look here for instructions how to configure MX records mirror.thelifeofkenneth.com/sites/qt.vidyagam.es/library/… – nobody Mar 27 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.