[Postfix espanol] Postfix+Courier+MySQL

Kike krm en futurnet.es
Jue Ago 1 11:23:02 CEST 2002


Hola lista, 

Tengo un problema con Postfix+Courier+MySQL y es que el correo llega 
correctamente a sus maildir's correspondientes pero, cuando el usuario 
va a hacer POP no autentifica la contraseña, os pongo partes de la 
configuración: 

Estos son los paquetes que estan instalados en la maquina 

------------- 
kenny:/home/krm# dpkg -l |grep "courier\|postfix" 
ii  courier-authda 0.37.3-2.1     Courier Mail Server authentication 
daemon 
ii  courier-authmy 0.37.3-2.1     MySQL Authentication for Courier Mail 
Server 
ii  courier-base   0.37.3-2.1     Courier Mail Server Base System 
ii  courier-debug  0.37.3-2.1     Debugging Tools for Courier Mail 
Server 
ii  courier-pop    0.37.3-2.1     POP3 daemon with PAM and Maildir 
support 
ii  postfix        1.1.11-0.woody A high-performance mail transport 
agent 
ii  postfix-ldap   1.1.11-0.woody LDAP map support for Postfix 
ii  postfix-mysql  1.1.11-0.woody MYSQL map support for Postfix 
ii  postfix-pcre   1.1.11-0.woody PCRE map support for Postfix 
----------------- 

Este es el postconf -n 

----------------- 
kenny:/home/krm# postconf -n 
command_directory = /usr/sbin 
config_directory = /etc/postfix 
daemon_directory = /usr/lib/postfix 
debug_peer_level = 2 
home_mailbox = Maildir/ 
local_transport = virtual 
mail_spool_directory = /var/spool/mail 
mailq_path = /usr/bin/mailq 
mydestination = $myhostname, localhost.$mydomain 
mydomain = foo.org 
myhostname = foo.org 
mynetworks = 127.0.0.0/8, 192.168.0.0/24 
myorigin = $mydomain 
newaliases_path = /usr/bin/newaliases 
sendmail_path = /usr/lib/sendmail 
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) 
virtual_gid_maps = mysql:/etc/postfix/ids.cf 
virtual_mailbox_base = / 
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virt.cf 
virtual_uid_maps = mysql:/etc/postfix/ids.cf 
--------------- 

--------------- 
kenny:/home/krm# cat /etc/postfix/mysql_virt.cf 
user = postfix 
password = postfix 
dbname = mail 
table = post_users 
select_field = maildir 
where_field = id 
hosts = localhost 
----------------- 

----------------- 
kenny:/home/krm# cat /etc/postfix/ids.cf 
user = postfix 
password = postfix 
dbname = mail 
table = post_users 
select_field = uid 
where_field = id 
hosts = localhost 
------------------ 

Esta es la configuración de Courier 

------------------ 
kenny:/home/krm# cat /etc/courier/authdaemonrc 
authmodulelist="authmysql" 
authmodulelistorig="authcustom authcram authuserdb authldap authmysql 
authpam" 
daemons=5 
version="" 
authdaemonvar=/var/run/courier/authdaemon 
------------------ 

------------------ 
kenny:/home/krm# cat /etc/courier/authmysqlrc 
MYSQL_SERVER localhost 
MYSQL_USERNAME postfix 
MYSQL_PASSWORD postfix 
MYSQL_SOCKET /var/mysql/mysql.sock 
MYSQL_DATABASE mail 
MYSQL_USER_TABLE post_users 
MYSQL_CLEAR_PWFIELD password 
MYSQL_MAILDIR_FIELD maildir 
DEFAULT_DOMAIN foo.org 
MYSQL_PORT 3306 
MYSQL_GID_FIELD gid 
MYSQL_UID_FIELD uid 
MYSQL_LOGIN_FIELD id 
------------------- 

------------------- 
kenny:/home/krm# cat /etc/courier/pop3d 
prefix=/usr 
exec_prefix=/usr 
sbindir="/usr/sbin" 
PIDFILE=/var/run/courier/pop3d.pid 
MAXDAEMONS=40 
MAXPERIP=4 
AUTHMODULES="authdaemon" 
AUTHMODULES_ORIG="authdaemon" 
POP3AUTH="" 
POP3AUTH_ORIG="LOGIN CRAM-MD5 CRAM-SHA1" 
POP3AUTH_TLS="" 
POP3AUTH_TLS_ORIG="LOGIN PLAIN" 
PORT=110 
ADDRESS=0 
TCPDOPTS="-nodnslookup -noidentlookup" 
POP3DSTART=YES 
----------------- 


Cuando intento autentificar al usuario, da el siguiente error 

kenny:/home/krm# courierauthtest krm en foo.org
Temporary authentication failure from module authdaemon 
Authentication FAILED! 

Sin embargo, si como authmodulelist lo pongo como authpam no hay ningun 
problema y con el comando anterior me autentifica sin problemas. 

Esta es la estructura de la base de datos en mysql 


mysql> desc post_users; 
+----------+--------------+------+-----+---------+-------+ 
| Field    | Type         | Null | Key | Default | Extra | 
+----------+--------------+------+-----+---------+-------+ 
| id       | varchar(128) |      | PRI |         |       | 
| password | varchar(128) | YES  |     | NULL    |       | 
| uid      | int(10)      | YES  |     | NULL    |       | 
| gid      | int(10)      | YES  |     | NULL    |       | 
| home     | varchar(255) | YES  |     | NULL    |       | 
| maildir  | varchar(255) | YES  |     | NULL    |       | 
+----------+--------------+------+-----+---------+-------+ 
6 rows in set (0.00 sec) 


Y aqui su contenido 

mysql> select * from post_users; 
+----------------------+------------------+------+------+------+---------------------------------+ 
| id                   | password         | uid  | gid  | home | 
maildir                         | 
+----------------------+------------------+------+------+------+---------------------------------+ 
| krm en foo.org | 1b1ddc9457xx26f7 | 1000 | 1000 | /    | 
/var/spool/postfix/virtual/krm/ | 
+----------------------+------------------+------+------+------+---------------------------------+ 
1 row in set (0.02 sec) 



Si alguien, le ha pasado algo parecido, ya no se por donde mirar. 


Kike 



------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://lists.wl0.org/pipermail/postfix-es/attachments/20020801/7f278605/attachment.htm


Más información sobre la lista de distribución Postfix-es