SV: SV: [Exim] I can't get MYSQL to work with Exim 4.05 <- I…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Flemming Christensen
Dátum:  
Címzett: Glenn Carver
CC: Exim-Users (E-mail)
Tárgy: SV: SV: [Exim] I can't get MYSQL to work with Exim 4.05 <- It's Working !!!!!
My users still need to have a Unix account because I havent' found a way to configure my pop3 and imap service to use mysql to authorize the user.

My mysql table:
CREATE TABLE user (
id mediumint(8) unsigned NOT NULL auto_increment,
userid varchar(15) NOT NULL default '',
mailaddress varchar(128) NOT NULL default '',
mailboxpath varchar(128) NOT NULL default '',
homedir varchar(128) NOT NULL default '',
externalmail tinyint(3) unsigned NOT NULL default '0',
fullname varchar(60) NOT NULL default '',
password varchar(16) binary default NULL,
shadowpassword varchar(15) default NULL,
domain varchar(60) NOT NULL default '',
PRIMARY KEY (id),
KEY userid (userid,mailaddress),
KEY domain (domain)
) TYPE=MyISAM;


here are the relevant mysql parts

---------------------

MYSQL_AUTHSERVER=localhost
MYSQL_AUTHPORT=3306
MYSQL_AUTHDB=exim
MYSQL_AUTHTABLE=user
MYSQL_AUTHUSER=root
MYSQL_AUTHPASSWORD=secret

MYSQL_DOMAIN = SELECT domain from user where mailaddress = '${quote_mysql:$local_part@$domain}'
MYSQL_MAILBOX = SELECT mailboxpath from user where mailaddress = '${quote_mysql:$local_part@$domain}'
MYSQL_USER = SELECT userid from user where mailaddress = '${quote_mysql:$local_part@$domain}'

mysql_servers = MYSQL_AUTHSERVER/MYSQL_AUTHDB/MYSQL_AUTHUSER/MYSQL_AUTHPASSWORD

begin acl

begin routers

virtual_local_user:
driver = accept
domains = ${lookup mysql {MYSQL_DOMAIN}{$value}}
condition = ${lookup mysql {MYSQL_USER}{$value}}
transport = virtual_delivery

# This router matches local user mailboxes.

localuser:
driver = accept
check_local_user
transport = local_delivery

begin transports

virtual_delivery:
driver = appendfile
file = ${lookup mysql {MYSQL_MAILBOX}{$value}}
delivery_date_add
envelope_to_add
return_path_add
user = mail
group = mail
# mode = 0660
create_directory

begin retry
begin rewrite


Chers,
Flemming

-----Oprindelig meddelelse-----
Fra: Glenn Carver [mailto:Glenn.Carver@atm.ch.cam.ac.uk]
Sendt: 25. juli 2002 10:37
Til: Flemming Christensen
Emne: Re: SV: [Exim] I can't get MYSQL to work with Exim 4.05 <- It's
Working !!!!!


Dear Flemming,

Could you please send me the relevant parts of your exim configure file? I'd like to use MySQL here to handle my virtual domains. At the moment, users have to have a unix account which most never use.

I'd be very grateful thanks.

Glenn


On 2002.07.25 07:43 Flemming Christensen wrote:
> Thanks to all who helped me !!!
>
> Exim finds the user in the MySQL table and drops the mail in the right folder.
>
> But can someone tell me why ">exim -d -v postmaster@???" always deliver the mail to the mailaddress specified after "-v" ?
>
> I thought I could use it to test the delivery process. Is there another way to test it where the mail gets delivered to mail address specified after "To:" ?
>
> Thanks again for all the help
>
> Cheers,
> Flemming
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>

--

Dr. Glenn Carver, Centre for Atmospheric Science, Univ. of Cambridge,
Chemistry Dept., Lensfield Road, Cambridge, CB2 1EW, UK.

mailto:Glenn.Carver@atm.ch.cam.ac.uk  http://www.atm.ch.cam.ac.uk/~glenn/
Phone: +44 (1223) 763827      ** please note new numbers **
Fax:   +44 (1223) 763823