1

I have a very strange problem with one server01 its smtp notifications mail. My scenario: server01 sends mails over postfix to local on-prem exchange server. That mail is correct with to: address, from, body...everything is ok. On local exchange we made relay with server01 ip address. Then, local on-prem exchange send that mail to online exchange office 365.

Problem is: mail on local exchange on prem(get from wireshark) is in ok format, from: some@someaddress.com, to: some@somereceipeaddress.com mail on exchange online is in strange format: from: mydomain.com some@someaddress.com, to: mydomain.com some@somereceipeaddress.com

Office 365 antispam system see that mail like corupted or compromised, and then send that mail to quarantine. I was chack everything on postfix and settings in office 365, and I cant find why is my mail in office 365 in this format: (mydomain.com some@someaddress.com)

amko77
  • 11
  • 2

2 Answers2

0

Check if some kind of address rewriting is enabled on the postfix server. Check the following configuration parameters

append_dot_mydomain
smtp_generic_maps
smtp_header_checks
sender_canonical_classes
sender_canonical_maps

but can be something else - please post output from

postconf -n

More information at http://www.postfix.org/ADDRESS_REWRITING_README.html

Dobromir Velev
  • 373
  • 2
  • 6
  • Oh sorry - I was thinking postfix was the relaying server. Can you try Get-TransportAgent "Address Rewriting *" in the exchange management shell – Dobromir Velev Jan 08 '21 at 15:13
  • I don't have any result. – amko77 Jan 08 '21 at 20:04
  • Does Get-AddressRewriteEntry show anything. Obviously the domain is added by the exchange server - so there must be some rule you need to change there – Dobromir Velev Jan 09 '21 at 16:04
  • We don't have any rewrite rule. One smtp address is only problem, all others work Ok. When we get inspection on local exchange, message from linux server is in corectly format, but for some reason on Exchenge online look like rewrited... – amko77 Jan 09 '21 at 18:29
0

Is it hybrid deployment? How did you configure postfix to send message to on-premise Exchange server? Anonymous relay connector? “local on-prem exchange send that mail to online exchange office 365.” How did you forward the message? Could you please provide the screenshot?

You could test to forward a normal message to Office 365 and check if the issue persists. In addition, you could relay in Office 365 directly.

How to set up a multifunction device or application to send email using Office 365 https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4

Jayce
  • 804
  • 5
  • 5
  • Yes it is hybrid deployment. Postfix send message with relay relayhost = smtp-smartrelay.somedomain.com. We have connector from local exchange to office 365, and created receive connector with ip of linux server in scope. Does postfix can have somewhere bad connfiguration and make mess with to and from look? example: From: "examplename1@" MIME-Version: 1.0 To: "examplename2@" correct address must be: From: "examplename1@domain.com" – amko77 Jan 11 '21 at 09:14
  • We have a problem only with that one smtp address from one server. Mail look ok when we get result with wireshark on local exchange, but maybe something in mail header from postfix make trouble for exchange... – amko77 Jan 11 '21 at 09:25
  • examplename1@domain.com - from postfix "examplename1@domain.com" - from other smtp servers Could be a problem due to the missing quotes in the mail? – amko77 Jan 11 '21 at 11:13
  • Did you mean that you have many servers relay via Exchange server, and only one server had this issue? – Jayce Jan 12 '21 at 09:38
  • I have more smtp notification from other windows and linux servers, and there is no problem. This problem is from one server with postfix configuration, but nobody now why is this heppen. My collegue say that everything is fine 100% on that server. Mail that we check with wireshark from server01(with postfix configuration) on local exchange look fine. Maybe something in header make this mess, I don't now what. – amko77 Jan 12 '21 at 09:45
  • You could use Pipeline Tracing to check if the message is changed in local exchange server. Is there any 3rd software between your local server and Office 365. As I mentioned, you could test to manually forward the message and check if the issue persists. – Jayce Jan 13 '21 at 09:11