Re: Non-destructive deduplication

2017-06-10 Thread Aki Tuomi

> On June 10, 2017 at 10:30 PM Tristan Miller  
> wrote:
> 
> 
> Greetings.
> 
> I use Dovecot 2.2.29.1 as my IMAP server.  Owing to a bug in my mail
> client [1], several unique messages (mostly in my Sent folder) have
> duplicate Message-ID headers.  Dovecot itself doesn't seem to be
> bothered by this, though my mail client is confused by the false
> duplicates.  (It screws up the threading display, and results in data
> loss when I run the client's deduplication filter.)
> 
> I would like to change the Message-ID headers in the "duplicate" message
> files stored in my IMAP server so that they are unique.  I realize that
> this has disadvantages of its own, but I can't think of a better
> alternative.
> 
> So this leads me to two questions:
> 
> 1) Will Dovecot get confused if I simply open the message files in a
> text editor and manually change their Message-ID headers?  If so, how
> should I go about changing the Message-ID headers?
> 

Expunge the mails, then edit message-id's and import them back.

> 2) Does there exist any tool that will scan a maildir folder to find
> messages with duplicate Message-IDs, and automatically rewrite the
> Message-ID headers so that they are (probably) unique?  I could
> probably kludge together a quick shell script, but if someone's already
> gone to the trouble of writing such a tool and making it relatively
> robust, I'd rather use that instead.
> 

https://wiki2.dovecot.org/Tools/Doveadm/Deduplicate should let you expunge 
duplicate messages.

> Regards,
> Tristan
> 
> [1]
> http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3828
> 
> -- 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>   Tristan Miller
> Free Software developer, ferret herder, logologist
>  https://logological.org/
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Non-destructive deduplication

2017-06-10 Thread Tristan Miller
Greetings.

I use Dovecot 2.2.29.1 as my IMAP server.  Owing to a bug in my mail
client [1], several unique messages (mostly in my Sent folder) have
duplicate Message-ID headers.  Dovecot itself doesn't seem to be
bothered by this, though my mail client is confused by the false
duplicates.  (It screws up the threading display, and results in data
loss when I run the client's deduplication filter.)

I would like to change the Message-ID headers in the "duplicate" message
files stored in my IMAP server so that they are unique.  I realize that
this has disadvantages of its own, but I can't think of a better
alternative.

So this leads me to two questions:

1) Will Dovecot get confused if I simply open the message files in a
text editor and manually change their Message-ID headers?  If so, how
should I go about changing the Message-ID headers?

2) Does there exist any tool that will scan a maildir folder to find
messages with duplicate Message-IDs, and automatically rewrite the
Message-ID headers so that they are (probably) unique?  I could
probably kludge together a quick shell script, but if someone's already
gone to the trouble of writing such a tool and making it relatively
robust, I'd rather use that instead.

Regards,
Tristan

[1]
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3828

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Tristan Miller
Free Software developer, ferret herder, logologist
 https://logological.org/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


pgpjVvEwXAnmZ.pgp
Description: OpenPGP digital signature


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 17:40, Michael Felt wrote:


(And I am going to look up how to post to git (via a remote) to show 
you what I have modified to get this far.) 


See https://github.com/aixtools/dovecot/tree/AIX-port


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 17:26, Michael Felt wrote:

On 10/06/2017 17:23, Michael Felt wrote:

On 10/06/2017 14:42, Michael Felt wrote:


Next chapter in packaging.(Not meant to be extensive, only what I 
run across and is easy to report)


So, now in an attempt to report on where I am at...

mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test]make 
-i >/dev/null
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 434.24: 
1506-007 (S) "struct option" is undefined.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 516.9: 1506-285 
(S) The indirection operator cannot be applied to a pointer to an 
incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 536.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 548.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.

make[4]: [doveadm-cmd.o] Error 1 (ignored)
xlc_r: 1501-228 (W) input file doveadm-cmd.o not found
make[4]: [doveadm] Error 252 (ignored)
xlc_r: 1501-228 (W) input file doveadm-cmd.o not found
make[4]: [doveadm-server] Error 252 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota.c", line 382.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota.c", line 383.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota.c", line 384.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota.c", line 385.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.

make[4]: [quota.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.37: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.62: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 126.18: 
1506-515 (S) Member designator cannot be applied to an object of type 
"const struct quota_param_parser[]".

make[4]: [quota-fs.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.37: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.66: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.91: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.

make[4]: [quota-dict.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 66.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 67.18: 
1506-515 (S) Member designator cannot be applied to an object of type 
"const struct quota_param_parser[]".

make[4]: [quota-imapc.lo] Error 1 (ignored)
libtool:   error: 'quota.lo' is not a valid libtool object
make[4]: [lib10_quota_plugin.la] Error 1 (ignored)
libtool:   error: 'quota.lo' is not a valid libtool object
make[4]: [quota-status] Error 1 (ignored)
make[4]: *** No rule to make target `../quota/lib10_quota_plugin.la', 
needed by `lib11_imap_quota_plugin.la'.  Stop.

make[3]: [all-recursive] Error 1 (ignored)
mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test]

I am hoping the changes needed are "simple" - and I would rather bow to 
the expert rather than make things unduly messy.


Regards,

Michael

(And I am going to look up how to post to git (via a remote) to show you 
what I have modified to get this far.)


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 17:23, Michael Felt wrote:

On 10/06/2017 14:42, Michael Felt wrote:


Next chapter in packaging.(Not meant to be extensive, only what I run 
across and is easy to report)


c)

  378 | int quota_root_default_init(struct quota_root *root, const 
char *args,

  379 | const char **error_r)
  380 | {
  381 | const struct quota_param_parser default_params[] = {
  382 | quota_param_hidden,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 382.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.

  383 | quota_param_ignoreunlimited,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 383.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowe

d.
  384 | quota_param_noenforcing,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 384.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.

  385 | quota_param_ns,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 385.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowe

d.
  386 | {.param_name = NULL}
  386 + {.param_name = 0}
  387 | };
  388 | return quota_parse_parameters(root, &args, 
error_r, default_params, FALSE);
  388 + return quota_parse_parameters(root, &args, 
error_r, default_params, 0);

  389 | }


More on this (the redirect to /dev/null is to remove all the verbosity)

mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test/src/plugins/quota]make 
-i >/dev/null
"../../../../src/x071-test/src/plugins/quota/quota.c", line 382.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota.c", line 383.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota.c", line 384.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota.c", line 385.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.

make: [quota.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.37: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 125.62: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-fs.c", line 126.18: 
1506-515 (S) Member designator cannot be applied to an object of type 
"const struct quota_param_parser[]".

make: [quota-fs.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.37: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.66: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-dict.c", line 47.91: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowed.

make: [quota-dict.lo] Error 1 (ignored)
"../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 66.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.
"../../../../src/x071-test/src/plugins/quota/quota-imapc.c", line 67.18: 
1506-515 (S) Member designator cannot be applied to an object of type 
"const struct quota_param_parser[]".

make: [quota-imapc.lo] Error 1 (ignored)
libtool:   error: 'quota.lo' is not a valid libtool object
make: [lib10_quota_plugin.la] Error 1 (ignored)
libtool:   error: 'quota.lo' is not a valid libtool object
make: [quota-status] Error 1 (ignored)
mich...@x071.home.local:[/data/prj/aixtools/github/dovecot/x071-test/src/plugins/q

Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 10/06/2017 14:42, Michael Felt wrote:


Next chapter in packaging.(Not meant to be extensive, only what I run 
across and is easy to report)


c)

  378 | int quota_root_default_init(struct quota_root *root, const 
char *args,

  379 | const char **error_r)
  380 | {
  381 | const struct quota_param_parser default_params[] = {
  382 | quota_param_hidden,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 382.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.

  383 | quota_param_ignoreunlimited,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 383.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowe

d.
  384 | quota_param_noenforcing,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 384.17: 
1506-196 (S) Initialization between types "char* const" and "struct 
quota_param_parser" is not allowed.

  385 | quota_param_ns,
"../../../../src/x071-test/src/plugins/quota/quota.c", line 385.17: 
1506-196 (S) Initialization between types "void(* const)(struct 
quota_root*,const char*)" and "struct quota_param_parser" is not allowe

d.
  386 | {.param_name = NULL}
  386 + {.param_name = 0}
  387 | };
  388 | return quota_parse_parameters(root, &args, error_r, 
default_params, FALSE);
  388 + return quota_parse_parameters(root, &args, error_r, 
default_params, 0);

  389 | }


Re: Pacaging/build issues with AIX and vac (dovecot-2.2.25)

2017-06-10 Thread Michael Felt

On 09/10/2016 21:48, Michael Felt wrote:
I finally decided it was really time to stop being lazy and really 
move away from gmail. After I have a server in my basement using 
power, etc.


So I turned on the imap provided - and did not quite cry - it will 
have to do for now, but imap2 is wanting.


Next chapter in packaging.

a) I have 'patched' several files to get around the 'limitation' of the 
xlc parsing of Compound Literals.


b) a bit more difficult is to figure out how to not need GNU C Library 
getopt(). Currently stuck at:


xlc_r -DHAVE_CONFIG_H -I. -I../../../src/x071-test/src/doveadm -I../.. 
-I../../../src/x071-test/src/lib -I../../../src/x071-test/src/lib-test 
-I../../../src/x071-test/src/lib-settings 
-I../../../src/x071-test/src/lib-auth 
-I../../../src/x071-test/src/lib-compression 
-I../../../src/x071-test/src/lib-dict 
-I../../../src/x071-test/src/lib-fs 
-I../../../src/x071-test/src/lib-ssl-iostream 
-I../../../src/x071-test/src/lib-master 
-I../../../src/x071-test/src/lib-mail 
-I../../../src/x071-test/src/lib-imap 
-I../../../src/x071-test/src/lib-index 
-I../../../src/x071-test/src/lib-storage 
-I../../../src/x071-test/src/lib-imap-storage 
-I../../../src/x071-test/src/lib-http 
-I../../../src/x071-test/src/lib-dcrypt 
-I../../../src/x071-test/src/auth -DMODULEDIR=\""/opt/lib/dovecot"\" 
-DAUTH_MODULE_DIR=\""/opt/lib/dovecot/auth"\" 
-DDOVEADM_MODULEDIR=\""/opt/lib/dovecot/doveadm"\" 
-DPKG_RUNDIR=\""/var/x071-test/run/dovecot"\" 
-DPKG_STATEDIR=\""/var/x071-test/lib/dovecot"\" 
-DPKG_LIBEXECDIR=\""/opt/libexec/dovecot"\" -DBINDIR=\""/opt/bin"\" 
-DMANDIR=\""/usr/share/man"\" -I/opt/include  -I/opt/include -O2 
-qmaxmem=-1 -qarch=pwr5  -c -o doveadm-cmd.o 
../../../src/x071-test/src/doveadm/doveadm-cmd.c
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 434.24: 
1506-007 (S) "struct option" is undefined.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 516.9: 1506-285 
(S) The indirection operator cannot be applied to a pointer to an 
incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 536.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.
"../../../src/x071-test/src/doveadm/doveadm-cmd.c", line 548.37: 
1506-285 (S) The indirection operator cannot be applied to a pointer to 
an incomplete struct or union.

make[1]: *** [doveadm-cmd.o] Error 1

  +428  static void
  +429  doveadm_build_options(const struct doveadm_cmd_param par[],
  +430  string_t *shortopts,
  +431  ARRAY_TYPE(getopt_option_array) *longopts)
  +432  {
  +433  for(size_t i=0; par[i].name != NULL; i++) {
  +434  struct option longopt;
  +435
  +436  i_zero(&longopt);
  +437  longopt.name = par[i].name;
  +438  if (par[i].short_opt != '\0') {
  +439  longopt.val = par[i].short_opt;
  +440  str_append_c(shortopts, par[i].short_opt);
  +441  if (par[i].type != CMD_PARAM_BOOL)
  +442  str_append_c(shortopts, ':');
  +443  }
  +444  if (par[i].type != CMD_PARAM_BOOL)
  +445  longopt.has_arg = 1;
  +446  array_append(longopts, &longopt, 1);
  +447  }
  +448  array_append_zero(longopts);
  +449  }

  +505  int doveadm_cmd_run_ver2(int argc, const char *const argv[],
  +506   struct doveadm_cmd_context *cctx)
  +507  {
  +508  struct doveadm_cmd_param *param;
  +509  ARRAY_TYPE(doveadm_cmd_param_arr_t) pargv;
  +510  ARRAY_TYPE(getopt_option_array) opts;
  +511  unsigned int pargc;
  +512  int c,li;
  +513  pool_t pool = pool_datastack_create();
  +514  string_t *optbuf = str_new(pool, 64);
  +515
  +516  p_array_init(&opts, pool, 4);
  +517
  +518  // build parameters
  +519 doveadm_build_options(cctx->cmd->parameters, optbuf, &opts);

  +530  while((c = getopt_long(argc, (char*const*)argv, 
str_c(optbuf), array_idx(&opts, 0), &li)) > -1) {

  +531  switch(c) {
  +532  case 0:
  +533  for(unsigned int i = 0; i < 
array_count(&pargv); i++) {
  +534  const struct option *opt = 
array_idx(&opts,li);
  +535  param = 
array_idx_modifiable(&pargv,i);

  +536  if (opt->name == param->name)
  +537 doveadm_fill_param(param, optarg, pool);
  +538  }
  +539  break;
  +540  case '?':
  +541  case ':':
  +542 doveadm_cmd_params_clean(&pargv);
  +543  return -1;
  +544  default:
  +545  // hunt the option
  +546  for(unsigne

Re: Changing the name of a compressed file

2017-06-10 Thread Peter West
Ok, I added zlib to imap protocol.

protocol imap {
  …
  mail_plugins = $mail_plugins zlib
}

Now both imap and lmtp protocols have zlib plugin enabled, and both send and 
receive mail is compressed.

Peter

> On 10 Jun 2017, at 6:50 pm, Aki Tuomi  wrote:
> 
> Please check that you are not overwriting mail plugins for lmtp. Or post your 
> doveconf -n.
> 
> Aki
> 
>> On June 10, 2017 at 11:10 AM Peter West  wrote:
>> 
>> 
>> Not sure what you mean. I’m using lmtp to send messages to Dovecot from 
>> Postfix.
>> 
>>> On 10 Jun 2017, at 6:08 pm, Aki Tuomi  wrote:
>>> 
>>> What's your LDA?
>>> 
>>> Aki
>>> 
 On June 10, 2017 at 11:01 AM Peter West  wrote:
 
 
 Thanks for that Aki.
 
 Follow-up question.  I tried to initiate compression by adding
 
 mail_plugins = $mail_plugins zlib
 
 plugin {
   zlib_save_level = 6
   zlib_save = xz
 }
 
 
 to dovecot.conf.  I restarted dovecot and sent one message to the server, 
 and one message from the server.  Neither was compressed.  I changed the 
 save type to
 
   zlib_save = bz2
 
 and repeated. This time the message received (in 
 /var/vmail///cur) was not compressed, but the message in 
 /var/vmail///.Sent/cur was bzip2 compressed.
 
 Why is the received mail not being compressed?  Is this the point of the 
 discussion about compressing old mails?
 
 
> On 10 Jun 2017, at 4:43 pm, Aki Tuomi  wrote:
> 
> 
>> On June 10, 2017 at 5:58 AM Peter West  wrote:
>> 
>> 
>> Concerning Maildir, the wiki page on compression has this:
>> 
>> All mails must have ,S= in their filename where  contains 
>> the original uncompressed mail size, otherwise there will be problems 
>> with quota calculation as well as other potential random failures. Note 
>> that if the filename doesn’t contain the ,S= before compression, 
>> adding it afterwards changes the base filename and thus the message UID. 
>> The safest thing to do is simply to not compress such files.
>> 
>> Further down on the same page is this:
>> 
>> If the file does exist, rename() (mv) the compressed file over the 
>> original file.
>>  • Dovecot can now read the file, but to avoid compressing it again on 
>> the next run, you'll probably want to rename it again to include e.g. a 
>> "Z" flag in the file name to mark that it was compressed (e.g. 
>> 1223212411.M907959P17184.host,S=3271:2,SZ).
>> 
>> These comments seem to contradict each. Or is there a difference between 
>> adding the size specifier to the filename and adding a Z flag to the end 
>> of the file name?
>> 
>> --
>> Peter West
>> p...@pbw.id.au
>> And the great throng heard him gladly.
>> 
> 
> Keyword is 'base filename'. From the wiki, "The standard filename 
> definition is: ":2,".". Z is a flag.
> 
> Aki
 
>> 



signature.asc
Description: Message signed with OpenPGP


Re: Changing the name of a compressed file

2017-06-10 Thread Peter West
Well spotted.

In my first attempt, the configuration I originally posted was at the end of my 
dovecot.conf file, and I was not including the conf.d configuration files. 
Preceding that was my lmtp protocol cong.

protocol lmtp {
  postmaster_address = postmaster
  # Space separated list of plugins to load (default is global mail_plugins).
  mail_plugins = $mail_plugins sieve
}

 
 mail_plugins = $mail_plugins zlib
 
 plugin {
   zlib_save_level = 6
   zlib_save = xz
 }
 


The doveconf -n associated with this is as follows:

01  # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
02  # Pigeonhole version 0.4.13 (7b14904)
03  # OS: Linux 4.9.15-x86_64-linode81 x86_64 Ubuntu 16.04.2 LTS
04  auth_mechanisms = plain login
05  log_timestamp = "%Y-%m-%d %H:%M:%S "
06  mail_gid = vmail
07  mail_home = maildir:/var/vmail/%d/%n
08  mail_location = maildir:~/Maildir
09
10  mail_privileged_group = vmail
11  mail_uid = vmail
12  managesieve_notify_capability = mailto
13  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
14  namespace inbox {
15inbox = yes
16location =
17mailbox Archive {
18  auto = subscribe
19  special_use = \Archive
20}
21mailbox Drafts {
22  auto = subscribe
23  special_use = \Drafts
24}
25mailbox Sent {
26  auto = subscribe
27  special_use = \Sent
28}
29mailbox Spam {
30  auto = subscribe
31  special_use = \Junk
32}
33mailbox Trash {
34  auto = subscribe
35  special_use = \Trash
36}
37prefix =
38  }
39  passdb {
40args = /etc/dovecot/dovecot-sql.conf.ext
41driver = sql
42  }
43  plugin {
44sieve = ~/.dovecot.sieve
45sieve_dir = ~/sieve
46zlib_save = bz2
47zlib_save_level = 6
48  }
49  protocols = " imap lmtp sieve"
50  service auth {
51unix_listener /var/spool/postfix/private/dovecot-auth {
52  group = postfix
53  mode = 0660
54  user = postfix
55}
56user = root
57  }
58  service lmtp {
59unix_listener /var/spool/postfix/private/dovecot-lmtp {
60  group = postfix
61  mode = 0600
62  user = postfix
63}
64  }
65  ssl_ca = >>> mail_plugins = $mail_plugins zlib

The resulting doveconf -n is:

01  # 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
02  # Pigeonhole version 0.4.13 (7b14904)
03  # OS: Linux 4.9.15-x86_64-linode81 x86_64 Ubuntu 16.04.2 LTS
04  auth_mechanisms = plain login
05  log_timestamp = "%Y-%m-%d %H:%M:%S "
06  mail_gid = vmail
07  mail_home = maildir:/var/vmail/%d/%n
08  mail_location = maildir:~/Maildir
09  mail_plugins = " zlib"
10  mail_privileged_group = vmail
11  mail_uid = vmail
12  managesieve_notify_capability = mailto
13  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
14  namespace inbox {
15inbox = yes
16location =
17mailbox Archive {
18  auto = subscribe
19  special_use = \Archive
20}
21mailbox Drafts {
22  auto = subscribe
23  special_use = \Drafts
24}
25mailbox Sent {
26  auto = subscribe
27  special_use = \Sent
28}
29mailbox Spam {
30  auto = subscribe
31  special_use = \Junk
32}
33mailbox Trash {
34  auto = subscribe
35  special_use = \Trash
36}
37prefix =
38  }
39  passdb {
40args = /etc/dovecot/dovecot-sql.conf.ext
41driver = sql
42  }
43  plugin {
44sieve = ~/.dovecot.sieve
45sieve_dir = ~/sieve
46zlib_save = bz2
47zlib_save_level = 6
48  }
49  protocols = " imap lmtp sieve"
50  service auth {
51unix_listener /var/spool/postfix/private/dovecot-auth {
52  group = postfix
53  mode = 0660
54  user = postfix
55}
56user = root
57  }
58  service lmtp {
59unix_listener /var/spool/postfix/private/dovecot-lmtp {
60  group = postfix
61  mode = 0600
62  user = postfix
63}
64  }
65  ssl_ca = //cur are compressed;
sent messages in /var/vmail///.Sent/cur are not compressed.

I assume that I need both specifications.
--
Peter West
p...@pbw.id.au
And the great throng heard him gladly.


> On 10 Jun 2017, at 6:50 pm, Aki Tuomi  wrote:
> 
> Please check that you are not overwriting mail plugins for lmtp. O

Re: Changing the name of a compressed file

2017-06-10 Thread Aki Tuomi
Please check that you are not overwriting mail plugins for lmtp. Or post your 
doveconf -n.

Aki

> On June 10, 2017 at 11:10 AM Peter West  wrote:
> 
> 
> Not sure what you mean. I’m using lmtp to send messages to Dovecot from 
> Postfix.
> 
> > On 10 Jun 2017, at 6:08 pm, Aki Tuomi  wrote:
> > 
> > What's your LDA?
> > 
> > Aki
> > 
> >> On June 10, 2017 at 11:01 AM Peter West  wrote:
> >> 
> >> 
> >> Thanks for that Aki.
> >> 
> >> Follow-up question.  I tried to initiate compression by adding
> >> 
> >> mail_plugins = $mail_plugins zlib
> >> 
> >> plugin {
> >>zlib_save_level = 6
> >>zlib_save = xz
> >> }
> >> 
> >> 
> >> to dovecot.conf.  I restarted dovecot and sent one message to the server, 
> >> and one message from the server.  Neither was compressed.  I changed the 
> >> save type to
> >> 
> >>zlib_save = bz2
> >> 
> >> and repeated. This time the message received (in 
> >> /var/vmail///cur) was not compressed, but the message in 
> >> /var/vmail///.Sent/cur was bzip2 compressed.
> >> 
> >> Why is the received mail not being compressed?  Is this the point of the 
> >> discussion about compressing old mails?
> >> 
> >> 
> >>> On 10 Jun 2017, at 4:43 pm, Aki Tuomi  wrote:
> >>> 
> >>> 
>  On June 10, 2017 at 5:58 AM Peter West  wrote:
>  
>  
>  Concerning Maildir, the wiki page on compression has this:
>  
>  All mails must have ,S= in their filename where  contains 
>  the original uncompressed mail size, otherwise there will be problems 
>  with quota calculation as well as other potential random failures. Note 
>  that if the filename doesn’t contain the ,S= before compression, 
>  adding it afterwards changes the base filename and thus the message UID. 
>  The safest thing to do is simply to not compress such files.
>  
>  Further down on the same page is this:
>  
>  If the file does exist, rename() (mv) the compressed file over the 
>  original file.
>   • Dovecot can now read the file, but to avoid compressing it again on 
>  the next run, you'll probably want to rename it again to include e.g. a 
>  "Z" flag in the file name to mark that it was compressed (e.g. 
>  1223212411.M907959P17184.host,S=3271:2,SZ).
>  
>  These comments seem to contradict each. Or is there a difference between 
>  adding the size specifier to the filename and adding a Z flag to the end 
>  of the file name?
>  
>  --
>  Peter West
>  p...@pbw.id.au
>  And the great throng heard him gladly.
>  
> >>> 
> >>> Keyword is 'base filename'. From the wiki, "The standard filename 
> >>> definition is: ":2,".". Z is a flag.
> >>> 
> >>> Aki
> >> 
>


Re: Changing the name of a compressed file

2017-06-10 Thread Peter West
Not sure what you mean. I’m using lmtp to send messages to Dovecot from Postfix.

> On 10 Jun 2017, at 6:08 pm, Aki Tuomi  wrote:
> 
> What's your LDA?
> 
> Aki
> 
>> On June 10, 2017 at 11:01 AM Peter West  wrote:
>> 
>> 
>> Thanks for that Aki.
>> 
>> Follow-up question.  I tried to initiate compression by adding
>> 
>> mail_plugins = $mail_plugins zlib
>> 
>> plugin {
>>zlib_save_level = 6
>>zlib_save = xz
>> }
>> 
>> 
>> to dovecot.conf.  I restarted dovecot and sent one message to the server, 
>> and one message from the server.  Neither was compressed.  I changed the 
>> save type to
>> 
>>zlib_save = bz2
>> 
>> and repeated. This time the message received (in 
>> /var/vmail///cur) was not compressed, but the message in 
>> /var/vmail///.Sent/cur was bzip2 compressed.
>> 
>> Why is the received mail not being compressed?  Is this the point of the 
>> discussion about compressing old mails?
>> 
>> 
>>> On 10 Jun 2017, at 4:43 pm, Aki Tuomi  wrote:
>>> 
>>> 
 On June 10, 2017 at 5:58 AM Peter West  wrote:
 
 
 Concerning Maildir, the wiki page on compression has this:
 
 All mails must have ,S= in their filename where  contains the 
 original uncompressed mail size, otherwise there will be problems with 
 quota calculation as well as other potential random failures. Note that if 
 the filename doesn’t contain the ,S= before compression, adding it 
 afterwards changes the base filename and thus the message UID. The safest 
 thing to do is simply to not compress such files.
 
 Further down on the same page is this:
 
 If the file does exist, rename() (mv) the compressed file over the 
 original file.
• Dovecot can now read the file, but to avoid compressing it again on 
 the next run, you'll probably want to rename it again to include e.g. a 
 "Z" flag in the file name to mark that it was compressed (e.g. 
 1223212411.M907959P17184.host,S=3271:2,SZ).
 
 These comments seem to contradict each. Or is there a difference between 
 adding the size specifier to the filename and adding a Z flag to the end 
 of the file name?
 
 --
 Peter West
 p...@pbw.id.au
 And the great throng heard him gladly.
 
>>> 
>>> Keyword is 'base filename'. From the wiki, "The standard filename 
>>> definition is: ":2,".". Z is a flag.
>>> 
>>> Aki
>> 



signature.asc
Description: Message signed with OpenPGP


Re: Changing the name of a compressed file

2017-06-10 Thread Aki Tuomi
What's your LDA?

Aki

> On June 10, 2017 at 11:01 AM Peter West  wrote:
> 
> 
> Thanks for that Aki.
> 
> Follow-up question.  I tried to initiate compression by adding
> 
> mail_plugins = $mail_plugins zlib
> 
> plugin {
> zlib_save_level = 6
> zlib_save = xz
> }
> 
> 
> to dovecot.conf.  I restarted dovecot and sent one message to the server, and 
> one message from the server.  Neither was compressed.  I changed the save 
> type to
> 
> zlib_save = bz2
> 
> and repeated. This time the message received (in 
> /var/vmail///cur) was not compressed, but the message in 
> /var/vmail///.Sent/cur was bzip2 compressed.
> 
> Why is the received mail not being compressed?  Is this the point of the 
> discussion about compressing old mails?
> 
> 
> > On 10 Jun 2017, at 4:43 pm, Aki Tuomi  wrote:
> > 
> > 
> >> On June 10, 2017 at 5:58 AM Peter West  wrote:
> >> 
> >> 
> >> Concerning Maildir, the wiki page on compression has this:
> >> 
> >> All mails must have ,S= in their filename where  contains the 
> >> original uncompressed mail size, otherwise there will be problems with 
> >> quota calculation as well as other potential random failures. Note that if 
> >> the filename doesn’t contain the ,S= before compression, adding it 
> >> afterwards changes the base filename and thus the message UID. The safest 
> >> thing to do is simply to not compress such files.
> >> 
> >> Further down on the same page is this:
> >> 
> >> If the file does exist, rename() (mv) the compressed file over the 
> >> original file.
> >>• Dovecot can now read the file, but to avoid compressing it again on 
> >> the next run, you'll probably want to rename it again to include e.g. a 
> >> "Z" flag in the file name to mark that it was compressed (e.g. 
> >> 1223212411.M907959P17184.host,S=3271:2,SZ).
> >> 
> >> These comments seem to contradict each. Or is there a difference between 
> >> adding the size specifier to the filename and adding a Z flag to the end 
> >> of the file name?
> >> 
> >> --
> >> Peter West
> >> p...@pbw.id.au
> >> And the great throng heard him gladly.
> >> 
> > 
> > Keyword is 'base filename'. From the wiki, "The standard filename 
> > definition is: ":2,".". Z is a flag.
> > 
> > Aki
>


Re: Changing the name of a compressed file

2017-06-10 Thread Peter West
Thanks for that Aki.

Follow-up question.  I tried to initiate compression by adding

mail_plugins = $mail_plugins zlib

plugin {
zlib_save_level = 6
zlib_save = xz
}


to dovecot.conf.  I restarted dovecot and sent one message to the server, and 
one message from the server.  Neither was compressed.  I changed the save type 
to

zlib_save = bz2

and repeated. This time the message received (in 
/var/vmail///cur) was not compressed, but the message in 
/var/vmail///.Sent/cur was bzip2 compressed.

Why is the received mail not being compressed?  Is this the point of the 
discussion about compressing old mails?


> On 10 Jun 2017, at 4:43 pm, Aki Tuomi  wrote:
> 
> 
>> On June 10, 2017 at 5:58 AM Peter West  wrote:
>> 
>> 
>> Concerning Maildir, the wiki page on compression has this:
>> 
>> All mails must have ,S= in their filename where  contains the 
>> original uncompressed mail size, otherwise there will be problems with quota 
>> calculation as well as other potential random failures. Note that if the 
>> filename doesn’t contain the ,S= before compression, adding it 
>> afterwards changes the base filename and thus the message UID. The safest 
>> thing to do is simply to not compress such files.
>> 
>> Further down on the same page is this:
>> 
>> If the file does exist, rename() (mv) the compressed file over the original 
>> file.
>>  • Dovecot can now read the file, but to avoid compressing it again on 
>> the next run, you'll probably want to rename it again to include e.g. a "Z" 
>> flag in the file name to mark that it was compressed (e.g. 
>> 1223212411.M907959P17184.host,S=3271:2,SZ).
>> 
>> These comments seem to contradict each. Or is there a difference between 
>> adding the size specifier to the filename and adding a Z flag to the end of 
>> the file name?
>> 
>> --
>> Peter West
>> p...@pbw.id.au
>> And the great throng heard him gladly.
>> 
> 
> Keyword is 'base filename'. From the wiki, "The standard filename definition 
> is: ":2,".". Z is a flag.
> 
> Aki



signature.asc
Description: Message signed with OpenPGP