AW: Creating a backup of incoming mail

Patrick De Zordo patrick at spamreducer.eu
Tue Sep 2 07:06:47 UTC 2014


Well, I'll give you some configuration hints..

1. don't forget to install sieve (eg. "apt-get install dovecot-sieve")..

2. Add to "postfix/main.cf" the following lines:
---8<--------------------------------------------------------------------------------
# Tell postfix to hand off mail to the definition for dovecot in master.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
---8<--------------------------------------------------------------------------------

3. In "postfix/master.cf":
---8<--------------------------------------------------------------------------------
# Integration with Dovecot - hand mail over to it for local delivery, and
# run the process under the vmail user and mail group.
dovecot      unix   -        n      n       -       -   pipe
  flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/dovecot-lda -d $(recipient)
---8<--------------------------------------------------------------------------------

4. add "$mail_plugins sieve" to "dovecot/conf.d/15-lda.conf"

That’s all! Then just provide the sieve scripts at location specified in "dovecot/conf.d/90-sieve.conf" and you are done!

Good luck!

Bye!

---------------------------------------------------------------------
Mit freundlichen Grüßen / Distinti saluti / Kind regards
De Zordo Patrick
patrick at spamreducer.eu

> -----Ursprüngliche Nachricht-----
> Von: dovecot [mailto:dovecot-bounces at dovecot.org] Im Auftrag von
> LuKreme
> Gesendet: Montag, 1. September 2014 18:47
> An: dovecot at dovecot.org
> Betreff: Re: Creating a backup of incoming mail
> 
> 
> On 30 Aug 2014, at 10:33 , Oscar del Rio <delrio at mie.utoronto.ca> wrote:
> 
> > You could use a global "sieve_before" filter.
> >
> > http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
> 
> And, I get hampered on the very first step:
> 
> To use Sieve, you will first need to make sure you are using Dovecot LDA or
> LMTP for delivering incoming mail to users' mailboxes. Then, you need to
> enable the Pigeonhole Sieve plugin in your configuration:
> 
> protocol lda {
>   mail_plugins = $mail_plugins sieve
> }
> 
> OK, so I am using dovecot-lda via postfix/master.cf, but in my configuration I
> have a section tagged protocols, not protocol.
> 
> Don't know if this is the same thing, or a slightly different thing. I don't know
> where/what $mail_plugins refers to, and there is no "plugins" section of my
> configuration file. In fact, the string "plug" doesn't appear in dovecot.conf
> (there are some commented lines for mail_plugins in conf.d/ files).
> 
> Then, sieve_global_path is deprecated, but despite being tagged as
> deprecated, the example config uses the sieve_global_path. Shouldn't the
> example use sieve_default?
> 
> Looks like further down is the sieve_before, but really, the documentation
> feels almost like it has set out with the intention of being as obtuse as
> possible.
> 
> If I understand it, and I am sure I do not, what I need to add in to
> dovecot.conf is something like this:
> 
> protocol lda {
>   mail_plugins = $mail_plugins sieve
> }
> 
> (which is separate and unrelated to my "protocols = imap" existing line in
> dovecot.conf)
> 
> plugin {
>    sieve = ~/.dovecot.sieve
>    sieve_before = /var/lib/dovecot/sieve/archive.sieve
> }
> 
> And then in archive.sieve I find out what the commands are to write a COPY
> of the mail to a location after getting the date info.
> 
> require ["variables","date","fileinto","mailbox"];
> 
> if currentdate :matches "year" "*" { set "year" "${1}"; } if currentdate
> :matches "month" "*" { set "month" "${1}"; }
> 
> And a command like this, but not this, since i wan the backup stores in an
> absolute path outside the IMAP store and I obviously only want a copy of
> that message.
> 
>   fileinto :create "INBOX.Lists.${year}.${month}.dovecot";
> }
> 
> --
> Did they get you to trade your heroes for ghosts? Hot ashes for trees?
> Hot air for a cool breeze? Cold comfort for change?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6229 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140902/c2e19d96/attachment-0001.p7s>


More information about the dovecot mailing list