Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override SMTP Credential plugin seems to work with one identity only #431

Closed
xmzl opened this issue Jun 7, 2022 · 5 comments
Closed

Override SMTP Credential plugin seems to work with one identity only #431

xmzl opened this issue Jun 7, 2022 · 5 comments

Comments

@xmzl
Copy link

xmzl commented Jun 7, 2022

The Override SMTP Credential plugin seems to work correctly with accounts that have one identity. However, with multi-identity accounts it always returns the error 'Authentication failed', whatever identity is used.
Debian 11, Linux 4.19.0-17-amd64 on x86_64

To Reproduce
Steps to reproduce the behavior:
Setup of sending via an external SMTP
Adding one or more identities to an account
Route all outgoing mail with the SMTP Override plugin

Expected behavior
Authentication failed message

@the-djmaze
Copy link
Owner

Depends how you've setup the Override users part.

@xmzl
Copy link
Author

xmzl commented Jun 7, 2022

If you mean the configuration in the Administrator panel, the one in the screenshot is the current configuration. I intentionally deleted SMTP User to take the screenshot. The exact same configuration worked in Rainloop

Schermata del 2022-06-07 15-58-52

the-djmaze pushed a commit that referenced this issue Jun 8, 2022
@the-djmaze
Copy link
Owner

the-djmaze commented Jun 8, 2022

With the above change you can log what is working and what fails.
However, since the log is DEBUG you must modify application.ini to enable logging and the log level at 7

@the-djmaze
Copy link
Owner

the-djmaze commented Aug 31, 2022

Looking at your log the important part is:

[2022-06-09 10:18:38.996][08ec5960] SMTP[NOTE]: Start connection to "ssl://authsmtp.securemail.pro:465"
[2022-06-09 10:18:39.075][08ec5960] SMTP[NOTE]: Connect (success)
[2022-06-09 10:18:39.116][08ec5960] SMTP[DATA]: > AUTH LOGIN\r\n
[2022-06-09 10:18:39.137][08ec5960] SMTP[DATA]: < 334 VXNlcm5hbWU6\r\n
[2022-06-09 10:18:39.137][08ec5960] SMTP[DATA]: > Base64String=\r\n 

Where the Base64String=\r\n is something like [email protected]
But the question is: which password is used for that username?
To find that out you must edit application.ini and set:

hide_passwords = Off

NOTE:

  • never post the log
  • only do this while testing
  • remove the log afterwards
  • set back to On

@the-djmaze
Copy link
Owner

Added a new plugin named "Login Override" for next v2.25.2
It has two mapping options: IMAP and SMTP

Each line in the field will be like [email protected]:user1:password1

  • [email protected] the currently used email address to login with
  • user1 when set it will be used for IMAP or SMTP login
  • password1 when set it will be used for IMAP or SMTP login

[email protected]::password1 will use the default login name
[email protected]:user1: will use the default login password

Why v2.25.2? Well i've modified the config options system to allow storing encrypted values.
As the mapping contains sensitive login credentials it will be stored encrypted.

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

No branches or pull requests

2 participants