cypht-org / cypht

Cypht: Lightweight Open Source webmail aggregator [PHP, JS]. Supports IMAP/SMTP, JMAP and soon EWS
http://cypht.org
GNU Lesser General Public License v2.1
995 stars 158 forks source link

Compose interface: unable to select sender #139

Closed jmce closed 7 years ago

jmce commented 8 years ago

Under the same configuration and test account in which I noticed my previously submitted issues, I had these problems with sender selection:

  1. With no additional IMAP & SMTP accesses defined (only the initial ones for the account), I specified info and saved it. Then, when trying to compose a message, the sender profile selector (below the message body field) had no options to select, and sending was refused. If I remember it correctly, this was not happening before I edited/saved profile info. After logging out and logging in again, the selector was again correctly showing the single available profile. Another user (in a different account) met the same problem, again solved by logging out/in.
  2. Later I added two additional IMAP server entries in my test account:

    • one for the same local server, for access to a different local account;
    • one for access to an account in a separate, remote, IMAP server.

    IMAP access to both seems OK, and I noticed that two additional profiles had been created. But, when trying to compose a new message, the sender selection list still has only one entry: the one for the base account. Unlike above, logging out doesn't fix this.

In that second case I added no SMTP servers, but my Postfix configuration would allow the 'base' logged-in user to use his default SMTP connection to send email as another local user. This should often not be the case, of course, but can be a reasonable configuration choice in tiny orgs and personal servers with multiple accounts. I haven't yet seen if having additional SMTP server entries in the cypht interface somehow helps to solve this sender selection issue (but the available interfaces suggest that one SMTP server entry may be used in more than one profile).

Version info:

cypht master.zip files from 2016-10-12 14:48:18 +0000 on Debian Jessie [8.6] with

jasonmunro commented 8 years ago

Thank you for the detailed report (and the other very well written issues)! Your feedback is greatly appreciated. I'm busy hosting family this weekend so I won't have a chance to really dig in just yet. I will do so for this, and the other issues you raised, as soon as I can (probably on Monday).

Your willingness to provide feedback helps make the project better, so thanks again for taking the time to do so!

jasonmunro commented 8 years ago

I don't like the way I implemented profiles. The code is ugly and obviously buggy. You also raise a valid point WRT identity restrictions or the lack thereof. We have also received a request to decouple profiles so a user with multiple local addresses in a catch-all account can properly manage their identities.

I'm going to see what I can do to clean things up. I will let you know when I have something worth testing.

jasonmunro commented 8 years ago

With no additional IMAP & SMTP accesses defined (only the initial ones for the account), I specified info and saved it. Then, when trying to compose a message, the sender profile selector (below the message body field) had no options to select, and sending was refused. If I remember it correctly, this was not happening before I edited/saved profile info. After logging out and logging in again, the selector was again correctly showing the single available profile. Another user (in a different account) met the same problem, again solved by logging out/in.

Confirmed this bug. It's actually a problem with the SMTP module set. I should have a fix for this today or tomorrow.

jasonmunro commented 8 years ago

Issue number 1 should be resolved now. When saving data between logins, we strip out default servers. There is no reason to save those since they are repopulated at login. The bug was we were not restoring them for the current session (save but no logout). I added code to do so and it seems to resolve this.

Issue number 2 and your other observations will require more thought :) The code should be restricting one SMTP server to one profile, and as you noticed profiles are available for any IMAP or POP3 account you have. I'm not sure if this is the right way to organize this, so I'm rethinking these relationships. Any suggestions are welcome!

jmce commented 8 years ago

Thank you for cypht, and for such a kind & prompt response on these issues. :)

I have a few notes on interfaces & configuration, maybe including suggestions on what would be nice to have (as an user) re profiles/servers/accounts — been busy with other work, but I hope to be able to submit those here tomorrow (and to resume testing).

dumblob commented 8 years ago

Issue number 2 and your other observations will require more thought :) The code should be restricting one SMTP server to one profile, and as you noticed profiles are available for any IMAP or POP3 account you have. I'm not sure if this is the right way to organize this, so I'm rethinking these relationships. Any suggestions are welcome!

I'm not sure if I understand the question well enough. Are you asking about the main shortcomings and benefits of using either of the following?

  1. One Cypht account having one and only one IMAP/POP3 server and one and only one SMTP server.
  2. One Cypht account having more than one IMAP/POP3 server and more than one SMTP servers.
jasonmunro commented 7 years ago

Found and fixed another bug with profiles and smtp servers, so just a heads up to pull the latest on this. I'm still pondering how I want to redesign profiles. Seems to be a pain point for a lot of new users.