add condition to sasl authentication

Discussion in 'HOWTO-Related Questions' started by tuananh87vn, Dec 8, 2009.

  1. tuananh87vn

    tuananh87vn Member

    to limit the pop3 login, i've modified the courier authentication, say, adding the WHERE_CLAUSE to limit user who can login

    to limit user who can use smtp service i think the sasl authentication (/etc/postfix/sasl/smpt.conf) should be modified in the same way, however, it doesn't work. user cannot login using pop3 but still send mail using smtp


    can anybody tell me what's wrong here?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    To which tutorial (URL) are you referring?
     
  3. tuananh87vn

    tuananh87vn Member

    this one:
    http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-debian-lenny

    i've made this change to /etc/courier/authmysqlrc
    WHERE_CLAUSE enable = '1'

    meaning one user cannot login if his enabled is not equal to '1'

    i tried to make the similar change to /etc/postfix/sasl/smtd.conf
    sql_select: select password from users where email = '%u' and enabled = '1'

    but it doesn't work. user can still send mail even if he's logged in
    (webmail requires user to login before sending mail, but email client like outlook separates retriving and sending mail, so i need to manage the smtp authentication)
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Do you have an "enabled" column in the database table?
     
  5. tuananh87vn

    tuananh87vn Member

    yes, obviously. i've added the field 'enabled' to user table. it works with authmysqlrc, but not with sasl
     

Share This Page