[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

postfix+courier-imap+sasl+mysql=confusion



The server is on sid,  kernel  2.6.8-2-386.
I used the following tutorial: http://workaround.org/articles/ispmail-sarge
I am able to telnet into the smtp part and send an email but am not able
to log into the imap server...
I'll put the config files on the bottom. 




from var/log/auth:
 postfix/smtpd[3012]: sql auxprop plugin using mysql
engine                                        
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin Parse the
username xxx@drizzt3.ath.cx                            
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin try and connect
to a host                                         
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin trying to open
db 'xxxx' on host '127.0.0.1'                  
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: begin
transaction                                                            
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin create statement
from userPassword xxxx drizzt3.ath.cx            
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin doing query
SELECT password FROM users WHERE email = 'xxxx@drizzt3.
ath.cx';                                                                                                                  

Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin create statement
from cmusaslsecretCRAM-MD5 xxxx drizzt3.ath.cx   
Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: sql plugin doing query
SELECT password FROM users WHERE email = 'xxxx@drizzt3.
ath.cx';                                                                                                                  

Apr 19 22:46:25 drizzt3 postfix/smtpd[3012]: commit transaction  

from /var/log/mail.err:
drizzt3 imaplogin: LOGIN FAILED,
ip=[::ffff:24.105.160.163]                                               
Apr 20 08:47:17 drizzt3 last message repeated 3
times                                                                     
Apr 20 09:39:52 drizzt3 imaplogin: LOGIN FAILED,
ip=[::ffff:24.105.160.162]                                               
Apr 20 09:39:56 drizzt3 imaplogin: DISCONNECTED,
ip=[::ffff:24.105.160.162], time=9

from /var/log/mail.info
 drizzt3 imaplogin: LOGIN: DEBUG: ip=[::ffff:24.105.160.162],
command=CAPABILITY                           
Apr 20 09:39:46 drizzt3 imaplogin: LOGIN: DEBUG:
ip=[::ffff:24.105.160.162], command=LOGIN                                
Apr 20 09:39:46 drizzt3 imaplogin: LOGIN: DEBUG:
ip=[::ffff:24.105.160.162], username=xxxxx                
Apr 20 09:39:46 drizzt3 imaplogin: LOGIN: DEBUG:
ip=[::ffff:24.105.160.162], password=xxxxxx 
Apr 20 09:39:52 drizzt3 imaplogin: LOGIN FAILED,
ip=[::ffff:24.105.160.162]                                               
Apr 20 09:39:56 drizzt3 imaplogin: DISCONNECTED,
ip=[::ffff:24.105.160.162], time=9   

from syslog:
drizzt3 imaplogin: authdaemon: starting client
module                                                     
Apr 20 09:39:47 drizzt3 imaplogin: authdaemon: TEMPFAIL - no more
modules will be tried                                   
Apr 20 09:39:52 drizzt3 imaplogin: LOGIN FAILED,
ip=[::ffff:24.105.160.162]                                               
Apr 20 09:39:56 drizzt3 imaplogin: DISCONNECTED,
ip=[::ffff:24.105.160.162], time=9 

cat /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no                      
append_dot_mydomain = no       
delay_warning_time = 4h        
myhostname = drizzt3.ath.cx    
alias_maps = hash:/etc/aliases 
alias_database = hash:/etc/aliases
myorigin = /etc/mailname       
mydestination = $myhostname, localhost.$mydomain, $mydomain
relayhost = $mydomain
mynetworks = xxx.xxx.xxx.xxx/29, 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# Extra stuff from how-to
#
virtual_alias_maps =
mysql:/etc/postfix/mysql-virtual_forwardings.cf,mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_maildir_limit_message = Sorry, the user\u2019s maildir has
overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
smtpd_recipient_restrictions =
    permit_sasl_authenticated,
    reject_unauth_destination,
    permit_mynetworks,
    permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
smtpd_use_tls = yes
broken_sasl_auth_clients = yes
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings


cat /etc/postfix/sasl/smtpd.conf
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: blabla
sql_passwd: xxx
sql_database: xxx
sql_select: SELECT password FROM users WHERE email = '%u@%r'

cat /etc/courier/authmysqlrc
MYSQL_SERVER            localhost
MYSQL_USERNAME          xxx
MYSQL_PASSWORD          xxx
MYSQL_SOCKET            /var/run/mysqld/mysqld.sock
MYSQL_PORT              0
MYSQL_OPT               0
MYSQL_DATABASE          xxx
MYSQL_USER_TABLE        users
#MYSQL_CRYPT_PWFIELD    crypt
MYSQL_CLEAR_PWFIELD     password
DEFAULT_DOMAIN          drizzt3.ath.cx
#changed from 5000-vmail
MYSQL_UID_FIELD         5000
#changed from 5000-vmail
MYSQL_GID_FIELD         5000
MYSQL_LOGIN_FIELD       email
MYSQL_HOME_FIELD        "/home/vmail"
#MYSQL_NAME_FIELD       name
MYSQL_MAILDIR_FIELD     CONCAT(SUBSTRING_INDEX(email,'@',-1),
'/',SUBSTRING_INDEX(email,'@','/')
# MYSQL_QUOTA_FIELD     quota
# MYSQL_AUXOPTIONS_FIELD       
CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablewebmail=",disablewebmail,",sharedgroup=",sharedgroup)
# MYSQL_WHERE_CLAUSE    server='mailhost.example.com'


Let me know if more info is needed.  Thanks for your help.

Chris Parker



Reply to: