Announcement

Collapse
No announcement yet.

config postfix sasl for ox

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Daniel Halbe
    replied
    Why not going the way described in the wiki?



    Daniel

    Leave a comment:


  • c4stro
    Guest replied
    Originally posted by peterking756 View Post
    I try to config postfix smtp authentication by cyrus-sasl, but failed.
    the content of /etc/postfix/sasl/smtpd.conf is as following:

    pwcheck_method: auxprop
    auxprop_plugin: sql
    mech_list: plain login cram-md5 digest-md5
    sql_engine: mysql
    sql_hostnames: 127.0.0.1
    sql_user: openexchange
    sql_passwd: secret
    sql_database: open-xchange-db
    sql_select: select userPassword from user

    I do not how to config sql_select line. The user table of open-oxchange database open-xchange-db is like this:
    Code:
    mysql> select  userPassword, mail from user;
    +---------------+---------------------+
    | userPassword  | mail                |
    +---------------+---------------------+
    | Af.iibkNjIBY2 | [EMAIL="oxadmin@example.com"]oxadmin@example.com[/EMAIL] | 
    | aiV0aJdZoITcs | [EMAIL="dqiu@35post.com"]dqiu@35post.com[/EMAIL]     | 
    | zIvuuyajsHETU | [EMAIL="sweng@35post.com"]sweng@35post.com[/EMAIL]    | 
    +---------------+---------------------+
    3 rows in set (0.00 sec)
    
    mysql> select *  from user;
    +-----+----+------------+-----------+---------------------+------------+-------------+-------------------+------------------+------------+---------------+---------------+-----------+--------------+-----------+-----------+---------------+------------+
    | cid | id | imapServer | imapLogin | mail                | mailDomain | mailEnabled | preferredLanguage | shadowLastChange | smtpServer | timeZone      | userPassword  | contactId | passwordMech | uidNumber | gidNumber | homeDirectory | loginShell |
    +-----+----+------------+-----------+---------------------+------------+-------------+-------------------+------------------+------------+---------------+---------------+-----------+--------------+-----------+-----------+---------------+------------+
    |   1 |  2 | localhost  | NULL      | [EMAIL="oxadmin@example.com"]oxadmin@example.com[/EMAIL] | NULL       |           1 | en_US             |               -1 | localhost  | Europe/Berlin | Af.iibkNjIBY2 |         1 | {CRYPT}      |      5001 |      5000 | /tmp/foo      | /bin/bash  | 
    |   1 | 24 | localhost  | NULL      | [EMAIL="dqiu@35post.com"]dqiu@35post.com[/EMAIL]     | NULL       |           1 | en_US             |               -1 | localhost  | Asia/Shanghai | aiV0aJdZoITcs |        23 | {CRYPT}      |      5023 |      5000 | /tmp/foo      | /bin/bash  | 
    |   1 | 26 | localhost  | NULL      | [EMAIL="sweng@35post.com"]sweng@35post.com[/EMAIL]    | NULL       |           1 | en_US             |               -1 | localhost  | Asia/Shanghai | zIvuuyajsHETU |        25 | {CRYPT}      |      5025 |      5000 | /tmp/foo      | /bin/bash  | 
    +-----+----+------------+-----------+---------------------+------------+-------------+-------------------+------------------+------------+---------------+---------------+-----------+--------------+---------
    and the login2user table is like:
    Code:
    mysql> select * from login2user;
    +-----+----+---------+
    | cid | id | uid     |
    +-----+----+---------+
    |   1 |  2 | oxadmin | 
    |   1 | 24 | dqiu    | 
    |   1 | 26 | sweng   | 
    +-----+----+---------+
    3 rows in set (0.00 sec)
    I hope postfix authenticate can get data from user or login2user table.
    Any suggersion are very appreciated.
    In the wiki is nothing about this stuff, if i try the command
    Code:
     /opt/open-xchange/sbin/listuser -A oxadmin -P secret
    i have the error
    Code:
    Server response:
     com.openexchange.admin.rmi.exceptions.OXSieveHandlerException: The server doesn't suppport PLAIN authentication
    is that normal?

    Leave a comment:


  • peterking756
    Guest started a topic config postfix sasl for ox

    config postfix sasl for ox

    I try to config postfix smtp authentication by cyrus-sasl, but failed.
    the content of /etc/postfix/sasl/smtpd.conf is as following:

    pwcheck_method: auxprop
    auxprop_plugin: sql
    mech_list: plain login cram-md5 digest-md5
    sql_engine: mysql
    sql_hostnames: 127.0.0.1
    sql_user: openexchange
    sql_passwd: secret
    sql_database: open-xchange-db
    sql_select: select userPassword from user

    I do not how to config sql_select line. The user table of open-oxchange database open-xchange-db is like this:
    Code:
    mysql> select  userPassword, mail from user;
    +---------------+---------------------+
    | userPassword  | mail                |
    +---------------+---------------------+
    | Af.iibkNjIBY2 | [EMAIL="oxadmin@example.com"]oxadmin@example.com[/EMAIL] | 
    | aiV0aJdZoITcs | [EMAIL="dqiu@35post.com"]dqiu@35post.com[/EMAIL]     | 
    | zIvuuyajsHETU | [EMAIL="sweng@35post.com"]sweng@35post.com[/EMAIL]    | 
    +---------------+---------------------+
    3 rows in set (0.00 sec)
    
    mysql> select *  from user;
    +-----+----+------------+-----------+---------------------+------------+-------------+-------------------+------------------+------------+---------------+---------------+-----------+--------------+-----------+-----------+---------------+------------+
    | cid | id | imapServer | imapLogin | mail                | mailDomain | mailEnabled | preferredLanguage | shadowLastChange | smtpServer | timeZone      | userPassword  | contactId | passwordMech | uidNumber | gidNumber | homeDirectory | loginShell |
    +-----+----+------------+-----------+---------------------+------------+-------------+-------------------+------------------+------------+---------------+---------------+-----------+--------------+-----------+-----------+---------------+------------+
    |   1 |  2 | localhost  | NULL      | [EMAIL="oxadmin@example.com"]oxadmin@example.com[/EMAIL] | NULL       |           1 | en_US             |               -1 | localhost  | Europe/Berlin | Af.iibkNjIBY2 |         1 | {CRYPT}      |      5001 |      5000 | /tmp/foo      | /bin/bash  | 
    |   1 | 24 | localhost  | NULL      | [EMAIL="dqiu@35post.com"]dqiu@35post.com[/EMAIL]     | NULL       |           1 | en_US             |               -1 | localhost  | Asia/Shanghai | aiV0aJdZoITcs |        23 | {CRYPT}      |      5023 |      5000 | /tmp/foo      | /bin/bash  | 
    |   1 | 26 | localhost  | NULL      | [EMAIL="sweng@35post.com"]sweng@35post.com[/EMAIL]    | NULL       |           1 | en_US             |               -1 | localhost  | Asia/Shanghai | zIvuuyajsHETU |        25 | {CRYPT}      |      5025 |      5000 | /tmp/foo      | /bin/bash  | 
    +-----+----+------------+-----------+---------------------+------------+-------------+-------------------+------------------+------------+---------------+---------------+-----------+--------------+---------
    and the login2user table is like:
    Code:
    mysql> select * from login2user;
    +-----+----+---------+
    | cid | id | uid     |
    +-----+----+---------+
    |   1 |  2 | oxadmin | 
    |   1 | 24 | dqiu    | 
    |   1 | 26 | sweng   | 
    +-----+----+---------+
    3 rows in set (0.00 sec)
    I hope postfix authenticate can get data from user or login2user table.
    Any suggersion are very appreciated.
    Last edited by Stefan Preuss; 03-16-2007, 12:46 PM. Reason: please use the code tag!
Working...
X