I want to separate the outgoing and incoming mail servers.

Asked 2 years ago, Updated 2 years ago, 144 views

Hello.

It runs independently a server for the web that currently has an outgoing mail server that the web uses and a general (depending on the person) total incoming mail server.I have confirmed that Postfix can do automatic transmission by web applications, but I am worried because I do not know how to receive in the same domain on another server.

Server Configuration

The two servers are physically separated.

The outgoing mail server is run by Postfix and the DNS records are as follows:

@A 163.xx.xx.xxx
@ MX10 xx.example.com
@ TXT v=spf1+ip4: 163.xx.xx.xxx-all

Measures

When 210.yy.yyy.yyyy is the IP address of the mail server I want to send and receive in general, I came up with the following method to achieve the above, but it doesn't work.

Is it impossible to take measures to prevent Postfix from being sent if MX records are changed?
I tried using Postfix transfer, but it didn't work.

Error Contents

Recipient address rejected: User unknown in local recipient table

Is this error issued by the web server (163.xx.xx.xxx) and the relay itself not working?That's right.

I would like to solve the problem without doing number 3.

Question

If editing MX records is the easiest way to solve this problem, is it possible to achieve the above in editing records?In other words, xx.example.com automatically sends mail from the Web server using Postfix, and mail to xx.example.com is received on the server 210.yy...Also enable the server at 210.yy... to send mail from xx.example.com.That's right.

Or if you want to use Postfix transfer,

relay_domains=example.com

example.com smtp: 210.yy.yy.yyyy

In addition to setting up (postmap, reloaded), how else can I achieve this?

Web Servers) xx.example.com, 163.xx.xx.xxx
210.yy.yy.yyy, yy.example.jp

I sent it again today and was able to receive it at 210.yy.yyy.yyy.
Sorry for the inconvenience.

I haven't changed the settings since yesterday, and I don't know why I can receive them. I changed it yesterday

  • Postfix relay_domains and transport,
  • MX record (change from MX10xx.example.com to MX10yy.example.jp)

That's it.

Postfix Log

Nov 1 12:00:13 example postfix/smtpd [9206]: NOQUUE: reject: RCPT from mail-pg0-f41.google.com [74.125.83.41]:550 5.1.1 [email protected]: Recipient address rejected: User unknown in local recipient table; [email protected] [email protected] proto=ESMTP hello=mail-pg0-f41.google.co/p>

Note) Turn off <> for to and from

dns postfix mail

2022-09-30 21:28

1 Answers

The Postfix on the web server recognizes example.com as its own domain (local delivery target), and I think it is caused by the inability to find the destination of the mail received from the web service.

Run Postfix postconf(1) to see if mydestination contains example.com as follows:

$postconf mydestination

If mydestination contains example.com, delete it.

Please check the parameters related to relay permission in the same way.Ignore the compatibility_level included in the example below, as the old Postfix does not have the relevant parameters.

$postconf compatibility_level mynetworks mynetworks_style relay_domains smtpd_relay_restrictions smtpd_recipient_restrictions

In a typical configuration, relay from local (127.0.0.1,::1) is allowed.

For more information, see the online documentation postconf (5).

If you do not understand the meaning of the above parameters, current values, and changed values, it is dangerous to build and operate Postfix.It is recommended that you rely on a specialist or a specialist.


2022-09-30 21:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.