3CX on AWS / E-Mail settings - custom smtp server

fabs

Customer
Joined
Aug 18, 2021
Messages
53
Reaction score
10
Hello all,

I recently switched our 3CX V20 instance from onpremise to AWS. Everything works except for my email settings.
With my onpremise version I used as external e-mail server our microsoft 365 exchange (*********.mail.protection.outlook.com) as SMTP relay, where I whitelist our WAN IP. In this case I was able to send without an user login via port 25.
Unfortunately, this does not work with the 3CX V20 instance on AWS. The IP address of the 3CX AWS instance is already whistlisted in the Microsoft 365 Exchange SMTP relay but when I test the connection I've got the error "Make sure that port 25 TCP is open for outgoing data traffic.". Same when I select "SSL/TLS" . "Make sure that port 587 TCP is open for outgoing data traffic."
On my AWS instance there are no restrictions on the outgoing ports.
Is there a logfile of the SMTP client in the 3CX instance where I could look where the error could be?

Thanks
 
Last edited:
If you wanna use the Office365 email sending, use the M365 integration so the email can be sent via API instead. SMTP is not recommended and blocked by default on O365.
 
If you wanna use the Office365 email sending, use the M365 integration so the email can be sent via API instead. SMTP is not recommended and blocked by default on O365.
Yes, but for this I need a user with at least an “Exchange Online” license. I do not want to do this via a user e-mail address.

As I said, with my onpremise instance this worked via the Exchange SMTP relay as a connector. I had used a specific email address to clearly identify that the email came from the 3CX instance.
 
Yes, but for this I need a user with at least an “Exchange Online” license. I do not want to do this via a user e-mail address.

As I said, with my onpremise instance this worked via the Exchange SMTP relay as a connector. I had used a specific email address to clearly identify that the email came from the 3CX instance.
Did you set the spf record to include the new ip?
 
Yes, but for this I need a user with at least an “Exchange Online” license. I do not want to do this via a user e-mail address.

As I said, with my onpremise instance this worked via the Exchange SMTP relay as a connector. I had used a specific email address to clearly identify that the email came from the 3CX instance.
Use a shared mailbox, use that to send from. No need for license. That's what we do, and it keeps a copy of everything sent in the mailbox too.
 
  • Like
Reactions: Evolute IT
Just for posterity, MS has a detailed doc on setting up email relaying:
https://learn.microsoft.com/en-us/e...-send-email-using-microsoft-365-or-office-365

They have updated it over the years, and recently. Note SMTP AUTH "is scheduled for deprecation in September 2025."

SMTP Relay/a Connector is probably what OP meant, and is pretty easy to set up. Direct Send works to send to your own domain but can't relay out.

A port 25 block is probably required on a large automated system like AWS otherwise spammers would sign up and send a million emails then disappear. I suppose that's an advantage of hosting at 3CX, or someone smaller (like us).

If AWS won't unblock port 25, maybe a workaround would be to connect out to a different server for SMTP relay, on an alternate port (not 25). Looks like 3CX will allow a :port on the Mail Server line, though I didn't test it. Of course that requires some other server listening on the nonstandard port. One could set up a couple of hoops to jump through, like NAT with a source of the AWS server IP to your_office:26 which forwards to lan_mail_server:25, and that relays out to M365.
 

Latest Posts

Forum statistics

Threads
111,964
Messages
590,001
Members
164,869
Latest member
hpgitsupport