• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Use PLESK/Postfix mailservice in combination with Office 365 - Problems sending mails to same domain (from local to office)

PieKnu

New Pleskian
Hello there!
I know there have been similar threads, but either are they dead or not solving my problem.

Use Case:
Until now we have used PLESK to manage our mails in the organization,
but as part of a startup program at microsoft, we got access to 10 licenses/users.
Sadly 10 users aren't enough for all our mails and Microsoft restricts the usage of mails in regards of bulk messaging.
That in combination with our automated system mails from our API, will sadly not work.
By that we're in need of a "Hybrid/Smarthost" solution.

What I have done so far:
is to set up CONNECTORS in the Exchange dashboard.

- One going from our system to Office 365
- One from Office 365 to our system.

As far as I can tell this is working great.
Incoming mails that aren't existing in Office 365 are forwarded to our system.

In the POSTFIX config (main.cf) I have added:
Code:
sender_dependent_relayhost_maps = hash:/etc/postfix/relay_by_sender
and the file "relay_by_sender.db" (created via postmap) contains:
Code:
[email protected] DUNNO
@example.com [ms.protection...]:25

In other words selected domains are relayed through Office 365, while no-reply isn't and therefor going out by our SMTP/Postfix.

So far so good. We're now able to send and receive mails on both Office 365 and our own services.

The only problem left is,
that I'm not able to send mails from a mail on my local server to one existing in Office 365. The other way around (from office to mine) is working fine.
I guess it's more or less because of the "virtual_mailbox_*".
I have read on some threads around on the internet, that they suggest to comment :
Code:
virtual_mailbox_domains = $virtual_mailbox_maps, hash:/var/spool/postfix/plesk/virtual_domains
virtual_alias_maps = $virtual_maps, hash:/var/spool/postfix/plesk/virtual
virtual_mailbox_maps = hash:/var/spool/postfix/plesk/vmailbox

commenting these I was able to send from my local server to Office 365.
BUT... now it's no longer working from the outside to the local one.
Trying to send mails from outside to an email existing on the local server, gets now rejected with an error message:
Code:
postfix/smtpd[1658807]    NOQUEUE: reject: RCPT from mail-.outbound.protection.outlook.com554 5.7.1 <[email protected]>: Relay access denied;
The error mail I get from Microsoft contains:
Code:
    550 5.7.367 Remote server returned not permitted to relay -> 554 5.7.1 <[email protected]>: Relay access denied


Maybe someone here has a suggestion what &/or that I could try or perhaps who even was in the same situation and found a solution.
Already many thanks in advance to everyone commenting/responding

Regards
Pierre
 
I having exactly the same issue and it seems it is related to Plesk. I have several accounts that I need in Plesk besides those in Office 365.
Can Plesk support answer please?
 
Can Plesk support answer please?
Sure, support can answer if you submit a ticket to support.
To sign-in to support please go to https://support.plesk.com

If you experience login issues, please see this KB article:
https://support.plesk.com/hc/en-us/...rt-plesk-com-and-password-reset-does-not-work

If you bought your license from a reseller, your reseller should provide support for you. If the reseller does not provide support, here is an alternative:
https://support.plesk.com/hc/en-us/articles/12388090147095-How-to-get-support-directly-from-Plesk-
 
OK thanks. I have however managed to solve the issue by doing what this user describes here: Issue - Plesk with office 365

(Message #2)

Just have to create the same email accounts you have on 365 to plesk and forward them to the fallback domain of Office 365 (it is under domains in 365 admin page e.g. "yourdomain.omnimicrosoft.com").

After that all works fine and Plesk email accounts can send email to 365 accounts (and vice versa).
 
Back
Top