View Issue Details

IDProjectCategoryView StatusLast Update
0004919SOGosogo-toolpublic2020-05-05 14:53
ReporterJacek Assigned Tofrancis  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Version4.2.0 
Fixed in Version4.3.2 
Summary0004919: sogo-tool update-autoreply fails to retrieve IMAP delimiter and uses empty one
Description

Per Installation Guide we have the following crontab entry set up:
0 0 * sogo /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds

/etc/sogo/sieve.creds contains Dovecot master credentials, that may be used to login to sieve daemon as any user, but not as the master itself (only "master=yes" entry present per https://doc.dovecot.org/configuration_manual/authentication/master_users/).

Unfortunately SOGo tries to log in to IMAP as this user, which obviously fails. This failure to fetch IMAP delimiter causes generated Sieve rules not to contain delimiters at all!

Either SOGo should log in as master*user or just use/fallback to NGImap4ConnectionStringSeparator

If I was to guess, root cause is related to fix of https://sogo.nu/bugs/view.php?id=4846

Steps To Reproduce
  1. Setup Dovecot with master-only user for SOGo.
  2. Setup SOGo, including sieve.creds (SOGOMASTERUSER:SOGOMASTERPASSWORD here).
  3. As user SOMEUSER create some filtering rules which file mails into folders.
  4. Setup / disable vacation response.
  5. Run /usr/sbin/sogo-tool update-autoreply -p /etc/sogo/sieve.creds
  6. IMAP delimiter is not fetched and invalid sieve rules are generated.
Additional Information

2020-01-02 13:49:30.123 sogo-tool[4935] Checking user SOMEUSER
S[0x34cc7d0]: "IMPLEMENTATION" "Dovecot Pigeonhole"
S[0x34cc7d0]: "SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave editheader vnd.dovecot.duplicate vnd.dovecot.pipe vnd.dovecot.filter vnd.dovecot.execute"
S[0x34cc7d0]: "NOTIFY" "mailto"
S[0x34cc7d0]: "SASL" ""
S[0x34cc7d0]: "STARTTLS"
S[0x34cc7d0]: "VERSION" "1.0"
S[0x34cc7d0]: OK "Dovecot ready."
C: STARTTLS
S[0x34cc7d0]: OK "Begin TLS negotiation now."
<0x0x34cbff0[NGSieveClient]> TLS started successfully.
S[0x34cc7d0]: "IMPLEMENTATION" "Dovecot Pigeonhole"
S[0x34cc7d0]: "SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave editheader vnd.dovecot.duplicate vnd.dovecot.pipe vnd.dovecot.filter vnd.dovecot.execute"
S[0x34cc7d0]: "NOTIFY" "mailto"
S[0x34cc7d0]: "SASL" "PLAIN LOGIN"
S[0x34cc7d0]: "VERSION" "1.0"
S[0x34cc7d0]: OK "TLS negotiation successful."
C: AUTHENTICATE "PLAIN" {%d+}
LOGIN:PASSWORD

S[0x34cc7d0]: OK "Logged in."
C: LISTSCRIPTS
S[0x3504ae0]: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
C[0x34d6bb0]: 1 login "SOGOMASTERUSER" "SOGOMASTERPASSWORD"
S[0x3504ae0]: 1 NO [AUTHENTICATIONFAILED] Authentication failed.
C[0x34d6bb0]: 2 LIST "" ""
S[0x3504ae0]: 2 BAD Error in IMAP command received by server.
C: SETACTIVE ""
S[0x34cc7d0]: OK "Active script is now deactivated."
C: DELETESCRIPT "sogo"
S[0x34cc7d0]: OK "Deletescript completed."
C: PUTSCRIPT "sogo" {192+}
require ["fileinto"];
if allof (address :contains "from" "@atlassian.com") {
fileinto "INBOXAtlassian";
}
if allof (address :contains "from" "@amazon.com") {
fileinto "INBOXAmazon";
}

S[0x34cc7d0]: OK "PUTSCRIPT completed."
C: SETACTIVE "sogo"
S[0x34cc7d0]: OK "Setactive completed."
2020-01-02 13:49:32.438 sogo-tool[4935] An error occured while removing auto-reply of user SOMEUSER

TagsNo tags attached.

Activities

Hy3n4

Hy3n4

2020-05-04 12:56

reporter   ~0014304

Hi,

I am experiencing exact same issue on SOGo 4.3.1 (4.3.0 before).

Any sign of cause or resolution?

Related Changesets

sogo: master 5da7903c

2020-05-05 10:48

francis


Details Diff
chore(tool): fallback to NGImap4ConnectionStringSeparator

When using a master user to update the Sieve scripts through sogo-tool,
we may not be able to detect the IMAP delimiter. Therefore, we must
fallback to the default NGImap4ConnectionStringSeparator.

Fixes 0004919
Affected Issues
0004919
mod - SoObjects/SOGo/SOGoSieveManager.m Diff File

Issue History

Date Modified Username Field Change
2020-01-02 15:37 Jacek New Issue
2020-05-04 12:56 Hy3n4 Note Added: 0014304
2020-05-05 14:53 francis Changeset attached => sogo master 5da7903c
2020-05-05 14:53 francis Assigned To => francis
2020-05-05 14:53 francis Resolution open => fixed
2020-05-05 14:53 francis Status new => resolved
2020-05-05 14:53 francis Fixed in Version => 4.3.2