Adding the ROUNDCUBEMAIL_USERNAME_DOMAIN env var #240
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added ROUNDCUBEMAIL_USERNAME_DOMAIN which sets the username_domain config option.
I think this could be useful for people whose mail domain isn't the same as the IMAP server hostname (which is really common).
For example, if the IMAP hostname is mail.example.com and someone tries to connect using only the username, roundcube will autocomplete with mail.example.com for the sender address (instead of example.com). In this case, the email address will be [email protected] instead of [email protected].
If the SMTP server only accepts emails owned by the account, the email will not be sent. It addresses issue #231, which suggests using the mail_domain config option. By the way, I tested the mail_domain option but it only works for new users, that's why I chose to use the username_domain config option.
It could also simplify the login process for people whose mail server only accepts emails as username.