Solved Mail does not go to an external address

Solved issue

deminart

New Member
Joined
May 23, 2023
Messages
15
Reaction score
4
Credits
140
Good day everyone. Tell me please.
my recent post
In short, the mail was not sent to external mail, because. internal domain with the same name.
I was advised to make a transport card.
nano /etc/postfix/transport_map
yagroup.com smtp:[mx.yandex.com]
postmap /etc/postfix/transport_map
systemctl restart postfix

At that time, this solved my problem, everything worked fine.
But now the same error:
Jun 5 08:52:20 mail roundcube: <iha6n2bd> Successful login for [email protected] (ID: 4) from 192.168.0.1 in session iha6n2bdj300hv8v
Jun 5 08:52:47 mail postfix/submission/smtpd[273712]: connect from localhost[127.0.0.1]
Jun 5 08:52:47 mail postfix/submission/smtpd[273712]: Anonymous TLS connection established from localhost[127.0.0.1]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-sig>
Jun 5 08:52:47 mail postfix/submission/smtpd[273712]: 4QZLnq3NLgz3cnC5: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_username=[email protected]
Jun 5 08:52:47 mail postfix/cleanup[273715]: 4QZLnq3NLgz3cnC5: message-id=<[email protected]>
Jun 5 08:52:47 mail postfix/qmgr[84619]: 4QZLnq3NLgz3cnC5: from=<[email protected]>, size=655, nrcpt=1 (queue active)
Jun 5 08:52:47 mail roundcube: <iha6n2bd> User [email protected] [192.168.0.1]; Message <[email protected]> for [email protected]; 250: 2.0.0 Ok: queued as 4QZLnq3NLgz3cnC5
Jun 5 08:52:47 mail postfix/submission/smtpd[273712]: disconnect from localhost[127.0.0.1] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Jun 5 08:52:47 mail postfix/10025/smtpd[273726]: connect from localhost[127.0.0.1]
Jun 5 08:52:47 mail postfix/10025/smtpd[273726]: 4QZLnq6dMGz3crX0: client=localhost[127.0.0.1]
Jun 5 08:52:47 mail postfix/cleanup[273715]: 4QZLnq6dMGz3crX0: message-id=<[email protected]>
Jun 5 08:52:47 mail postfix/qmgr[84619]: 4QZLnq6dMGz3crX0: from=<[email protected]>, size=1926, nrcpt=1 (queue active)
Jun 5 08:52:47 mail postfix/10025/smtpd[273726]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Jun 5 08:52:47 mail amavis[269778]: (269778-01) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:50890 ESMTP/ESMTP <[email protected]> -> <[email protected]>, (), Queue-ID: 4QZLnq3NLgz3cn>
Jun 5 08:52:47 mail postfix/amavis/smtp[273720]: 4QZLnq3NLgz3cnC5: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.54, delays=0.11/0.02/0.02/0.39, dsn=2.0.0, status=sent (250 2.0.0 from >
Jun 5 08:52:47 mail postfix/qmgr[84619]: 4QZLnq3NLgz3cnC5: removed
Jun 5 08:52:47 mail postfix/smtp[273727]: connect to yagroup.com[192.168.0.23]:25: Connection refused
Jun 5 08:52:47 mail postfix/smtp[273727]: connect to yagroup.com[192.168.0.6]:25: Connection refused
Jun 5 08:52:47 mail postfix/smtp[273727]: connect to yagroup.com[192.168.0.3]:25: Connection refused
Jun 5 08:52:47 mail postfix/smtp[273727]: 4QZLnq6dMGz3crX0: to=<[email protected]>, relay=none, delay=0.06, delays=0.01/0.04/0/0, dsn=4.4.1, status=deferred (connect to yagroup.com[192.168.0.3]:25: Connec>

gkgroup.com - internal mail domain
yagroup.com - internal AD domain and mail on an external service.

It feels like the postmap settings are being ignored...
 
Last edited:


If it was working before than something must have changed after that. Share the output of the following.
Code:
grep transport_maps /etc/postfix/main.cf
 
Code:
grep transport_maps /etc/postfix/main.cf
grep transport_maps /etc/postfix/main.cf
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
transport_maps =
proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf

It seems that since that time he has not done anything, and if he did, he restored everything as it was. I mainly worked with the gateway (pfsecnse) and tried to install plugins for roundcube, it is unlikely that it could somehow affect ...
 
grep transport_maps /etc/postfix/main.cf
transport_maps =
proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
Looks like you are using mysql to define your transport maps. So the transport map I had you define in another topic should probably defined in a mysql table, which would probably the one mentioned in "proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf" You can find out in which mysql table you have to add it by looking at the "query =" line in the "transport_maps_domain.cf" file.
 
Looks like you are using mysql to define your transport maps. So the transport map I had you define in another topic should probably defined in a mysql table, which would probably the one mentioned in "proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf" You can find out in which mysql table you have to add it by looking at the "query =" line in the "transport_maps_domain.cf" file.

Once again, thank you for your response) You are constantly helping out) There is still little experience with postfix.

Did not quite what you write, but now it works again ...
Recreated transport_map
Added a line to main.cf:
transport_maps = hash:/etc/postfix/transport_maps
Restarted postfix and it worked...
Everything comes and goes as it should. Would you like to understand for a long time? :)
 
Recreated transport_map
Added a line to main.cf:
transport_maps = hash:/etc/postfix/transport_maps
Restarted postfix and it worked...
Do you know why it was deleted from the configuration since you added that last time? Quite strange that you saw this now then?
grep transport_maps /etc/postfix/main.cf
transport_maps =
proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
Did someone change it without you known it?
Would you like to understand for a long time? :)
I don't get what you mean with this?
Once again, thank you for your response) You are constantly helping out) There is still little experience with postfix.
Glad that I was able to help out . But maybe you should setup a test system yourself to get some experience with Postfix that way you can solve it yourself next time or hire some who does have the experience :)
 
Do you know why it was deleted from the configuration since you added that last time? Quite strange that you saw this now then?
Hmm, I can’t, I’ll say, I didn’t pay attention ... For some reason I don't think it was there...
Did someone change it without you known it?
No, except for me, no one has access yet. Maybe I changed something, but again, I don't think I would change this line just like that...
I don't get what you mean with this?
To ensure that this transport setting again suddenly does not break "by itself"

Glad that I was able to help out . But maybe you should setup a test system yourself to get some experience with Postfix that way you can solve it yourself next time or hire some who does have the experience
Yes, it's too late to test it)) If only to expand on the parallel, but I don't see much sense in this... Now she is a test and combat at the same time :)
 

Members online


Top