[GH-ISSUE #1878] 🐛 [Bug] Duplicate SMTP added on login #737

Open
opened 2026-02-25 21:35:48 +03:00 by kerem · 8 comments
Owner

Originally created by @PeopleInside on GitHub (Feb 18, 2026).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1878

Originally assigned to: @IrAlfred on GitHub.

🐛 Bug

I have setup two email account on Cypht

email1@domain.ext
email2@domain.ext

The first email email1@domain.ext I just made the log-in with IMAP credentials.
The second email address as been added on settings, servers, Add a new servers

So the final situation is that on servers page I have:
IMAP and JMAP Servers
email1@domain.ext
email2@domain.ext

SMTP Servers
email1@domain.ext
email2@domain.ext

but if I log-out and log-in again a duplicate SMTP is added.

Immediately after the login I see: Welcome to Cypht
You have 2 IMAP sources (and this is correct)
You have 3 SMTP sources (and this is wrong, a duplicate SMTP has been added)

Is true that now there are 3 SMTP but the third has not been added by me.
If I navigate to servers I can see now the third SMTP added.

Is the email1@domain.ext so is the account with one I login.
If I delete this third SMTP logout and re-log in the third SMTP is again re-created.

I dont know why this issue is present.
I'm in production, I'm using the 2fa extension that is active for email1@domain.ext and the recaptcha also active on login.

Version & Environment

2.6.0

OS: Ubuntu 24

Originally created by @PeopleInside on GitHub (Feb 18, 2026). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1878 Originally assigned to: @IrAlfred on GitHub. ## 🐛 Bug I have setup two email account on Cypht email1@domain.ext email2@domain.ext The first email email1@domain.ext I just made the log-in with IMAP credentials. The second email address as been added on settings, servers, Add a new servers So the final situation is that on servers page I have: **IMAP and JMAP Servers** email1@domain.ext email2@domain.ext **SMTP Servers** email1@domain.ext email2@domain.ext but if I log-out and log-in again a duplicate SMTP is added. Immediately after the login I see: Welcome to Cypht You have 2 IMAP sources (and this is correct) You have 3 SMTP sources (and this is wrong, a duplicate SMTP has been added) Is true that now there are 3 SMTP but the third has not been added by me. If I navigate to servers I can see now the third SMTP added. Is the email1@domain.ext so is the account with one I login. If I delete this third SMTP logout and re-log in the third SMTP is again re-created. I dont know why this issue is present. I'm in production, I'm using the 2fa extension that is active for email1@domain.ext and the recaptcha also active on login. ### Version & Environment <!-- Paste Git-Commit ID or Tag-Name here --> 2.6.0 <!-- Specify your OS and OS Version here if the issue is (most likely) platform dependent. --> OS: Ubuntu 24
Author
Owner

@PeopleInside commented on GitHub (Feb 18, 2026):

More info:

There is a strange SMTP info in the new "duplicate" SMTP.
I noticed that the "duplicate" SMTP has a strange port that is not 465 that is the port I use but the port 645 so a very strange port.

So in SMTP I have two line correctly with port 465 and the new added one on login 645.
If I delete this SMTP will be recreated on the next login.
If I keep where is no more "duplicate" is created but I have a wrong SMTP that I never add and the port 645 has no sense , the test fail for this SMTP.

<!-- gh-comment-id:3923645691 --> @PeopleInside commented on GitHub (Feb 18, 2026): More info: There is a strange SMTP info in the new "duplicate" SMTP. I noticed that the "duplicate" SMTP has a strange port that is not 465 that is the port I use but the port 645 so a very strange port. So in SMTP I have two line correctly with port 465 and the new added one on login 645. If I delete this SMTP will be recreated on the next login. If I keep where is no more "duplicate" is created but I have a wrong SMTP that I never add and the port 645 has no sense , the test fail for this SMTP.
Author
Owner

@PeopleInside commented on GitHub (Feb 18, 2026):

Looks like it's an error I made on the .env file.
I think a web interface that help user to install and use Cypht will be much better.
I'm checking if after the correction the issue is resolved then I will close this issue.
Sorry for this false positive. The .env file is not easy to configure manually also I'm experiencing other issues and bug that require me to install Crypht several times.

Also if I corrected the .env file the issue persist.
What I have to do to fix this?

I was put 645 port instead of 465 on the .env file SMTP and now to fix?
I corrected it, I also re-sent the production command on SSH but still have the same issue.

<!-- gh-comment-id:3923678967 --> @PeopleInside commented on GitHub (Feb 18, 2026): Looks like it's an error I made on the .env file. I think a web interface that help user to install and use Cypht will be much better. I'm checking if after the correction the issue is resolved then I will close this issue. Sorry for this false positive. The .env file is not easy to configure manually also I'm experiencing other issues and bug that require me to install Crypht several times. Also if I corrected the .env file the issue persist. What I have to do to fix this? I was put 645 port instead of 465 on the .env file SMTP and now to fix? I corrected it, I also re-sent the production command on SSH but still have the same issue.
Author
Owner

@PeopleInside commented on GitHub (Feb 18, 2026):

Well my report was maybe wrong but seems the only way to fix this issue is to remove the account settings saved in the user folder.
Doing this will made me loose: 2factor, all account settings and also all emails that I configured on this account.
Contacts, calendars, etc.

I can confirm removing this file and login again seems fixed the issue but I have again lost a lot of work.
You should avoid this.

I tried before tremove this file to remove manually the relative SMTP of the domain with the issue but this is regenerated again with errors duplicate on the login so the Cypht read the configuration maybe in the user file. Correct by using the web interface never help.

I keep this issue open because I fixed but I suppose Cypht has a little big issue here: no way for the user to correct an error done in the .env file and the risk to loose contacts, calendar and a lot of email configuration.

All SMTP accounts added on that account.

I will have to re-configure everything manually again.

<!-- gh-comment-id:3923760265 --> @PeopleInside commented on GitHub (Feb 18, 2026): Well my report was maybe wrong but seems the only way to fix this issue is to remove the account settings saved in the user folder. Doing this will made me loose: 2factor, all account settings and also all emails that I configured on this account. Contacts, calendars, etc. I can confirm removing this file and login again seems fixed the issue but I have again lost a lot of work. You should avoid this. I tried before tremove this file to remove manually the relative SMTP of the domain with the issue but this is regenerated again with errors duplicate on the login so the Cypht read the configuration maybe in the user file. Correct by using the web interface never help. I keep this issue open because I fixed but I suppose Cypht has a little big issue here: no way for the user to correct an error done in the .env file and the risk to loose contacts, calendar and a lot of email configuration. All SMTP accounts added on that account. I will have to re-configure everything manually again.
Author
Owner

@PeopleInside commented on GitHub (Feb 18, 2026):

I still have duplicate port 465.
Issue also on login because every time I need insert a password.
Cypht is a nice program but to many issue currently.

<!-- gh-comment-id:3923796382 --> @PeopleInside commented on GitHub (Feb 18, 2026): I still have duplicate port 465. Issue also on login because every time I need insert a password. Cypht is a nice program but to many issue currently.
Author
Owner

@IrAlfred commented on GitHub (Feb 20, 2026):

Hello @PeopleInside

Please feel free to join our monthly meeting. More details here: https://github.com/cypht-org/cypht/wiki/Monthly-Community-Meetings

<!-- gh-comment-id:3932321241 --> @IrAlfred commented on GitHub (Feb 20, 2026): Hello @PeopleInside Please feel free to join our monthly meeting. More details here: https://github.com/cypht-org/cypht/wiki/Monthly-Community-Meetings
Author
Owner

@IrAlfred commented on GitHub (Feb 20, 2026):

I still have duplicate port 465. Issue also on login because every time I need insert a password. Cypht is a nice program but to many issue currently.

I have been able to reproduce the duplicate of the default SMTP server configured in the .env file. I will work on the fix.

<!-- gh-comment-id:3937439257 --> @IrAlfred commented on GitHub (Feb 20, 2026): > I still have duplicate port 465. Issue also on login because every time I need insert a password. Cypht is a nice program but to many issue currently. I have been able to reproduce the duplicate of the default SMTP server configured in the .env file. I will work on the fix.
Author
Owner

@IrAlfred commented on GitHub (Feb 20, 2026):

Cypht has a little big issue here: no way for the user to correct an error done in the .env file and the risk to loose contacts, calendar and a lot of email configuration.

We will try to figure out how we can improve that!
Thank you @PeopleInside

<!-- gh-comment-id:3937448118 --> @IrAlfred commented on GitHub (Feb 20, 2026): > Cypht has a little big issue here: no way for the user to correct an error done in the .env file and the risk to loose contacts, calendar and a lot of email configuration. We will try to figure out how we can improve that! Thank you @PeopleInside
Author
Owner

@PeopleInside commented on GitHub (Feb 20, 2026):

There is another test I suggest to do: try to put a wrong SMTP port on .env file on a new setup.
Then login in Cypht.

Now suppose the user configure other 10 email address add 10 SMTP account.
You figure out the port is wrong and you fix on the .env file.

The web interface will continue to have the wrong SMTP port.
When you log out and log in again the SMTP wrong port will be added again even if you fixed in the .env file and even if you deleted fixed on the web interface.

This should not happen. 😐😊

<!-- gh-comment-id:3937647372 --> @PeopleInside commented on GitHub (Feb 20, 2026): There is another test I suggest to do: try to put a wrong SMTP port on .env file on a new setup. Then login in Cypht. Now suppose the user configure other 10 email address add 10 SMTP account. You figure out the port is wrong and you fix on the .env file. The web interface will continue to have the wrong SMTP port. When you log out and log in again the SMTP wrong port will be added again even if you fixed in the .env file and even if you deleted fixed on the web interface. This should not happen. 😐😊
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#737
No description provided.