Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Exim AUTH + MYSQL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
win_dir
n00b
n00b


Joined: 22 Aug 2003
Posts: 19
Location: UK

PostPosted: Wed Oct 01, 2003 8:54 pm    Post subject: Exim AUTH + MYSQL Reply with quote

Hi all,

I have a little problem, i am trying to setup Exim with AUTH PLAIN and LOGIN, below is the config that i use (more description below):

Quote:
fixed_login:
driver = plaintext
public_name = LOGIN
server_prompts = Username:: : Password::
server_condition = "${if and { \
{!eq{$1}{}} \
{!eq{$2}{}} \
{crypteq{$2}{\\{md5\\}${lookup mysql{SELECT MD5 FROM passwd \
WHERE name='${local_part:$1}' \
AND domain='${domain:$1}'}{$value}fail}}} \
} {yes}{no}}"
server_set_id = $1

fixed_plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = "${if and { \
{!eq{$2}{}} \
{!eq{$3}{}} \
{crypteq{$3}{\\{md5\\}${lookup mysql{SELECT MD5 FROM passwd \
WHERE name='${local_part:$2}' \
AND domain='${domain:$2}'}{$value}fail}}} \
} {yes}{no}}"
server_set_id = $2


The field with the password in is called "MD5" and this is just MD5 encrypted nothing else, "passwd" is the table with the userinfo in. "name" (a field) is the first part of the login name usually used to login with AUTH, for example "admin". And "domain" is a field which includes the domain part of the login i.e. "isgeeky.com" therfore all of the login used is "admin@isgeeky.com". Could someone tell me what i am doing wrong as it is saying "fixed_login authenticator failed............535 Incorrect authentification data (set_id=admin@isgeeky.com)" . I would really appreciate some help with this. Thanks in advance.

Kind Regards
Mark Rawson
_________________
Gentoo Linux ROOOOCKS!
http://www.gentoo.org
Back to top
View user's profile Send private message
win_dir
n00b
n00b


Joined: 22 Aug 2003
Posts: 19
Location: UK

PostPosted: Fri Oct 17, 2003 7:59 pm    Post subject: Reply with quote

Here is my entire exim.conf file, I would really love some help with this, as i have plainly copied and pasted most of the config file and changed the MySQL queries slightly, but it just won't work and returns: "fixed_login authenticator failed............535 Incorrect authentification data (set_id=admin@isgeeky.com)"



Code:
#
# this file was contributed by James Harr
# and slightly modified by Dave Preston
#

# MySQL database host/db/user/pass, removed pass etc. for security purposees
hide mysql_servers = zahost/zadb/zauser/zapass

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################


# Domains & Names
primary_hostname = mx1.isgeeky.com

# Domains
domainlist local_domains = \
  ${lookup mysql {SELECT domain FROM domains \
    WHERE type="local" and domain="${domain}" }}
domainlist relay_to_domains = \
  ${lookup mysql {SELECT domain FROM domains \
    WHERE type="relay" }}



# Relaying
hostlist   relay_from_hosts = 127.0.0.1
acl_smtp_rcpt = acl_check_rcpt
#qualify_domain = {local_domains}
# qualify_recipient = {primary_hostname}
# allow_domain_literals

# Never do _local_ delivery to these users.
never_users = root

# Name lookups
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 30s

# sender_unqualified_hosts =
# recipient_unqualified_hosts =

# percent_hack_domains =

ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d


######################################################################
#                       ACL CONFIGURATION                            #
#         Specifies access control lists for incoming SMTP mail      #
######################################################################

begin acl

acl_check_rcpt:

  # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
  # testing for an empty sending host field.
#REMOVE TO STOP SPAM PROXYING 
accept  hosts = 192.168.0.1:192.168.0.250:192.168.0.249

#accept hosts=12.234.172.79
  deny    local_parts   = ^.*[@%!/|]
 
accept  local_parts   = postmaster
          domains       = +local_domains
 require verify        = sender
  accept  domains       = +local_domains
          endpass
          message       = unknown user
          verify        = recipient
  accept  domains       = +relay_to_domains
          endpass
          message       = unrouteable address
          verify        = recipient
  accept  hosts         = +relay_from_hosts
  accept  authenticated = *
  deny    message       = relay not permitted

######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################

begin routers

#plain:
#driver = plaintext
#public_name = PLAIN
#server_secret = ${if eq{$1}{ph10}{secret1}fail}

# domain_literal:
#   driver = ipliteral
#   domains = ! +local_domains
#   transport = remote_smtp

dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more

mysql_sys_aliases:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup mysql{SELECT dest FROM aliases \
            WHERE email='${local_part}' AND \
            type="system"}}

mysql_aliases:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup mysql{ SELECT dest FROM aliases \
            WHERE email='${local_part}@${domain}' AND \
            type="site"}}

#system_aliases:
#  driver = redirect
#  allow_fail
#  allow_defer
#  data = ${lookup{$local_part}lsearch{/etc/aliases}}
## user = exim
# file_transport = address_file
# pipe_transport = address_pipe

#userforward:
#  driver = redirect
#  check_local_user
#  file = $home/.forward
#  no_verify
#  no_expn
#  check_ancestor
## allow_filter
#  file_transport = address_file
#  pipe_transport = address_pipe
#  reply_transport = address_reply

#localuser:
#  driver = accept
#  check_local_user
#transport = local_delivery

mysql_user:
  driver = accept
  condition = ${lookup mysql {SELECT home FROM passwd \
        WHERE email='$local_part@$domain'}}
  retry_use_local_part
  transport=mysql_delivery
user=12
group=65534

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################

begin transports

remote_smtp:
  driver = smtp

#local_delivery:
#  driver = appendfile
#  file = /var/mail/$local_part
#  delivery_date_add
#  envelope_to_add
#  return_path_add
## group = mail
## mode = 0660

mysql_delivery:
  driver = appendfile
  maildir_format
  directory = \
${lookup mysql{SELECT home FROM passwd \
      WHERE email='${local_part}@${domain}'}}/Maildir
  user = \
    ${lookup mysql{SELECT uid FROM passwd \
      WHERE email='${local_part}@${domain}'}}
  group = \
    ${lookup mysql{SELECT gid FROM passwd \
      WHERE email='${local_part}@${domain}'}}

#address_pipe:
#  driver = pipe
#  return_output

#address_file:
#  driver = appendfile
#  delivery_date_add
#  envelope_to_add
#  return_path_add

#address_reply:
#  driver = autoreply

######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################

begin retry

# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 1 hour and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 6 hours until 4 days have passed since the first
# failed delivery.

# Domain               Error       Retries
# ------               -----       -------

*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################

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

begin rewrite



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

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

begin authenticators

fixed_login:
 driver = plaintext
 public_name = LOGIN
 server_prompts = Username:: : Password::
 server_condition = "${if and { \
                      {!eq{$1}{}} \
                      {!eq{$2}{}} \
                      {crypteq{$2}{\\{md5\\}${lookup mysql{SELECT MD5 FROM passwd \
             WHERE name='${local_part:$1}' \
             AND domain='${domain:$1}'}{$value}fail}}} \
                     } {yes}{no}}"
 server_set_id = $1

fixed_plain:
 driver = plaintext
 public_name = PLAIN
 server_prompts = :
 server_condition = "${if and { \
                      {!eq{$2}{}} \
                      {!eq{$3}{}} \
                      {crypteq{$3}{\\{md5\\}${lookup mysql{SELECT MD5 FROM passwd \
             WHERE name='${local_part:$2}' \
             AND domain='${domain:$2}'}{$value}fail}}} \
                     } {yes}{no}}"
 server_set_id = $2

# End of Exim configuration file

_________________
Gentoo Linux ROOOOCKS!
http://www.gentoo.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum