[Exim] Exim4 & delivery to Cyrus21 mail folders :-(

Jim Archer jim at archer.net
Tue Jan 6 06:29:05 EST 2004


Thanks!  This note is a HUGE help!

I was able to get deliver to put the message into the proper sub folder 
with the -a switch, as you said.  So then, I decided to tackle LMTP.  For 
some reason, this configuration did not work at all, meaning mail never 
made it from Exim4 to Cyrus21:

local_delivery_cyrus:
   driver = smtp
   protocol = lmtp

The Cyrus log gave no indication that Exim4 (I use 4.3) ever contacted it 
at all.

But I was able to get this to work:

local_delivery_cyrus:
  driver = lmtp
  socket = /var/run/cyrus/socket/lmtp
  batch_max = 100

This setup moves mail from Exim to Cyrus nicely.

But now I am back to my mail folder issue.  I added the ACL "anyone p" to 
both user.jim and user.jim.SPAM, and I then I put the local_part_suffix in 
the router:

local_user_cyrus:
  driver = accept
  local_part_suffix = SPAM
  transport = local_delivery_cyrus

I also tried +SPAM.  In each case, the email ended up in my inbox.  The 
exception is if I add check_local_user to the router, in which case it 
rejects the mail with user unknown.

So I guess I am back to my original question of how do I put mail directly 
into a folder, but now I at least have the benefit of running the more 
efficient LMTP protocol.

Thanks again...

Jim



--On Tuesday, January 06, 2004 3:42 AM +0100 Kjetil Torgrim Homme 
<kjetilho at ifi.uio.no> wrote:

> On Tue, 2004-01-06 at 03:01, Jim Archer wrote:
>> I have been trying to get Exim4 to deliver into a Cyrus21 mail folder.
>> All that happens is that the message ends up in the Inbox.  I have
>> checked to make sure the folder actually exists.  I am using the
>> cyrdeliver program with the ?m option, so I think that ACLs should not
>> be an issue.  I have been through the archives and docs and can't seem
>> to find an answer, so if someone would help me I would really appreciate
>> it!
>>
>> I have tried the simplest syntax for the Exim4 transport I could think
>> of. Here is what I have in my Exim4 conf file:
>>
>> local_delivery_cyrus:
>>   driver = pipe
>>   command = /usr/sbin/cyrdeliver -m SPAM -- jim
>>   user = cyrus
>>   group = mail
>>   log_output
>>   message_prefix =
>>   message_suffix =
>>
>>
>> For the ?m option, I have also tried the values user.jim.SPAM and
>> jim.SPAM.
>
> -m SPAM is correct.
>
> your problem is that you (anyone/anonymous) don't have access to post
> new messages to user.jim.SPAM.  you have to
>
>  a) add an ACL "anyone p" to every INBOX (this setting will be inherited
> when the user creates a new mailbox)
>
> or
>
>  b) specify "-a jim" to deliver.
>
> or
>
>  c) use
>   driver = smtp
>   protocol = lmtp
>   authenticated_sender = <variable containing username>
>   (this requires Exim 4.20 or newer)
>
> the advantage of method a) is that it works even if you use LMTP, and it
> allows automatic filtering of jim+stuff into user.jim.stuff, without any
> Sieve configuration from the user.  the same goes for c) if you use the
> same method for normal delivery.
>
> I highly recommend the use of LMTP over deliver.  deliver will munge
> error reports which is very confusing for both postmaster and user.  the
> reason for that is that it can only report one text string per numeric
> failure code, even if lmtpd can report different strings with
> diagnostics.  what's more, if lmtpd is down (e.g., if Exim starts up
> before Cyrus has recovered), you will bounce messages!
>
> we actually use deliver for spam delivery (but LMTP for the rest[1]),
> but we could instead change local_part_suffix into "SPAM" and use LMTP
> delivery for that, too.  not sure if that's a good idea or not, since
> the user's Sieve script may want to know what the original
> local_part_suffix was.
>
> sorry about all the Cyrus specific talk, fellow list members, I suggest
> we take it any further discussion to the info-cyrus list.
>
>
> [1] we have another exception, e-mail from postmaster, this is sent with
> deliver -q since Exim's SMTP/LMTP doesn't provide a way of enabling the
> IGNOREQUOTA extension.
> --
> Kjetil T.
>
>
>
> --
>
>## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
>## details at http://www.exim.org/ ##








More information about the Info-cyrus mailing list