Closed pidydx closed 3 years ago
I could add a new BC configuration flag that disables the full email check
@pidydx could you test the linked PR?
I'm working on being able to actually test it, but I'm not sure that change will work as intended. Doesn't mailwatch need to store the full email as the username for determining which emails belong to the user? I would expect that a user still needs to login with user@maildomain.tld and that the username needs to get checked as a valid email address, but then the config flag just changes what value gets used for the imap_open() call (user or user@maildomain.tld).
yes, you're right, I need to strip the domain part of the email and pass only the local-part (or IMAP username)
should be working as expected now
@pidydx did you test this PR?
Unfortunately I'm not really able to since I had to reconfigure to get around the problem.
Issue summary
MailWatch configured for IMAP authentication does not work with an IMAP server that does not use the full email address as the login.
Steps to reproduce
Expected result
User should be logged in stripping the @maildomain.tld if necessary for IMAP authentication (automatically or configurable).
Actual result
Using only username: No attempted login - https://github.com/mailwatch/MailWatch/blob/1.2/mailscanner/functions.php#L3208
Using username@maildomain.tld: imap_open(): Couldn't open stream ...
Installation
Version and method