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

Cannot use custom-login-mapping and override-smtp-credentials at the same time #233

Closed
mwt opened this issue Feb 14, 2022 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@mwt
Copy link

mwt commented Feb 14, 2022

Describe the bug
If you enable the custom-login-mapping and override-smtp-credentials plugins at the same time for the same user, then only custom-login-mapping will apply. That is, the client will attempt to login to the SMTP server defined under "Domains" with the username set in custom-login-mapping. All settings from override-smtp-credentials are ignored.

My use case for enabling both is that you have separate passwords for IMAP and SMTP because the two are on different servers. It is not always possible to set the two passwords to be the same (eg. app passwords with 2fa).

To Reproduce
Steps to reproduce the behavior:

  1. Install and enable both plugins and configure them such that both apply to the same user.
  2. Login to the user account that both apply to.
  3. Attempt to send an email.
  4. See error: "Authentication Failed".

Expected behavior
When both plugins are enabled on the same user, custom-login-mapping applies to IMAP only and override-smtp-credentials applies to SMTP only.

Desktop (please complete the following information):

  • Browser Firefox 97.0
  • SnappyMail Version tested on 2.12 and 2.12.1
@the-djmaze
Copy link
Owner

Correct, there is no priority rule to execute extensions in certain order.

Either merge both into a single extension or let me create a execution order system?

@mwt
Copy link
Author

mwt commented Feb 15, 2022

That makes sense. Maybe the best move would be to enhance custom-login-mapping with the ability to specify different usernames for IMAP/SMTP and provide an optional SMTP password.

@the-djmaze the-djmaze added the enhancement New feature or request label Mar 3, 2022
@the-djmaze
Copy link
Owner

the-djmaze commented Feb 1, 2023

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 used the default login name
[email protected]:user1: will used 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
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants