Re: [exim] sieve + maildir

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Roel Schroeven
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] sieve + maildir
Michael Haardt schreef:
>> I'm not an Exim expert and I must admit that I'm a bit lost in the wood
>> of router, transports and drivers. But as far as I can see, when a mail
>> goes through a Sieve filter, it ends up in a transport called
>> address_file, while it should end up in one of the transports called
>> address_directory or maildir_home (because the sieve filtering system
>> returns address_file without trailing slash).
>>
>> I guess I could set directory to an appropriate value in the
>> address_file transport, but that doesn't seem quite right. I have the
>> impression that I somehow should be able to get the mail to pass through
>> address_directory or maildir_home.
>
> Sieve runs as part of a redirect router and generates file addresses.
> File addresses are processed by the appendfile transport pointed to
> by "file_transport" in the router. The file transport then decides
> to use maildir delivery by using "maildir_format" and "directory".
> The directory must be an absolute path, so qualify the relative file
> addresses with a string expansion that uses "$address_file".
>
> I suggest to read at least the introductional chapters of the manual to
> understand how routers and transports work together and out of a sudden
> the above will make sense.


I guess I should take the time to read the manual and create an
Exim-installation from scratch on a testbox.

For now though, I solved my problem the easy/lazy way: like Mark de
Vries suggested, I use the LDA from dovecot via a pipe command in
.forward: I put

| "/usr/lib/dovecot/deliver"


in .forward of the account I need it for (that's the location of deliver
on Debian; it's different on other systems).
I also created .dovecot.sieve containing

# CMUsieve (dovecot LDA)

require ["imapflags", "fileinto" ];

  # Dump messages that SpamAssassin considers spam to Junk folder
  if header :contains "x-spam-score" "++++" {
    fileinto "Junk";
  }


  else {
    # Add label "to do"
    addflag "$Label4";
    keep;
  }


in the home dir of that account. Works like a charm. I like it that
dovecot lets me use mail folder names as IMAP-clients see them, as
opposed to the real names in the filesystem as exim requires me to do
(AFAIK).

--
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
-- Isaac Asimov

Roel Schroeven