Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

SMTP Authentication with mysql database..

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


pradeeplondonuk at hotmail

May 2, 2002, 7:54 AM

Post #1 of 2 (184 views)
Permalink
SMTP Authentication with mysql database..

This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Password in mysql database are in the format of md5_base64 using ( Digest::MD5 qw(md5_base64) module). Can anybody tell how to autheticate it from the EXIM...

I tried the given piece of code...but it is not working

######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################

# There are no authenticator specifications in this default configuration file.

login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if and { \
{!eq{$1}{}} \
{!eq{$2}{}} \
{crypteq{$2}{${lookup mysql{SELECT password FROM mailbox WHERE mailbox_name='$1'}{$value}fail}}} \
} {yes}{no}}"
server_set_id = $1

# End of Exim configuration file

--


tobias at labert

May 3, 2002, 6:42 AM

Post #2 of 2 (174 views)
Permalink
Re: SMTP Authentication with mysql database.. [In reply to]

Hi,

I had kinda same problem. Try this:

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

login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = "${if and { \
{!eq{$1}{}} \
{!eq{$2}{}} \
{crypteq{$2}{\{md5\\}${lookup mysql{SELECT
<column> FROM \
<Table>
WHERE <column>='$1'}{$value}fail}}} \
} {yes}{no}}"
server_set_id = $1

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

The clue is the \{md5\\} Part

You can find more on this at

http://www.exim.org/exim-html-4.00/doc/html/spec_11.html#IX582

Regards

-tobias

pradeep sethi wrote:

>login:
> driver = plaintext
> public_name = LOGIN
> server_prompts = "Username:: : Password::"
> server_condition = "${if and { \
> {!eq{$1}{}} \
> {!eq{$2}{}} \
> {crypteq{$2}{${lookup mysql{SELECT password FROM mailbox WHERE mailbox_name='$1'}{$value}fail}}} \
> } {yes}{no}}"
> server_set_id = $1
>
># End of Exim configuration file
>
>--
>
>--
>
>## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.