mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-26 13:36:02 +03:00
[GH-ISSUE #671] Can't view/edit/enable sieve filters #437
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#437
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @knightsg on GitHub (Feb 15, 2023).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/671
Originally assigned to: @Shadow243 on GitHub.
🐛 Bugreport
I enabled sieve in my imap server and also in Cypht with the modules[]=sievefilters config line. I've regenerated my config with config_gen.php but if I log into Cypht and go to the filters page, it's blank as shown below:
I've checked the imap servers settings page and there is no option to enable sieve filters:
In the cypht log there is the following when I access the imap server settings page:
My imap server (docker-mailserver with Dovecot) has managesieve enabled and port 4190 exposed to the container running Cypht.
Here is the modules section of my hm3.ini file:
Version & Environment
Rev:
07605067OS: Docker v23.0.0 running on Ubuntu 22.04.1 host, Cypht container running docker image php:8.2.2-fpm-alpine3.17
Steps to reproduce
@marclaporte commented on GitHub (Feb 17, 2023):
Related for when none of the servers offer Sieve (I am not saying this is your case)
https://github.com/jasonmunro/cypht/pull/673
@marclaporte commented on GitHub (Feb 19, 2023):
If you supply me a test account (send me info in private), I can assign a junior dev to investigate. You can find me in here: https://app.gitter.im/#/room/#cypht-org_community:gitter.im
@josaphatim commented on GitHub (Feb 22, 2023):
I was unaware of this error but I resolved it with this pull request https://github.com/jasonmunro/cypht/pull/675
@knightsg commented on GitHub (Feb 22, 2023):
Thank you for the fix. I can see the "Enable Sieve Filters" option in the Add New IMAP Server settings block. However, I added my IMAP connection via the hm3.ini file, with the imap_auth_name / imap_auth_server / imap_auth_port / imap_auth_tls options, and there is no option to edit that connection to enable the filters. It would be nice to have the ability to configure the enable sieve filters feature through the hm3.ini file as well.
@josaphatim commented on GitHub (Feb 23, 2023):
Thanks. This is the PR that fixes that: https://github.com/jasonmunro/cypht/pull/677
@marclaporte commented on GitHub (Feb 23, 2023):
@knightsg Please confirm all is good with latest code. Thanks!
@knightsg commented on GitHub (Feb 24, 2023):
@josaphatim @marclaporte Thank you, the update for the ini file is working. I left a note about the config option naming being wrong in the hm3.sample.ini file in the PR but after changing it in my hm3.ini the sieve config is listed in my imap server config.
However...unfortunately, I now get a totally blank page when I open the filter settings page. There is no PHP error log thrown in my FPM container console, just a generic backend server 500 error:
24/Feb/2023:02:43:20 +0000 "GET /index.php" 500.I can connect to the sieve port from my Cypht container:
@marclaporte commented on GitHub (Feb 24, 2023):
@knightsg FYI: https://github.com/jasonmunro/cypht/issues/679
@josaphatim commented on GitHub (Mar 20, 2023):
This is the fix for the issue https://github.com/jasonmunro/cypht/pull/691
@knightsg commented on GitHub (Mar 22, 2023):
@josaphatim I've updated to the latest master code and unfortunately I'm still getting the blank filters page. The screenshots below show the servers page with the IMAP server added (from hm3.ini) with the sieve server setting configured and the second shot shows the blank filters page:
https://imgur.com/iU6CBKA
https://imgur.com/N9NEiOW
There's still no useful log output, just the same generic
"GET /index.php" 500error.@marclaporte commented on GitHub (Mar 22, 2023):
ok, please join us here: https://app.gitter.im/#/room/#cypht-org_community:gitter.im
We need a dev with server access to debug.
@knightsg commented on GitHub (Mar 23, 2023):
@marclaporte @josaphatim Apologies, I finally worked out the issue here. I realised php logging wasn't properly enabled in my container (only fpm) which is why I couldn't see the actual server error. I've fixed that and discovered that the issue was that I needed to install PHP sockets module. I did that and it's working now.
Thanks again for your help 👍
@knightsg commented on GitHub (Apr 1, 2023):
Sorry guys, I have one more issue with this that may or may not be something that can be resolved from within Cypht. As I mentioned in my previous comment, I was able to get this working finally by fixing the issue on my end. However, the stack I was using to test was my local dev environment. When I tried to test the sieve filters on my production setup I found that I still get the blank filters page.
After some investigation I found that it's because I have dovecot configured to use SSL on my production setup. If that's enabled, then when Cypht tries to connect to the managesieve port on the mail server it fails because it uses plain authentication by default. If I disable SSL for my production stack then it works fine.
Do you have any suggestions for how I can resolve this?
Thanks!
@marclaporte commented on GitHub (Apr 2, 2023):
Interesting. We'll look into it. Is SSL vs non SSL a different port? (like mail servers do for IMAP)
@knightsg commented on GitHub (Apr 4, 2023):
No, it's the same port as far as I'm aware. I tested a basic connection to the port using telnet and this is the output for both SSL disabled and SSL enabled:
SSL Disabled:
SSL Enabled:
@marclaporte commented on GitHub (Apr 4, 2023):
ok, let's see what @josaphatim discovers
@marclaporte commented on GitHub (Apr 24, 2023):
@knightsg We need @josaphatim to have server access to debug.
https://github.com/jasonmunro/cypht/pull/701
@marclaporte commented on GitHub (Jun 15, 2023):
@knightsg ping :-)
@knightsg commented on GitHub (Jun 15, 2023):
Sorry, I've been pretty busy lately and forgot to follow up. I'll try and take another look in the next couple of days and see if I still need this open.
Jun 15, 2023, 11:31 by @.***:
@marclaporte commented on GitHub (Sep 11, 2023):
We need you @knightsg :-)
@knightsg commented on GitHub (Sep 12, 2023):
Ahh, sorry...I totally forgot to follow up on this (again). I have to set up my prod server again as I'm not actually using it yet (just been testing). I'll take a look at that later today and check in with you via the Element chat.
@marclaporte commented on GitHub (Nov 4, 2023):
@knightsg
@knightsg commented on GitHub (Nov 5, 2023):
Hi @marclaporte - not sure if you saw but I replied in the chat.
@marclaporte commented on GitHub (Nov 5, 2023):
Sorry I don't see anything in https://app.gitter.im/#/room/#cypht-org_community:gitter.im
@marclaporte commented on GitHub (Nov 6, 2023):
For the record, @knightsg @josaphatim and I are solving this in a private chat.
@josaphatim commented on GitHub (Nov 13, 2023):
@marclaporte, @knightsg for now we can pass scheme in the server address something like tls://my.server.com:4190. @kroky fixed here
github.com/cypht-org/php-sieve-manager@29a9b43963@knightsg commented on GitHub (Nov 16, 2023):
Hi @josaphatim, I already have that configured in my hm3.ini like below:
imap_auth_sieve_conf_host=tls://mail.mydomain.com:4190@marclaporte commented on GitHub (Nov 21, 2023):
Related: https://github.com/cypht-org/cypht-docker/pull/27
@marclaporte commented on GitHub (Mar 27, 2024):
@knightsg We now use environment variables instead of hm3.ini:
https://github.com/cypht-org/cypht/pull/823
Can you please review to see if the issue persists?
Thanks!
@knightsg commented on GitHub (Apr 3, 2024):
Hi Marc. I took a look and replaced my existing custom docker image with the prebuilt sailfrog/cypht-docker one, but now there's no sieve option available. I took a look at the list of options on the docker image page and it doesn't list anything there related to sieve. I tried anyway to add a CYPHT_IMAP_AUTH_SIEVE_CONFIG_HOST env var with the same setting I had before but it didn't resolve the issue.
On a side note, I'm note sure how to configure the prebuilt image to use SSL but I guess that's a topic for a new issue ticket.
@marclaporte commented on GitHub (Apr 3, 2024):
ok, for Docker related issues, we don't have expertise available at the moment. But we have plenty of PHP developers who are moving forward with general Cypht code
@knightsg commented on GitHub (Apr 5, 2024):
That's fair. I'll revert back to my previous setup but update it for the new env variables and see how that goes.
@marclaporte commented on GitHub (Apr 5, 2024):
The good, the bad and the ugly: We need a Docker expert to guide us!
@marclaporte commented on GitHub (May 6, 2024):
https://github.com/cypht-org/cypht/releases/tag/v2.0.0 has been released
And the next version of Cypht (2.0.1) will include
https://github.com/cypht-org/php-sieve-manager/pull/11
https://github.com/cypht-org/php-sieve-manager/pull/12
@marclaporte commented on GitHub (Sep 28, 2024):
@knightsg
Cypht 2.x is getting quite good:
https://github.com/cypht-org/cypht/releases/tag/v2.4.0
Cypht 1.4.x doesn't support PHP 8.x
https://github.com/cypht-org/cypht/wiki/Lifecycle
We now have a revamped and official Docker: https://hub.docker.com/r/cypht/cypht
@knightsg commented on GitHub (Sep 28, 2024):
Thanks for the update! I haven't had much time to spend working on my setup for a while but I've caught some of the comments in the chat and I'm keen to give the latest builds a try.
@knightsg commented on GitHub (Nov 19, 2024):
@marclaporte Thanks for the heads up, I've come back and had a play with the latest updates and things are looking good! Seems like there's been a lot of work going on so congrats on the team effort 👍
Also, I'm happy to report that after coming back to this and setting everything up from scratch again with the new Cypht docker container I was finally able to get the
managesieveconnection working. The config I ended up with is as follows in case it's useful:Initially I had
IMAP_AUTH_SIEVE_CONF_HOST=mailserver:4190(withouttlsprefixed) and I was getting the errormanagesieve-login: Login failed: SSL required for authentication: user=<>, method=PLAIN, rip=<redacted>, lip=<redacted>, session=<redacted>. Once I added thetls://it started working.I do have one small issue remaining however. When I try to add a filter with the action
Move email to mailboxand select one of my IMAP mail folders I get aServer Errorpopup and in the Cypht log it shows the following:The problem appears to be
Invalid type for parameter: mailbox. Expected Array in /usr/local/share/cypht/vendor/henrique-borba/php-sieve-manager/src/Filters/Actions/BaseFilterAction.php:28. Is that a legit issue with the code or something I can address at my end?Anyway, once again thanks for continuing to follow up on my now very old thread 🙂
@knightsg commented on GitHub (Dec 27, 2024):
Hi again - just wondering if this has been investigated at all, and whether there might be any fixes or workarounds I could try? For the record, my mailserver is docker-mailserver v2.4.0 (latest), which uses Dovecot as the IMAP server.
@marclaporte commented on GitHub (Dec 27, 2024):
@knightsg Thanks for the follow up
Please join us on https://gitter.im/cypht-org/community and get in touch with @Shadow243 to do a screenshare so he can troubleshoot with you.
Thanks!
@Shadow243 commented on GitHub (Dec 27, 2024):
@knightsg @marclaporte I'm trying to reproduce to see if it will be possible. but a screenshare would indeed be better
@Shadow243 commented on GitHub (Dec 27, 2024):
Thank you, @knightsg, for your patience. I confirm that the issue exists with version 2.4.0 and Docker. However, with the master version, the problem is already resolved: I can create a filter with the action "Move email to mailbox" without any error. The upcoming release will include a fix for this issue.
@knightsg commented on GitHub (Dec 28, 2024):
That's great, thank you for following up so quickly! I'll try and test out master to confirm for you.
@knightsg commented on GitHub (Feb 10, 2025):
Just to follow up, I finally got around to building and deploying a docker container from the master branch and can confirm this is working now. I can create a filter that moves messages to a mailbox without an error.
Thanks again!