Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   *nix (https://forum.antichat.xyz/forumdisplay.php?f=43)
-   -   Postfix+Courier+MySQL Ubuntu 8.10 (https://forum.antichat.xyz/showthread.php?t=95793)

andrey_a87 10.12.2008 22:00

Postfix+Courier+MySQL Ubuntu 8.10
 
tail -f /var/log/mail.log
Dec 10 19:59:26 ubuntu authdaemond: authmysql: MYSQL_SERVER nor MYSQL_SOCKET set in/etc/courier/authmysqlrc.
Dec 10 19:59:26 ubuntu imapd: LOGIN FAILED, user=sales@xxx.ru, ip=[::ffff:127.0.0.1]
Dec 10 19:59:26 ubuntu imapd: authentication error: Input/output error


etc/courier/authdaemonrc
__________________________
authmodulelist="authmysql"
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
daemons=5
authdaemonvar=/var/run/courier/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""


etc/courier/authmysqlrc
___________________________
MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD xxxx
MYSQL_PORT 3306
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
MYSQL_QUOTA_FIELD quota


root@ubuntu:~# telnet localhost pop3
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user sales@xxx.ru
+OK Password required.
pass xxxxx
-ERR Temporary problem, please try again later
Connection closed by foreign host.

neval 10.12.2008 22:42

путь к MYSQL_SOCKET укажи в /etc/courier/authmysqlrc
покажи что у тебя в /etc/pam.d/pop3

andrey_a87 10.12.2008 22:58

# PAM configuration file for Courier POP3 daemon

@include common-auth
@include common-account
@include common-password
@include common-session

andrey_a87 10.12.2008 22:59

когда указываешь путь пишет тоже самое...

neval 11.12.2008 11:29

Попробуй сделать авторизацию через РАМ. Укажи в /etc/pam.d/pop3 следующее.

Код:

auth    optional      pam_mysql.so host=localhost db=БД ser=Пользователь БД passwd=Пароль к БД table=Таблица с пользователями usercolumn=Поле с логином passwdcolumn=Поле с паролем crypt=В каком виде пароль в БД (0 = в чистом)
account  required      pam_mysql.so  host=localhost db=БД ser=Пользователь БД passwd=Пароль к БД table=Таблица с пользователями usercolumn=Поле с логином passwdcolumn=Поле с паролем crypt=В каком виде пароль в БД (0 = в чистом)

Это для того, что бы РАМ брал данные для авторизации из твоей БД.
Все остальное закоментируй.

В /etc/courier/authdaemonrc посмотри, правильный путь к authdaemonvar, убери лишнее из authmodulelistorig, оставь authpam и authmysql
Так же посматривай в messages - лог или используй strace


Время: 02:01