RE: [Exim] Delivering mails into a IMAPD-mailbox

Top Page
Delete this message
Reply to this message
Author: Bernard Stern
Date:  
To: exim-users
Subject: RE: [Exim] Delivering mails into a IMAPD-mailbox
On Thu, 16 Nov 2000 13:40:58 +0100 "Oliver Fischer" wrote:

> Hi,


> I would like to deliver the mails of some users via imapd with
> this filter


> local_delivery:
>        driver          = pipe
>        command         = "/usr/local/cyrus/bin/deliver
> ${local_part}"
>        prefix          = ""
>        user            = cyrus
>        return_path_add
>        return_output
>        envelope_to_add
>        delivery_date_add


> and the mails of all other users via


> local_delivery:
> driver = appendfile
> file = /var/mail/${local_part}
> delivery_date_add
> envelope_to_add
> return_path_add
> group = mail
> mode = 0660


> How could I do this. I would like to do this by managing a file
> with the names of all users which are imap-users....



I'm doing this with a lsearch on a file. Since I have not many
users it's ok. You could 'upgrade' to cdb search if needed.

This is my director for shell users (in which IMAP users
are a subset):

shell_users:
driver = aliasfile
require_files = EXIM_CFG/shell-users
file = EXIM_CFG/shell-users
search_type = lsearch
no_rewrite
transport = shell_users_delivery

And the transport:

shell_users_delivery:
driver = pipe
use_shell
command = ${lookup{${lc:$local_part}}lsearch{EXIM_CFG/shell-users}{$value}fail}
return_output
prefix = ""
from_hack
user = exim
group = mail

The file looks like:

user-a: /usr/local/bin/deliver user-a
user-b: /usr/local/bin/deliver user-b
#
some-local-part: /path/to/some/command -with -options


Then you deal with 'localuser' users as you wish.

Regards,

Bernard Stern, SWITCH

____________S_W_I_T_CH___Swiss Academic_______________________________________
        mail: SWITCH Head Office       a          Tel: +41 1 268 1520
              Limmatquai 138           n          Fax: +41 1 268 1568
              CH-8001 Zurich           d        e-mail: stern@???
________________________________________Reseach Network_______________________