Re: [Exim] mysql help

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Wakko Warner
Dátum:  
Címzett: Matt Jones
CC: exim-users
Tárgy: Re: [Exim] mysql help
> ok i have a bit of a problem
>
> im trying to use mysql as a backend for email users, now, this is what i have working.....
>
> local domains are grabbed from mysql.
>
> now what i want is for exim to check the user exists in the db, and not on the system
>
> the database structure:
>
> Table name: email_addresses
> |--- username
> |--- password
> |--- domain
>
> so how would i check the user exists in the db?


Here's how I did it:
Router
local_vuser:
        debug_print = "R: local_vuser for $local_part@$domain"
        address_data = ${lookup mysql{select * \
                                        from userbase.passwd \
                                        where enabled='yes' and \
                                        email='$local_part' \
                                        limit 1 \
                                     } \
                                {$value} \
                                fail \
                        }
        driver = accept
        transport = mail_vuser_spool


Transport
mail_vuser_spool:
        debug_print = "T: appendfile for $local_part@$domain"
        driver = appendfile
        file = /var/mail/$local_part
        delivery_date_add
        envelope_to_add
        return_path_add
        group = mail
        mode = 0660
        user = vuser


Make sure you have verify = recipient somewhere in your RCPT acl.

--
Lab tests show that use of micro$oft causes cancer in lab animals