I have been trying for many hours now to get email working on a fresh install of freepbx hoping to easily get email to work. I have a licensed user on my account I am trying to use for authentication. I have tried over a 100 tweeks to the settings and checked the logs. I generally either get a bounced message, or an authentication error. I am using the admin module for email and choosing the office 365 option.
It seems like this should be easy but after about 10 hours of failing to get it to work, I am hoping someone can point me in the right direction.
By default the Postfix installed on the FreePBX distro tries to send emails from non-existent domains IIRC (which is a big no-no) so what @waldrondigital is suggesting, to remap all of those to real addresses, definitely makes sense…
Considering SPF is meant to be validated by the server receiving the email and what the OP appears to want to do with office 365 servers is relaying it would be a misuse of those records IMHO…
Some decent replies in here to get someone started. But I get a bit frustrated in that there is no comprehensive guide to setting up FreePBX with Office 365. Regardless if you see the option in the Commercial Admin module. Yes, it gets you closer to getting it to work, but you still have to beat FreePBX/Centos with a stick to get it to work.
It’s just people don’t realize this is something they, at least currently, have to do that for office 365…
Microsoft servers are in their rights to to refuse to process emails with incorrect/unknown domains (or emall addresses which have not been given proper permissions, ie the “Send as”)…
(As mail admins say, their servers, their rules…)
Anyway, for unknown domains if office 365 didn’t block those they would most likely end up being blocked by the receiving servers.
(My MX for my domains and the ones I setup in the past certainly would…)
Honestly, as far as I am concerned, System Admin Pro should probably set up all these remappings by itself when you tell it you are relaying through office 365 servers (and maybe for other servers as well since it’s not actually acceptable anywhere to send mails from unknown domains) and give it the permission to do it…
On a dedicated system it’s not much of a problem for System Admin Pro to alter Postfix’s configuration in such a way but if that system does more than FreePBX/Asterisk duty then I would be hesitant to have this done automatically, it might corrupt an otherwise working setup…
Nice. I could seriously use a beginning to end how to guide. A definitive guide would have saved me, and I’m sure many others countless hours of frustration. I’ll be on the lookout for it.
It looks like my local system is trying to handle the email and never passes it on. I’m getting:
status=bounced (unknown user: “MyUserName”)
I am also not seeing “smtp.office365.com” anywhere is the logs.
It seems like when I set my hostname, origin, and domain to something like “freepbx.sagoma.local”, it at least tries to pass the email onto “smtp.office365.com”
This means that, by default, your system uses fake email addresses and identifies itself to other system (both in it’s HELO/EHLO greeting and headers) as something which doesn’t exist…
Definitely not something legit, which could have your emails blocked eventually by either Microsoft or another server to which you would like to relay…
Thats probably because I changed it to allow anonymous to it matches what you initially said it should be. It didn’t make any difference in the logs however.
Thanks for the time you are putting into helping me figure this out.
Ok… I fiddled with it a bunch more with office 365 connectors, powershell user settings, etc and I am getting nowhere. I’m ready to punt on Office365 email integration.
I have a static IP going into the office (and my home where I am setting this up) but no domain name associated with it. Do I want to create a domain name in GoDaddy for my IP, and use that domain name to set up the built in mail server in freepbx? Pro’s? Cons? Am I thinking straight? Are there other options that make more sense?
Edit out your domain but replace it with something like example.com (or at least something that looks like a real hostname, without spaces like what you replaced it earlier…)…
By thr way, does what you see in hash:/etc/postfix/sasl_passwd makes sense? It should be your credentials IIRC…