I am trying to create some sieve scripts to filter my mailing lists and am wondering if sieve logs anywhere, and it so where? I don’t see anything in mail.log beyond lines like:
dovecot: lda(kremels@kreme.com)<39790><hNchChSkAV1umwAAIdGjjQ>: sieve: msgid=<267D5D71-D99C-4790-8706-C1A92BCC9F97@kreme.com>: stored mail into mailbox ‘INBOX'
Which doesn’t really tell me anything other than that the script failed.
-- If the #2 pencil is the most popular, why is it still #2?
Am 13.06.2019 um 03:25 schrieb @lbutlr via dovecot:
I am trying to create some sieve scripts to filter my mailing lists and am wondering if sieve logs anywhere, and it so where? I don’t see anything in mail.log beyond lines like:
dovecot: lda(kremels@kreme.com)<39790><hNchChSkAV1umwAAIdGjjQ>: sieve: msgid=<267D5D71-D99C-4790-8706-C1A92BCC9F97@kreme.com>: stored mail into mailbox ‘INBOX'
Which doesn’t really tell me anything other than that the script failed.
The users home directory should contain a log file named .dovecot.sieve.log.
-- Alex JOST
On 13 Jun 2019, at 3:25, @lbutlr via dovecot wrote:
I am trying to create some sieve scripts to filter my mailing lists and am wondering if sieve logs anywhere, and it so where? I don’t see anything in mail.log beyond lines like:
dovecot: lda(kremels@kreme.com)<39790><hNchChSkAV1umwAAIdGjjQ>: sieve: msgid=<267D5D71-D99C-4790-8706-C1A92BCC9F97@kreme.com>: stored mail into mailbox ‘INBOX'
Which doesn’t really tell me anything other than that the script failed.
Sieve logs are in users’s homes and can be configured with « sieve_user_log »:
« sieve_user_log = The path to the file where the user log file is written. If not configured, a default location is used. If the main user's personal Sieve (as configured with sieve=) is a file, the logfile is set to <filename>.log by default. If it is not a file, the default user log file is ~/.dovecot.sieve.log. »
More info at <https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration>
-- matt [at] lv223.org GPG key ID: 7D91A8CA
On 13 Jun2019, at 02:18, Matt Anton via dovecot <dovecot@dovecot.org> wrote:
Sieve logs are in users’s homes and can be configured with « sieve_user_log »:
« sieve_user_log = The path to the file where the user log file is written. If not configured, a default location is used. If the main user's personal Sieve (as configured with sieve=) is a file, the logfile is set to <filename>.log by default. If it is not a file, the default user log file is ~/.dovecot.sieve.log. »
More info at <https://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration>
The user is a virtual user with a home folder of /usr/local/virtual/user@domain.tld/ as defined in the sql file and a mail location of maildir:/usr/local/virtual/user@domain.tld/Maildir/
/usr/local/virtual/user@domain.tld/
├── .list_local.
├── .list_procmail > Left-over files for reference
├── .procmailrc. /
├── .sieve
│ ├── .active_sieve -> list.sieve
│ └── list.sieve
├── .sms_procmail > Also left for reference
└── Maildir
[ All the maildirs and files]
There is no log file. I will specify sieve_user_log = ~/sieve.log and see what happens.
This is the sieve script I am trying to run ((Which I found via googling)) followed by doveconf -n
list.sieve: require [ "regex", "variables", "fileinto", "envelope", "mailbox", "imap4flags" ];
split out using list-id
List-Id: Dovecot Mailing List <dovecot.dovecot.org>
if exists "list-id" { if header :regex "list-id" "<([a-z_0-9-]+)[.@]" { set :lower "listname" "${1}"; fileinto :create "${listname}"; } else { if header :regex "list-id" "^\\s*<?([a-z_0-9-]+)[.@]" { set :lower "listname" "${1}"; fileinto :create "${listname}"; } else { fileinto :create ".Lists"; #keep; } } stop;}
2.3.6 (7eab80676): /usr/local/etc/dovecot/dovecot.conf
Pigeonhole version 0.5.6 (92dc263a)
OS: FreeBSD 11.2-RELEASE-p10 i386
Hostname: mail.covisp.net
auth_debug = yes auth_debug_passwords = yes auth_failure_delay = 5 secs auth_mechanisms = PLAIN LOGIN default_client_limit = 4096 default_process_limit = 1024 default_vsz_limit = 768 M disable_plaintext_auth = no first_valid_uid = 89 imap_id_log = * lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_log_format_elements = user=<%u> %r %m %c mail_location = maildir:~/Maildir mail_max_userip_connections = 90 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes location = mailbox Archive { auto = subscribe special_use = \Archive } mailbox Drafts { special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } plugin { imapsieve_mailbox1_before = file:/usr/lib/dovecot/sieve/report-spam.sieve imapsieve_mailbox1_causes = COPY imapsieve_mailbox1_name = Junk imapsieve_mailbox2_before = file:/usr/lib/dovecot/sieve/report-ham.sieve imapsieve_mailbox2_causes = COPY imapsieve_mailbox2_from = Junk imapsieve_mailbox2_name = * imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve imapsieve_mailbox3_causes = COPY imapsieve_mailbox3_name = Archive quota_rule2 = .EXPUNGED:ignore sieve = file:~/.sieve;active=~/.active_sieve sieve_default = /usr/lib/dovecot/sieve/default.sieve sieve_default_name = spamassassin sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment sieve_pipe_bin_dir = /usr/lib/dovecot/sieve sieve_plugins = sieve_imapsieve sieve_extprograms } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { mode = 0666 } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 995 ssl = yes } } service stats { unix_listener stats-reader { group = dovecot mode = 0666 user = } unix_listener stats-writer { group = dovecot mode = 0666 user = } } ssl_cert = </usr/local/etc/dehydrated/certs/covisp.net/fullchain.pem ssl_dh = # hidden, use -P to show it ssl_key = # hidden, use -P to show it ssl_min_protocol = TLSv1.1 userdb { args = /usr/local/etc/dovecot/sql.conf default_fields = uid=vpopmail gid=vchkpw mail_location=maildir:/usr/local/virtual/%u/Maildir mail=maildir:/usr/local/virtual/%u/Maildir driver = sql } protocol imap { mail_plugins = " imap_sieve" } protocol lda { mail_plugins = " sieve" }
On 13 Jun 2019, at 13:40, @lbutlr via dovecot wrote:
The user is a virtual user with a home folder of /usr/local/virtual/user@domain.tld/ as defined in the sql file and a mail location of maildir:/usr/local/virtual/user@domain.tld/Maildir/
/usr/local/virtual/user@domain.tld/ ├── .list_local.
├── .list_procmail > Left-over files for reference ├── .procmailrc. / ├── .sieve │ ├── .active_sieve -> list.sieve │ └── list.sieve ├── .sms_procmail > Also left for reference └── Maildir [ All the maildirs and files]There is no log file. I will specify sieve_user_log = ~/sieve.log and see what happens.
Got too virtual users/domains but instead of LDA I’m delivering through LMTP, which logs everything related to mail deliveries (quota, sieve, etc.) to /var/log/dovecot_lmtp_debug.log by setting ‘info_log_path’ in dovecot’s conf whereas sieve scripts parsing errors are by default logged to user ~/.dovecot.sieve.log
-- matt [at] lv223.org GPG key ID: 7D91A8CA
Am 13.06.2019 um 13:40 schrieb @lbutlr via dovecot:
/usr/local/virtual/user@domain.tld/ ├── .list_local.
├── .list_procmail > Left-over files for reference ├── .procmailrc. / ├── .sieve │ ├── .active_sieve -> list.sieve │ └── list.sieve ├── .sms_procmail > Also left for reference └── Maildir
sieve = file:~/.sieve;active=~/.active_sieve
You specified '~/.active_sieve' as your active scripts location but the script is actually located at '~/.sieve/.active_sieve'.
-- Alex JOST
On 13 Jun2019, at 07:48, Alex JOST via dovecot <dovecot@dovecot.org> wrote:
You specified '~/.active_sieve' as your active scripts location but the script is actually located at '~/.sieve/.active_sieve’.
AAAAaarrrrrrrgh! <thump>
🤦♂️
-- And, while it was regarded as pretty good evidence of criminality to be living in a slum, for some reason owning a whole street of them merely got you invited to the very best social occasions.
participants (3)
-
@lbutlr
-
Alex JOST
-
Matt Anton