Re: [exim] pgsql lookup

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Johannes Berg
Date:  
À: Eduardo Gargiulo
CC: exim-users
Sujet: Re: [exim] pgsql lookup
Hi,

On Wed, 2004-11-17 at 17:12 +0000, Eduardo Gargiulo wrote:
> I want to use the same source of authentication (in this case a table on
> postgresql database) for exim and my web application. The application have a
> user management module (create, delete, modify users and password) and I would
> like to use that user information as mail accounts in exim. I could alter the
> table definition to fit exim requirements.


Look at
/etc/exim4/conf.d/auth/30_exim4-config_examples

(if you enabled split-config). It has an example for pgsql which assumes
that the password is saved in plain in the database afaict.

> For example, if a mail messege arrives for a user created from the web
> interface, I would like that exim create the Maildir and delivers the message
> to the right folder. If the user does not exist in the pgsql table (and the
> system), exim should bounce the message.


You'll need to write a router for that which checks the database, and
then calls a transport, for example the maildir transport (you may need
a modified maildir transport because the directory= may need to be
different).

I think. I'm not really sure on this, maybe you can google for something
like "pgsql exim router".

johannes