LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   exim4 smtp server setup for Office365? (https://www.linuxquestions.org/questions/linux-networking-3/exim4-smtp-server-setup-for-office365-4175710346/)

guthrie 04-02-2022 10:53 PM

exim4 smtp server setup for Office365?
 
I have a Debian linux machine that was setup to use a local SMTP server, which has now been retired.

So I need to find a new server - and I think I have options of: {office365.com, something.google, something.goDaddy}.

Since I use Outlook on all other devices, I am first trying the MSoft option.

I ran dpkg-reconfigure exim4-config, and set the first option to Internet, and the rest to some recommended ans basic default values.

I then edited the /etc/update-exim4.conf file to set:
dc_smarthost='smtp.office365.com'
I had read to set port to 587, but don't see any option for that, so I also tried:
dc_smarthost='smtp.office365.com::587'

I then also edited the passwd.client file to:

smtp.office365.com:myID:myPassword

I ran update-exim4.conf, and then checked "service exim4 status".
It seems to be running.

But trying to send mail, fails, and I get this (below).

I don't understand why google is apparently being used, or why the "unreachable" (I can ping google.com).
I do have a gmail account, but don't think that should be relevant here.

Any hints on what is wrong here, and/or a better way to do this?

------------------------------------------------------
2022-04-02 22:45:57 1narBd-000T1b-HW <= root@localhost U=root P=local S=350
2022-04-02 22:45:57 1narBd-000T1b-HW H=aspmx.l.google.com [2607:f8b0:4001:c18::1a] Network is unreachable
2022-04-02 22:45:58 1narBd-000T1b-HW ** guthrie@miu.edu R=dnslookup T=remote_smtp H=aspmx.l.google.com [172.253.115.27] X=TLS1.2:ECDHE_ECDSA_CHACHA20_POLY1305:256 CV=yes DN="CN=mx.google.com": SMTP error from remote mail server after RCPT TO:<guthrie@miu.edu>: 550-5.2.1 The email account that you tried to reach is disabled. Learn more at\n550 5.2.1 https://support.google.com/mail/?p=DisabledUser n69-20020a37a448000000b0067e4be2396esi2068101qke.435 - gsmtp
2022-04-02 22:45:58 1narBe-000T1f-Ew <= <> R=1narBd-000T1b-HW U=Debian-exim P=local S=2077
2022-04-02 22:45:58 1narBd-000T1b-HW Completed
2022-04-02 22:45:58 1narBe-000T1f-Ew => net <root@localhost> R=local_user T=mail_spool
2022-04-02 22:45:58 1narBe-000T1f-Ew Completed

guthrie 04-02-2022 11:14 PM

I did also find this:

Requirements for SMTP Relay with Office 365
• The sending application must connect to the Office 365 servers on port 587
• The sending application must support TLS
• The sending application must authenticate with Office 365
• The account you authenticate to the relay server with must be the same account as the from the address on the messages you send through the relay.
… That would then mean that you need to create an Office 365 account for each of those devices

So if true, would mean that I could not send emails showing various tools or accounts or the actual local domain name of the system, but all would have to fake the same name, of the MSoft account.

Not feasible or practical.

Maybe I have to move to another approach?
What do others do for this?


All times are GMT -5. The time now is 02:20 AM.