cypht-org / cypht

Cypht: Lightweight Open Source webmail aggregator [PHP, JS]
http://cypht.org
GNU Lesser General Public License v2.1
976 stars 153 forks source link

Sieve - can't make it work #1153

Open europacafe opened 1 month ago

europacafe commented 1 month ago

💬 Question

Mail server: stalwart + snappymail webmail ---> tls sieve work (mail.mydomain.com, ssl/tls, 4190) Cypht 2.1.0 + stalwart --> tls sieve setting does not work, can't save server config

When opening a mail content, it always reports "Sieve: invalid config host for ....my mailbox name.." cypht_sieve_invalid_config

On stalwart mail server, below is the sieve config stalwart_sieve_tls_config

On snappymail webmail, the sieive config works snappymail_sieve_config

On cypht env file, below is the config: cypht_sieve_env_config

When I tried to enable sieve on one of my IMAP accounts as below, after saving the config, the screen froze for over 10 secs and came back with an offline label and it didn't save. image I'm not sure what I did wrong. (I enable sieve on Settings/Site/Enable sieve filter)

josaphatim commented 1 month ago

@europacafe thank you for reporting this. What if you remove the protocol in sieve host input mail.brhofen.com:4190 ?

europacafe commented 1 month ago

I did try that too. Not working as well.

marclaporte commented 1 month ago

Please try Cypht master

europacafe commented 1 month ago

How? (with docker compose)

marclaporte commented 1 month ago

How? (with docker compose)

@jonocodes This is not yet coded, right?

marclaporte commented 1 month ago

Please try this: https://github.com/cypht-org/cypht/pull/1135/files (just manually modify the file)

Here is an known issue: https://github.com/cypht-org/cypht/issues/931

europacafe commented 1 month ago

just manually modified it to $server = Hm_IMAP_List::get($imap_server_id, true);, restarted cypht container, rechecked the change was still there same behavior for both tls://mail.mydomain.com:4190 and mail.mydomain.com:4190

Shadow243 commented 1 month ago

@europacafe have you checked that the server firewall gives access to 4190 on your server ?

you can use this command to check if sieve is enabled:

openssl s_client -connect mail.mydomain.com:4190 --starttls sieve
europacafe commented 1 month ago

I did open 4190 port on my pfSense. Here is the test result image

As mentioned earlier, my snappymail webmail can connect to sieve.

jonocodes commented 1 month ago

Yes, I would think you could use the docker compose setup to test this. Also check the cypht service logs to see if there are any errors.

europacafe commented 1 month ago

Yes, I would think you could use the docker compose setup to test this. Also check the cypht service logs to see if there are any errors.

My cypht is always running as a container, and the suggested openssl test was carried out inside cypht container.

europacafe commented 3 weeks ago

With docker image v2.2.0, this is still an issue

jonocodes commented 3 weeks ago

Do we know that this works as expected when not using docker (using php locally without any container)?

Shadow243 commented 3 weeks ago

Do we know that this works as expected when not using docker (using php locally without any container)?

Yes we were able to connect not using docker, I'm going to try this one with the same server that worked but using docker instead.