On 11.01.2018 13:56, CP wrote: > On 01/11/2018 12:18 PM, Aki Tuomi wrote: >> >> On 11.01.2018 12:09, CP wrote: >>> On 01/11/2018 11:49 AM, Aki Tuomi wrote: >>>> On 11.01.2018 11:45, CP wrote: >>>>> Hello list, >>>>> >>>>> I'm trying to setup sieve on a Debian 9 install with virtual users. >>>>> Perhaps I'm getting old, but I can't figure out why managesieve is >>>>> not working for virtual users. I have about 20 v users on this >>>>> machine >>>>> and only one has also a real unix account. The sieve rules work for >>>>> this >>>>> single unix account but not for any other account. >>>>> I have read tried various HOWTO's found on the net like this : >>>>> >>>>> https://forum.vestacp.com/viewtopic.php?t=11363 >>>>> >>>>> but nothing is working for my case, so something is wrong in my setup >>>>> and I >>>>> hope you guys might shed some light . >>>>> The setup is rather simple it's 20 v users with one public folder , I >>>>> have tried both >>>>> dovecot lda and lmtp . >>>>> >>>>> doveconf -n included >>>>> >>>>> Thanks in advance for any help >>>> Hi! >>>> >>>> Can you enable mail_debug=yes in dovecot config and see what Sieve >>>> says >>>> for those rules. Also can you provide sieve rules. The sieve rules in >>>> your config file are per-user rules, managesieved does not actually do >>>> sieve processing, but provides ability to manage sieve rules remotely. >>>> >>>> Aki >>> I have already done it but I can't really tell what I 'm supposed to >>> see in the log >>> >>> this is a line for a message without matching rule : >>> >>> Jan 09 23:07:48 lda(x...@xxxxxx.xxx): Info: sieve: >>> msgid=<849d7f91-fdd3-4c07-8039-9e00acfefd2e_2961dc3c-f238-4f72-ad8e-02b1c779e...@system5.de.local>: >>> >>> stored mail into mailbox 'INBOX' >>> >>> and this with a working rule: >>> >>> Jan 10 01:00:04 lda(x...@xxxxxx.xxx): Info: sieve: >>> msgid=<20180109230004.1bc1344...@xxx.xxxxx.xxx>: stored mail into >>> mailbox 'INBOX/Postfix' >>> >>> both are with lda delivery >>> >>> and with lmtp : >>> >>> Jan 11 01:00:04 lmtp(x...@xxxxxx.xxx): Info: QVkQD/SaVloKFQAAyyBr5g: >>> sieve: msgid=<20180110230003.d577a42...@xxx.xxxxxx.xxx>: stored mail >>> into mailbox 'INBOX/Postfix' >>> Jan 11 01:00:04 lmtp(5386): Info: Disconnect from local: Successful >>> quit >>> >>> >>> >>> The rule is pretty simple actually : >>> >>> require ["fileinto"]; >>> # rule:[Bad] >>> if header :is "subject" "Bad Filename Detected" >>> { >>> fileinto "INBOX/BAD"; >>> stop; >>> } >>> # rule:[postfix] >>> if allof (header :is "subject" "Postfix Dailly logcheck") >>> { >>> fileinto "INBOX/Postfix"; >>> stop; >>> } >>> >>> And this is a sample rule from a v user that doesn't work : >>> >>> require ["fileinto"]; >>> # rule:[1] >>> if header :is "from" "x...@xxxxxxx.com" >>> { >>> fileinto "INBOX/9 - 1"; >>> } >>> >>> The thing is I expected more verbosity from sieve . is there some >>> option to >>> to turn more verbose messages on ? >>> >>> >>> >>> >> I cannot see any Debug prefix messages there. >> >> Do you have syslog configured to log debug messages somewhere else? or >> do you need to set debug_log_path if you are not using syslog? >> >> Aki > > This is a fresh log , if you can make something out of it, it seems > that it loads the script alright and then I guess > there is something wrong with the rule itself ? > > > Jan 11 12:43:42 lmtp(u...@company.com): Debug: sieve: Pigeonhole > version 0.4.16 (fed8554) initializing > Jan 11 12:43:42 lmtp(u...@company.com): Debug: sieve: include: > sieve_global is not set; it is currently not possible to include > `:global' scripts. > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: file storage: Using active Sieve > script path: /home/vmail/company/user/.dovecot.sieve > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: file storage: Using script storage > path: /home/vmail/company/user/sieve > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: file storage: Relative path to sieve > storage in active link: sieve/ > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: file storage: Using Sieve script > path: /home/vmail/company/user/.dovecot.sieve > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: file script: Opened script > `roundcube' from `/home/vmail/company/user/.dovecot.sieve' > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: Using the following location for > user's Sieve script: /home/vmail/company/user/.dovecot.sieve > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: Opening script 1 of 1 from > `/home/vmail/company/user/.dovecot.sieve' > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: Loading script > /home/vmail/company/user/.dovecot.sieve > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: Script binary > /home/vmail/company/user/.dovecot.svbin successfully loaded > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: binary save: not saving binary > /home/vmail/company/user/.dovecot.svbin, because it is already stored > Jan 11 12:43:42 lmtp(u...@company.com): Debug: > SYrVAt4/V1rhUQAAyyBr5g:11: sieve: Executing script from > `/home/vmail/company/user/.dovecot.svbin' > > If I'm not asking too much is there a way to manually run the script > on the virtual users mailbox in order to check the rules > without waiting for a message to arrive ? > > Thanks anyway ! > George >
Yes, use 'sieve-test'. Aki