[Dovecot] How to see if sieve is active ?
Hi,
I think I activated sieve, but it's doing nothing. I know manage-sieve works so I made some rules. But they do nothing. I ran sieve-test, which seems to work, but does not move the mail I test. Is this how it works ? I thought the -e parameter just "tested" the rules and did nothing and my command was supposed to do the "real thing". I read there should be a log. I don't find this, how should I enable this ?
I just found that lda can have a separate log. I'll enable this and see.
I read the wiki-page different times, but I don't see what I'm doing wrong.
I attached some files. Sieve-test.txt is the command and output from sieve-test. Phpscript.sieve is the file .dovecot.sieve points to, and dovecot-config is my dovecot config ;-).
Thanks for any pointers.
Regards,
Koenraad Lelong.
# 1.2.5: /etc/dovecot/dovecot.conf # OS: Linux 2.6.22.19-0.4-default x86_64 openSUSE 10.3 (X86-64) base_dir: /var/run/dovecot/ log_path: /var/log/dovecot log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps managesieve listen(default): *:143 listen(imap): *:143 listen(managesieve): * ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(managesieve): ssl_ca_file: /etc/postfix/certificate/cacert.org.pem ssl_cert_file: /etc/postfix/certificate/mailbox.pem ssl_key_file: /etc/postfix/certificate/mailboxkey.pem disable_plaintext_auth: no verbose_ssl: yes login_dir: /var/run/dovecot//login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login first_valid_uid: 499 last_valid_uid: 499 mail_location: maildir:/var/vmail/%d/%u mail_debug: yes mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugin_dir(default): /usr/lib64/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib64/dovecot/modules/imap mail_plugin_dir(managesieve): /usr/lib64/dovecot/modules/managesieve managesieve_logout_format(default): bytes=%i/%o managesieve_logout_format(imap): bytes=%i/%o managesieve_logout_format(managesieve): bytes ( in=%i : out=%o ) lda: postmaster_address: postmaster@ace-electronics.be sendmail_path: /usr/lib/sendmail auth_socket_path: /var/run/dovecot/auth-master mail_plugins: sieve auth default: mechanisms: plain login user: nobody passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: vmail plugin: sieve: ~/.dovecot.sieve sieve_dir: ~/sieve
sieve-test .dovecot.sieve new/1256755771.V6806I4ec63M549667.lace3 Performed actions:
- store message in folder: Opensuse Implicit keep: (none) Info: final result: success
This script has been automatically generated by avelsieve
# (Sieve Mail Filters Plugin for Squirrelmail) # Warning: If you edit this manually, then the changes will not # be reflected in the users' front-end! #AVELSIEVE_VERSIONYTo0OntzOjU6Im1ham9yIjtpOjE7czo1OiJtaW5vciI7aTo5O3M6NzoicmVsZWFzZSI7aTo5O3M6Njoic3RyaW5nIjtzOjU6IjEuOS45Ijt9 #AVELSIEVE_CREATED1256640979 #AVELSIEVE_MODIFIED1256715146 require ["fileinto","envelope","reject","vacation","imap4flags","relational","comparator-i;ascii-numeric","regex","body","date"]; #START_SIEVE_RULEYTo2OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHlwZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjc6IlN1YmplY3QiO3M6OToibWF0Y2h0eXBlIjtzOjg6ImNvbnRhaW5zIjtzOjExOiJoZWFkZXJtYXRjaCI7czoxMDoiW29wZW5zdXNlXSI7fX1zOjQ6InR5cGUiO3M6MToiMSI7czo5OiJjb25kaXRpb24iO3M6MzoiYW5kIjtzOjY6ImFjdGlvbiI7czoxOiI1IjtzOjY6ImZvbGRlciI7czo4OiJPcGVuc3VzZSI7czo0OiJzdG9wIjtzOjI6Im9uIjt9END_SIEVE_RULE if header :contains "Subject" "[opensuse]" { fileinto "Opensuse"; stop; } #START_SIEVE_RULEYTo2OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHlwZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjc6IlN1YmplY3QiO3M6OToibWF0Y2h0eXBlIjtzOjg6ImNvbnRhaW5zIjtzOjExOiJoZWFkZXJtYXRjaCI7czo5OiJbRG92ZWNvdF0iO319czo0OiJ0eXBlIjtzOjE6IjEiO3M6OToiY29uZGl0aW9uIjtzOjM6ImFuZCI7czo2OiJhY3Rpb24iO3M6MToiNSI7czo2OiJmb2xkZXIiO3M6NzoiZG92ZWNvdCI7czo0OiJzdG9wIjtzOjI6Im9uIjt9END_SIEVE_RULE if header :contains "Subject" "[Dovecot]" { fileinto "dovecot"; stop; } #START_SIEVE_RULEYTo2OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHlwZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjc6IlN1YmplY3QiO3M6OToibWF0Y2h0eXBlIjtzOjg6ImNvbnRhaW5zIjtzOjExOiJoZWFkZXJtYXRjaCI7czoxNDoiW0JhY3VsYS11c2Vyc10iO319czo0OiJ0eXBlIjtzOjE6IjEiO3M6OToiY29uZGl0aW9uIjtzOjM6ImFuZCI7czo2OiJhY3Rpb24iO3M6MToiNSI7czo2OiJmb2xkZXIiO3M6NjoiQmFjdWxhIjtzOjQ6InN0b3AiO3M6Mjoib24iO30%3DEND_SIEVE_RULE if header :contains "Subject" "[Bacula-users]" { fileinto "Bacula"; stop; } #START_SIEVE_RULEYTo2OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHlwZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjc6IlN1YmplY3QiO3M6OToibWF0Y2h0eXBlIjtzOjg6ImNvbnRhaW5zIjtzOjExOiJoZWFkZXJtYXRjaCI7czoxMjoiW01haWEtdXNlcnNdIjt9fXM6NDoidHlwZSI7czoxOiIxIjtzOjk6ImNvbmRpdGlvbiI7czozOiJhbmQiO3M6NjoiYWN0aW9uIjtzOjE6IjUiO3M6NjoiZm9sZGVyIjtzOjQ6Ik1haWEiO3M6NDoic3RvcCI7czoyOiJvbiI7fQ%3D%3DEND_SIEVE_RULE if header :contains "Subject" "[Maia-users]" { fileinto "Maia"; stop; } #START_SIEVE_RULEYTo2OntzOjQ6ImNvbmQiO2E6MTp7aTowO2E6NTp7czo0OiJraW5kIjtzOjc6Im1lc3NhZ2UiO3M6NDoidHlwZSI7czo2OiJoZWFkZXIiO3M6NjoiaGVhZGVyIjtzOjc6IlN1YmplY3QiO3M6OToibWF0Y2h0eXBlIjtzOjg6ImNvbnRhaW5zIjtzOjExOiJoZWFkZXJtYXRjaCI7czo2OiJbdGVzdF0iO319czo0OiJ0eXBlIjtzOjE6IjEiO3M6OToiY29uZGl0aW9uIjtzOjM6ImFuZCI7czo2OiJhY3Rpb24iO3M6MToiNSI7czo2OiJmb2xkZXIiO3M6NzoiZG92ZWNvdCI7czo0OiJzdG9wIjtzOjI6Im9uIjt9END_SIEVE_RULE if header :contains "Subject" "[test]" { fileinto "dovecot"; stop; }
Am 29.10.2009 um 08:34 schrieb Koenraad Lelong:
I just found that lda can have a separate log. I'll enable this and
see.I read the wiki-page different times, but I don't see what I'm doing
wrong.
Hi,
put something in the LDA section like this to record the activities:
log_path = /var/log/dovecot-deliver.log
info_log_path = /var/log/dovecot-deliver.log
You can raise the logging level with 'mail_debug = yes'. It will then
dump more information related to sieve. What MTA are you using? If
Postfix, can you post that configuration as well including 'master.cf'?
It should have those in 'main.cf' for instance:
virtual_transport = dovecot dovecot_destination_recipient_limit = 1
...and the corresponding entries in 'master.cf'
Regards Thomas
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 29 Oct 2009, Thomas Leuxner wrote:
put something in the LDA section like this to record the activities:
log_path = /var/log/dovecot-deliver.log info_log_path = /var/log/dovecot-deliver.log
The user deliver runs as probably may not write to this location, for testing you should chown a+rw these files or use syslog.
BTW: Do you have the corresponding compiled binary of the Sieve script? .dovecot.sievec (note the 'c') or .dovecot.svbin, respectivly of your Sieve variant.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSumT+HWSIuGy1ktrAQLQQAf+LSA87Zuux2F60nazMHh4QQRkh39rb3Py GgySxC0PTI39tcieXZ1HpVYSJNk6xlCcAEygIWmZL2BEh9VEo19xBcwxQFAI6o+H dkQq5L4S3jdZUiLQMY1rkSVaBs+W9pSQ8/R+5Lz9AzkXPX3G6hLE8r8sG3m+0orQ iXBaGtL/qOLHpIA3Utk+kMb6ojEh9EbXO6WYq/n7aO/jK3IKUyNkrcjKKWBpey7T rrTMTYSwtPuLJSdmrIZrpN5pc6pN6BSNi1PzQVFhf9QjT/bZ9pxgqVJmZ2fuOc5i xmZkHsIip9YHjzFrHqAJ7/uswEGOY6F3mqV9TX93Bg9trnb3j6w/tg== =yxQ8 -----END PGP SIGNATURE-----
Steffen Kaiser schreef:
On Thu, 29 Oct 2009, Thomas Leuxner wrote:
put something in the LDA section like this to record the activities:
log_path = /var/log/dovecot-deliver.log info_log_path = /var/log/dovecot-deliver.log
The user deliver runs as probably may not write to this location, for testing you should chown a+rw these files or use syslog.
Hi,
This morning I enabled dovecot as virtual transport, and everything seemed OK, until I got complaints ;-). After investigation I found that when aliasses are mapped to multiple recipients I get following error :
Oct 30 09:25:19 lace3 postfix/pipe[19729]: 8A77E2D5B5B: to=<some.body@some.where.org>, relay=dovecot, delay=2390, delays=2390/0.04/0/0.01, dsn=4.3.5, status=deferred (mail system configuration error) Oct 30 09:25:19 lace3 postfix/pipe[19729]: warning: pipe flag `D' requires dovecot_destination_recipient_limit = 1
At the same time I made dovecot the virtual transport I did add : dovecot_destination_recipient_limit = 1
This is what I use in postfix's master.cf : dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d $(recipient)
Dovecot logfiles don't show anything. The errors are in the postfix log.
Any help ?
Regards,
Koenraad Lelong.
On 10/30/2009 6:25 AM, Charles Marcus wrote:
On 10/30/2009, Koenraad Lelong (dovecot@ace-electronics.be) wrote:
At the same time I made dovecot the virtual transport I did add : dovecot_destination_recipient_limit = 1
Postconf -n output?
Nevermind, I forgot postconf -n doesn't 'see' this parameter...
Charles Marcus schreef:
On 10/30/2009 6:25 AM, Charles Marcus wrote:
On 10/30/2009, Koenraad Lelong (dovecot@ace-electronics.be) wrote:
At the same time I made dovecot the virtual transport I did add : dovecot_destination_recipient_limit = 1 Postconf -n output?
Nevermind, I forgot postconf -n doesn't 'see' this parameter...
Hi Charles,
Included is the full main.cf. Don't forget I reverted back to virtual transport until I know what's wrong with the dovecot transport.
Regards,
Koenraad Lelong.
command_directory = /usr/sbin daemon_directory = /usr/lib/postfix myhostname = mailbox.ace-electronics.be mydomain = ace-electronics.be local_recipient_maps = unknown_local_recipient_reject_code = 550 mynetworks = 192.168.0.0/20, 127.0.0.0/8 relayhost = out.telenet.be home_mailbox = Maildir/ header_checks = pcre:/etc/postfix/maps/header_checks.short nested_header_checks = debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = maildrop html_directory = /usr/share/doc/packages/postfix/html manpage_directory = /usr/share/man sample_directory = /usr/share/doc/packages/postfix/samples readme_directory = /usr/share/doc/packages/postfix/README_FILES inet_protocols = all biff = no mail_spool_directory = /var/mail canonical_maps = hash:/etc/postfix/canonical relocated_maps = hash:/etc/postfix/relocated transport_maps = hash:/etc/postfix/transport virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf virtual_mailbox_limit = 10240000 virtual_gid_maps = static:97 virtual_mailbox_base = /net/mail virtual_transport = virtual dovecot_destination_recipient_limit = 1 virtual_uid_maps = static:499 virtual_minimum_uid = 499 sender_canonical_maps = hash:/etc/postfix/sender_canonical masquerade_exceptions = root masquerade_classes = envelope_sender, header_sender, header_recipient program_directory = /usr/lib/postfix masquerade_domains = mydestination = $myhostname, localhost.$mydomain defer_transports = disable_dns_lookups = no mailbox_command = mailbox_transport = strict_8bitmime = no disable_mime_output_conversion = no smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/spammers strict_rfc821_envelopes = no smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_rbl_client zen.spamhaus.org smtp_sasl_auth_enable = no alias_maps = hash:/etc/aliases mailbox_size_limit = 0 message_size_limit = 10240000 content_filter = smtp-amavis:[127.0.0.1]:10024 disable_vrfy_command = yes smtpd_sasl_auth_enable = yes smtpd_sasl_localdomain = broken_sasl_auth_clients = yes smtpd_use_tls = yes smtpd_tls_auth_only = yes smtpd_tls_key_file = /etc/postfix/certificate/mailboxkey.pem smtpd_tls_cert_file = /etc/postfix/certificate/mailbox.pem smtpd_tls_CAfile = /etc/postfix/certificate/cacert.org.pem smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom
participants (4)
-
Charles Marcus
-
Koenraad Lelong
-
Steffen Kaiser
-
Thomas Leuxner