[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Too stupid for courier-imap, but uw-imapd works?



mario.vukelic@dantian.org said:
> Sounds interesting, I would love to see that. Also the above, make exim
> deliver in maildir format, if you are so kind. I couldn't figure that
> out either.
> 
> Thanks again for helping

sure. 

First, I added a new delivery transport in the transports section:

local_imap_delivery:
  driver = appendfile
  group = mail
  mode = 0660
  mode_fail_narrower = false
  envelope_to_add = true
  return_path_add = true
  directory = /var/spool/imap/${local_part}/
  maildir_format
  check_string = ""

It was just copied from the default "local_delivery" transport, so I'm
not sure that all the settings need to be there, but this works.

Then, you need a director in the directors section to tell exim which
local usernames are virtual imap mailboxes:

imapuser:
  driver = aliasfile
  file = /etc/imapusers
  search_type = lsearch
  user = imap
  transport = local_imap_delivery

With this setup, /etc/imapusers is a list of local addresses that will
have their mail delivered via the local_imap_delivery transport. Now, to
add a user you just do a "maildirmake" in /var/spool/imap, and add the
username to /etc/imapusers.

Ideally, exim would just infer the existence of the account by checking
whether or not /var/spool/imap/${local_part}/ is there, but I couldn't
figure out how to write an exim lookup that would do that. So I just
settled for the flat file approach. 

Finally, you have to set up userdb users in courier-imap and make their
mailboxes point to /var/spool/imap. I made every virtual user share a
system "imap" userid, which is sort of bad in that if a user compromises
the imap daemon he can read others' mail, but that's not a worry in my
organization. For more security you can give each virtual user his own
uid (leaving logins disabled, of course).

Jason



-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: