[Dovecot] undoing a zlib test
I'm trying to undo a dovecot zlib test and uncompress 6 emails in my Junk mailbox. There are about 25 total in different mailboxes but I thought I'd first start with those in my Junk. I ran:
# dsync -v -u terry@dop.com -m Junk -o plugin/zlib_save= backup maildir:/path/to/temp/folder
which returned without error and backed up my Junk mailbox but didn't uncompress the 6 emails. Am I calling dsync incorrectly to uncompress? zlib is currently not loaded as a plugin.
Once I get them uncompressed is doveadm import the correct way to get them back into my Junk mailbox? Something like this?
# doveadm -v import -u terry@dop.com maildir:/path/to/temp/folder "" mailbox Junk SENTON 2013-12-06
Thanks, -Terry
# 2.2.9: /opt/local/etc/dovecot/dovecot.conf # OS: Darwin 11.4.2 x86_64 hfs auth_verbose = yes base_dir = /opt/local/var/run/dovecot/ default_internal_user = _dovecot default_login_user = _dovenull first_valid_uid = 102 last_valid_uid = 105 listen = * mail_gid = 102 mail_location = maildir:/Volumes/mail/vmail/%d/%u mail_uid = 102 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 Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /opt/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { antispam_backend = dspam antispam_debug_target = syslog antispam_dspam_args = --user;%u;--deliver=;--source=error;--signature=%%s antispam_dspam_binary = /opt/local/bin/dspamc antispam_dspam_notspam = --class=innocent antispam_dspam_result_header = X-DSPAM-Result antispam_dspam_spam = --class=spam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam_pattern_ignorecase = junk;spam;junk * antispam_trash_pattern_ignorecase = trash;deleted * mail_log_events = flag_change append delete undelete expunge copy sieve = ~/dovecot.sieve sieve_before = /Volumes/mail/vmail/%d/global/global.sieve sieve_dir = ~/sieve } protocols = imap pop3 lmtp sieve sendmail_path = /opt/local/sbin/sendmail service auth-worker { user = $default_internal_user } service auth { unix_listener /opt/local/var/spool/postfix/private/auth { group = _postfix mode = 0660 user = _postfix } unix_listener auth-userdb { mode = 0660 user = _vmail } } ssl_cert = </opt/local/etc/ssl/certs/dovecot.cert ssl_key = </opt/local/etc/ssl/private/dovecot.key userdb { args = /opt/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = " sieve" } protocol lda { mail_plugins = " sieve" postmaster_address = postmaster@dop.com } protocol imap { mail_max_userip_connections = 50 mail_plugins = " antispam" }
Terry Barnum digital OutPost http://www.dop.com
Am 10.12.2013 01:08, schrieb Terry Barnum:
I'm trying to undo a dovecot zlib test and uncompress 6 emails in my Junk mailbox. There are about 25 total in different mailboxes but I thought I'd first start with those in my Junk. I ran:
# dsync -v -u terry@dop.com -m Junk -o plugin/zlib_save= backup maildir:/path/to/temp/folder
which returned without error and backed up my Junk mailbox but didn't uncompress the 6 emails. Am I calling dsync incorrectly to uncompress? zlib is currently not loaded as a plugin.
as far i know, dove/dsync always looks at the conf, so to notice compressed mail the zlib plugin might have to be enabled ever , -o plugin/zlib_save= should be fine to decompress, please retest with zlib plugin enabled, testmails to decompress should be compressed by dovecot itself and not from elsewhere, that should work as my tests with 2.1.x, if it fails again it might be broken with 2.2.9
Once I get them uncompressed is doveadm import the correct way to get them back into my Junk mailbox? Something like this?
# doveadm -v import -u terry@dop.com maildir:/path/to/temp/folder "" mailbox Junk SENTON 2013-12-06
Thanks, -Terry
# 2.2.9: /opt/local/etc/dovecot/dovecot.conf # OS: Darwin 11.4.2 x86_64 hfs auth_verbose = yes base_dir = /opt/local/var/run/dovecot/ default_internal_user = _dovecot default_login_user = _dovenull first_valid_uid = 102 last_valid_uid = 105 listen = * mail_gid = 102 mail_location = maildir:/Volumes/mail/vmail/%d/%u mail_uid = 102 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 Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /opt/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { antispam_backend = dspam antispam_debug_target = syslog antispam_dspam_args = --user;%u;--deliver=;--source=error;--signature=%%s antispam_dspam_binary = /opt/local/bin/dspamc antispam_dspam_notspam = --class=innocent antispam_dspam_result_header = X-DSPAM-Result antispam_dspam_spam = --class=spam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam_pattern_ignorecase = junk;spam;junk * antispam_trash_pattern_ignorecase = trash;deleted * mail_log_events = flag_change append delete undelete expunge copy sieve = ~/dovecot.sieve sieve_before = /Volumes/mail/vmail/%d/global/global.sieve sieve_dir = ~/sieve } protocols = imap pop3 lmtp sieve sendmail_path = /opt/local/sbin/sendmail service auth-worker { user = $default_internal_user } service auth { unix_listener /opt/local/var/spool/postfix/private/auth { group = _postfix mode = 0660 user = _postfix } unix_listener auth-userdb { mode = 0660 user = _vmail } } ssl_cert = </opt/local/etc/ssl/certs/dovecot.cert ssl_key = </opt/local/etc/ssl/private/dovecot.key userdb { args = /opt/local/etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lmtp { mail_plugins = " sieve" } protocol lda { mail_plugins = " sieve" postmaster_address = postmaster@dop.com } protocol imap { mail_max_userip_connections = 50 mail_plugins = " antispam" }
Terry Barnum digital OutPost http://www.dop.com
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
On Dec 9, 2013, at 11:41 PM, Robert Schetterer <rs@sys4.de> wrote:
Am 10.12.2013 01:08, schrieb Terry Barnum:
I'm trying to undo a dovecot zlib test and uncompress 6 emails in my Junk mailbox. There are about 25 total in different mailboxes but I thought I'd first start with those in my Junk. I ran:
# dsync -v -u terry@dop.com -m Junk -o plugin/zlib_save= backup maildir:/path/to/temp/folder
which returned without error and backed up my Junk mailbox but didn't uncompress the 6 emails. Am I calling dsync incorrectly to uncompress? zlib is currently not loaded as a plugin.
as far i know, dove/dsync always looks at the conf, so to notice compressed mail the zlib plugin might have to be enabled ever , -o plugin/zlib_save= should be fine to decompress, please retest with zlib plugin enabled, testmails to decompress should be compressed by dovecot itself and not from elsewhere, that should work as my tests with 2.1.x, if it fails again it might be broken with 2.2.9
Thank you Robert, you were correct. I temporarily enabled zlib and ran dsync with verbose output. I think I could've also just added -o mail_plugins=zlib but I didn't think of it until later.
# dsync -v -u terry@dop.com -m MyMailbox -o plugin/zlib_save= backup maildir:/path/to/temp/folder
dsync(terry@dop.com): Error: Cached message size smaller than expected (4236 < 8192) dsync(terry@dop.com): Error: Maildir filename has wrong S value, renamed the file from .../terry/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=4236:2,S to .../terry/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=4236:2,S dsync(terry@dop.com): Error: Corrupted index cache file .../terry/.MyMailbox/dovecot.index.cache: Broken physical size for mail UID 37695
These 3 lines are repeated again. Why does dsync rename the file to the same name?
I was able to import the now uncompressed email back into dovecot:
# doveadm -v import -u terry@dop.com maildir:/path/to/temp/folder "" mailbox MyMailbox SENTON 2013-12-05
doveadm(terry@dop.com): Error: Cached message size smaller than expected (4236 < 8192) doveadm(terry@dop.com): Error: Maildir filename has wrong S value, renamed the file from /path/to/temp/folder/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=4236:2,S to /path/to/temp/folder/.MyMailbox/cur/1386272980.M20857P20282.mailbox.dop.com,S=10267:2,S doveadm(terry@dop.com): Error: Corrupted index cache file /path/to/temp/folder/.MyMailbox/dovecot.index.cache: Broken physical size for mail UID 37695 doveadm(terry@dop.com): Error: Cached message size smaller than expected (4236 < 10267) doveadm(terry@dop.com): Error: Corrupted index cache file /path/to/temp/folder/.MyMailbox/dovecot.index.cache: Broken physical size for mail UID 37695
Hopefully this might help someone who ends up in the same situation.
-Terry
Terry Barnum digital OutPost http://www.dop.com
participants (2)
-
Robert Schetterer
-
Terry Barnum