Re: [exim] Custom Router/Transport Help

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Ryan Roegan
Date:  
À: exim-users
Sujet: Re: [exim] Custom Router/Transport Help
Thank you for pointing me in the right direction.

i added group=mail and then added sw to the mail group. Changed the
transport directory_mode to 0660 but then i started receiving permission
issues accessing files in /tmp.

I didn't really understand what user exim was using for delivery or how to
force it to use a specific user.

Once i put user=sw in my transport all is fixed.

So hopefully someone will find this useful.

If you want to setup a simple catch all smtp server using debian 3 and exim
4, very useful for testing email based notification systems. Use the
following config:

1. Install the following packages:

exim4, courier-imap

2. Update exim4 config

change the following settings /etc/exim4/update-exim4.conf.conf

#authorative for all domains:
dc_other_hostnames='*'

#read the split config in conf.d
dc_use_split_config='true'

3. Create the user

Create the user that you would like all mail delivered to ie:

#create user catchall
useradd catchall -m

3. Create the router file

create the file /etc/exim4/conf.d/routers/01_exim4_accept_all:

ca_router:
driver = accept
transport = ca_deliver

4. Create the transport file

create the file /etc/exim4/conf.d/transport/01_exim4_catch_all_transport:

ca_deliver:
driver = appendfile
user=catchall
directory = /home/catchall/Maildir
create_directory
delivery_date_add
envelope_to_add
return_path_add
maildir_format
directory_mode = 0600
mode_fail_narrower = false
current_directory = /

5. Update the config

sudo update-exim4.conf

On 2010-03-13 12:03, Dirk Linnerkamp wrote:

> Hi Ryan,
>
> Am 13.03.2010 01:53, schrieb Ryan Roegan:
> > I'm trying to make a test mail server that is authorative for all

domains
> > and delivers all mail received to one mailbox. I'm using debian 3,

exim4
> > and courier imap.
> >
> > I've added the router and transport below. I would like all mail

delivered
> > into the sw user's mailbox. But i get permission errors upon delivery:
> >
> > 2010-03-01 18:17:27 1NmHfr-0003Pz-2n<=
> > root@???=root P=local S=443
> > 2010-03-01 18:17:27 1NmHfr-0003Pz-2n ==
> > root@???=sw_router T=sw_deliver defer
> > (13): Permission denied: cannot chdir to
> > /home/sw/Maildir
>
> ...did you set the "group" option in the routers configuration to
> exim's group?
>
> ...however if you use the 'mail' group which exim normally belongs
> to om Debian, you should add user 'sw' to the group and change
> the directory mode to 0660 instead of 0600.
>
> ...try it and report.
>
>
>
>