Re: exim4 maildir_tag

2016-03-09 Thread Sven Hartge
Jonathan Dowland  wrote:
> On Tue, Mar 08, 2016 at 09:59:48PM +, Darac Marjal wrote:

>> Dovecot has two (relevant) plugins. zlib compresses the stored
>> emails.  This is transparent to all clients - exim provides
>> uncompressed emails, dovecot compresses them to disk and on-the-fly
>> decompresses them when serving them back to mail clients.
>> 
>> There is also imap_zlib which works like the HTTP gzip extension.
>> IMAP communications are compressed, allowing fewer bytes to be sent
>> between the server and the clients.

> Very cool. I wonder (not having looked) whether this means you get a
> compressed file decompressed and then re-compressed if you enable both
> plugins, or if it's smart enough to stream the compressed files
> without decompressing them in that circumstance.

Last time I asked that question Timo corrected me and said, the mail is
decompressed after reading from disk and then compressed again for the
transmission via IMAP/POP.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



Re: exim4 maildir_tag

2016-03-09 Thread Jonathan Dowland
On Tue, Mar 08, 2016 at 09:59:48PM +, Darac Marjal wrote:
> Dovecot has two (relevant) plugins. zlib compresses the stored emails.
> This is transparent to all clients - exim provides uncompressed emails,
> dovecot compresses them to disk and on-the-fly decompresses them when
> serving them back to mail clients.
> 
> There is also imap_zlib which works like the HTTP gzip extension. IMAP
> communications are compressed, allowing fewer bytes to be sent between
> the server and the clients.

Very cool. I wonder (not having looked) whether this means you get a compressed
file decompressed and then re-compressed if you enable both plugins, or if it's
smart enough to stream the compressed files without decompressing them in that
circumstance.



Re: exim4 maildir_tag

2016-03-08 Thread Darac Marjal
On Tue, 8 Mar 2016 23:21:26 +1100
Andrew McGlashan  wrote:

> Hi,
> 
> On 8/03/2016 8:32 PM, Christian Schmidt wrote:
> > On 07.03.2016 19:34, Andrew McGlashan wrote:  
> >> So, mail queue handling will then be done by dovecot-lda instead
> >> of exim4.  
> > 
> > No, dovecot "only" does delivery to your local users'
> > mailboxes/maildirs.  
> 
> That's what I thought, thanks for confirming.
> 
> >> Will mailq still give me results the same way?  
> > 
> > Sure.  
> 
> Excellent, now I just need to work out how to gzip emails when they
> are larger than the file system block size of 4KB -- although I do
> wonder, does dovecot provide clients with non-zipped data or can it
> benefit form less traffic by providing zipped data over the
> transport?  (like how a web browser might receive zipped content and
> unzip it to build the webpage on the client).

Dovecot has two (relevant) plugins. zlib compresses the stored emails.
This is transparent to all clients - exim provides uncompressed emails,
dovecot compresses them to disk and on-the-fly decompresses them when
serving them back to mail clients.

There is also imap_zlib which works like the HTTP gzip extension. IMAP
communications are compressed, allowing fewer bytes to be sent between
the server and the clients.

> 
> Oh and the system_filter saves files directly to backup areas that are
> not users on the system; so I have some work to do on that as well.
> 
> Thanks
> AndrewM
> 



Re: exim4 maildir_tag

2016-03-08 Thread Andrew McGlashan
Hi,

On 8/03/2016 8:32 PM, Christian Schmidt wrote:
> On 07.03.2016 19:34, Andrew McGlashan wrote:
>> So, mail queue handling will then be done by dovecot-lda instead of exim4.
> 
> No, dovecot "only" does delivery to your local users' mailboxes/maildirs.

That's what I thought, thanks for confirming.

>> Will mailq still give me results the same way?
> 
> Sure.

Excellent, now I just need to work out how to gzip emails when they are
larger than the file system block size of 4KB -- although I do wonder,
does dovecot provide clients with non-zipped data or can it benefit form
less traffic by providing zipped data over the transport?  (like how a
web browser might receive zipped content and unzip it to build the
webpage on the client).

Oh and the system_filter saves files directly to backup areas that are
not users on the system; so I have some work to do on that as well.

Thanks
AndrewM



Re: exim4 maildir_tag

2016-03-08 Thread Christian Schmidt
On 07.03.2016 19:34, Andrew McGlashan wrote:
> So, mail queue handling will then be done by dovecot-lda instead of exim4.

No, dovecot "only" does delivery to your local users' mailboxes/maildirs.

> Will mailq still give me results the same way?

Sure.

Regards,
Christian

-- 
No signature available.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: exim4 maildir_tag

2016-03-07 Thread Andrew McGlashan


On 8/03/2016 4:31 AM, Darac Marjal wrote:
> On Tue, Mar 08, 2016 at 02:48:56AM +1100, Andrew McGlashan wrote:
>> Hi,
>>
>> I want to use this feature of dovecot [1].
>>
>> But it requires that each Maildir filename include ",S=$message_size" in
>> the file names.
>>
>> How can I get exim4 to create all new emails using the maildir_tag
>> format?

I've actually added the maildir_tag entry to these transports:
   /etc/exim4/conf.d/transport/35_exim4-config_address_directory
   /etc/exim4/conf.d/transport/20_save_local_message

That covers all saves done by the system_filter and also by any .forward
files that have "save $home/Maildir/" or subfolders.

Now I just need to work out how to gzip the files whilst keeping the
file names in tact so as not to effect any dovecot-uuidlist handling.

I'm still open to using dovecot-lda though if that works out to be the
best option.

Thanks
AndrewM



signature.asc
Description: OpenPGP digital signature


Re: exim4 maildir_tag

2016-03-07 Thread Andrew McGlashan


On 8/03/2016 4:31 AM, Darac Marjal wrote:
> On Tue, Mar 08, 2016 at 02:48:56AM +1100, Andrew McGlashan wrote:
> Probably the easiest way is to get dovecot to create the files. Look at
> either http://wiki.dovecot.org/LDA/Exim or
> http://wiki.dovecot.org/LMTP/Exim for how to tell Exim to deliver
> messages to dovecot. Dovecot will then store the file in whatever mail
> storage format you dictate (compress maildirs as you want, or its own
> dbox format).
> 
> Basically, LDA or LMTP allow you to decouple the mail delivery task
> (exim) from the mail storage task (dovecot).

So, mail queue handling will then be done by dovecot-lda instead of exim4.

Will mailq still give me results the same way?


Also, I do the following sometimes:
  exim4 -M msgid   # retry delivery
  exim4 -Mg msgid  # cancel delivery

  and others -Mvh  -Mvb and -Mvl

Will they all work the same or are there new ways to learn if I use
dovecot-lda ?

Thanks
AndrewM



Re: exim4 maildir_tag

2016-03-07 Thread Darac Marjal

On Tue, Mar 08, 2016 at 02:48:56AM +1100, Andrew McGlashan wrote:

Hi,

I want to use this feature of dovecot [1].

But it requires that each Maildir filename include ",S=$message_size" in
the file names.

How can I get exim4 to create all new emails using the maildir_tag format?


Probably the easiest way is to get dovecot to create the files. Look at 
either http://wiki.dovecot.org/LDA/Exim or 
http://wiki.dovecot.org/LMTP/Exim for how to tell Exim to deliver 
messages to dovecot. Dovecot will then store the file in whatever mail 
storage format you dictate (compress maildirs as you want, or its own 
dbox format).


Basically, LDA or LMTP allow you to decouple the mail delivery task 
(exim) from the mail storage task (dovecot).




I believe that I need to add this in to my config, but I've tried to do
so and am not getting the right result.

maildir_tag = ,S=$message_size


[I am also not concerned about quotas right now.]


I have a split files configuration.

Dovecot version detail:
dovecot-common 1:2.1.7-7+deb7u1

Exim4 version detail:
exim4  4.80-7+deb7u1
exim4-base 4.80-7+deb7u1
exim4-config   4.80-7+deb7u1
exim4-daemon-heavy 4.80-7+deb7u1


[1] http://wiki2.dovecot.org/Plugins/Zlib

Kind Regards
AndrewM



--
For more information, please reread.


signature.asc
Description: PGP signature


exim4 maildir_tag

2016-03-07 Thread Andrew McGlashan
Hi,

I want to use this feature of dovecot [1].

But it requires that each Maildir filename include ",S=$message_size" in
the file names.

How can I get exim4 to create all new emails using the maildir_tag format?

I believe that I need to add this in to my config, but I've tried to do
so and am not getting the right result.

maildir_tag = ,S=$message_size


[I am also not concerned about quotas right now.]


I have a split files configuration.

Dovecot version detail:
dovecot-common 1:2.1.7-7+deb7u1

Exim4 version detail:
exim4  4.80-7+deb7u1
exim4-base 4.80-7+deb7u1
exim4-config   4.80-7+deb7u1
exim4-daemon-heavy 4.80-7+deb7u1


[1] http://wiki2.dovecot.org/Plugins/Zlib

Kind Regards
AndrewM