Skip to content

Fix Microsoft 365 SMTP auth#5

Open
ca-leet wants to merge 1 commit intonromsdahl:mainfrom
ca-leet:fix-microsoft365-smtp-auth
Open

Fix Microsoft 365 SMTP auth#5
ca-leet wants to merge 1 commit intonromsdahl:mainfrom
ca-leet:fix-microsoft365-smtp-auth

Conversation

@ca-leet
Copy link

@ca-leet ca-leet commented Jan 9, 2026

  • added custom login auth
  • resolves '504 5.7.4 Unrecognized authentication type' error with Exchange Online
  • PlainAuth hostname validation incompatible with O365 cert names

- add custom login auth
- resolves '504 5.7.4 Unrecognized authentication type' error
- PlainAuth hostname validation incompatible with O365 cert names
@craig-morris
Copy link

Please I'm having this issue. What do I do?

go: downloading github.com/gobwas/pool v0.2.1
go: downloading github.com/gobwas/httphead v0.1.0
fork/exec /tmp/go-build3575759606/b001/exe/main: exec format error
make: *** [Makefile:2: test-darwin-arm64] Error 1

@nromsdahl nromsdahl requested a review from 0xZDH January 11, 2026 13:50
@ca-leet
Copy link
Author

ca-leet commented Jan 11, 2026

Please I'm having this issue. What do I do?

go: downloading github.com/gobwas/pool v0.2.1 go: downloading github.com/gobwas/httphead v0.1.0 fork/exec /tmp/go-build3575759606/b001/exe/main: exec format error make: *** [Makefile:2: test-darwin-arm64] Error 1

Please try cloning the repository using git and building with go:

  1. git clone https://github.com/ca-leet/squarephish2.git
  2. cd squarephish2
  3. go build -o squarephish ./cmd/squarephish/

@craig-morris
Copy link

Thanks @ca-leet Please how do I use the config.json file I seem to be having issues with binding. I am using a VPS machine.

@craig-morris
Copy link

FATA[2026-01-11 15:06:28] error starting dashboard: failed to start dashboard: listen tcp x.x.x.x bind: cannot assign requested address

Copy link
Collaborator

@0xZDH 0xZDH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind the PR looks good to me, but there are a few concerns that I would like to address prior to merging:

  1. The diff itself is quite noisy as a result of changing the formatting between tabs to spaces (likely due to a local editor). If you can update the PR to revert all of the format changes as seen in the diff, that would be awesome.

  2. While LoginAuth might resolve O365 issues, this solution completely removes the PlainAuth option. I would prefer to not remove one in favor of the other and it seems like there are several solutions where both authentication types are implemented via fallbacks (e.g. See the following gist comment as an example: https://gist.github.com/andelf/5118732?permalink_comment_id=4825669#gistcomment-4825669)

  3. The 'default' mechanism in the LoginAuth Next function returns the username, but perhaps - based on existing implementations - it might be better served to return nil and raise an error when an unknown response from the server is seen/being handled.

See the following GitHub Gists for reference:
https://gist.github.com/andelf/5118732
https://gist.github.com/homme/22b457eb054a07e7b2fb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants