Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) I followed this howto, however. it doesn't work. I get authentication failure all the time. I'm troubleshooting for over a week now and the final ( at least, I hope...) error is it can't authenticate. Code: acme:/home/me# telnet localhost pop3 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. +OK Hello there. user postmaster +OK Password required. pass ******** -ERR Login failed. quit +OK Better luck next time. Connection closed by foreign host. I type the password correct, I can login using mysql. syslog tells me this: Code: Jan 17 18:29:14 acme courierpop3login: Connection, ip=[::ffff:127.0.0.1] Jan 17 18:29:23 acme authdaemond.mysql: received auth request, service=pop3, aut htype=login Jan 17 18:29:23 acme authdaemond.mysql: authmysql: trying this module Jan 17 18:29:23 acme authdaemond.mysql: SQL query: SELECT email, password, "", 5 000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_IND EX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = "postmaster" Jan 17 18:29:23 acme authdaemond.mysql: zero rows returned Jan 17 18:29:23 acme authdaemond.mysql: no password available to compare Jan 17 18:29:23 acme authdaemond.mysql: authmysql: REJECT - try next module Jan 17 18:29:23 acme authdaemond.mysql: FAIL, all modules rejected Jan 17 18:29:28 acme courierpop3login: LOGIN FAILED, ip=[::ffff:127.0.0.1] Jan 17 18:29:32 acme courierpop3login: LOGOUT, ip=[::ffff:127.0.0.1] It seems the password is not recognised /etc/courier/authmysqlrc Code: MYSQL_SERVER localhost MYSQL_USERNAME mail_admin MYSQL_PASSWORD ************ MYSQL_PORT 0 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 /etc/postfix/main.cf Code: # See /usr/share/postfix/main.cf.dist for a commented, more complete version smtpd_banner = $myhostname ESMTP $mail_name biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h myhostname = mail.medendo.nl alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = acme.medendo.nl,localhost, localhost.localdomain relayhost = mynetworks = 127.0.0.0/8 mailbox_command = mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_tls_auth_only = no smtp_use_tls = yes smtpd_use_tls = yes smtp_tls_note_starttls_offer = yes smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom home_mailbox = Maildir/ virtual_maps = hash:/etc/postfix/virtusertable mydestination = mail.medendo.nl, localhost, localhost.localdomain virtual_alias_domains = virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf virtual_mailbox_base = /home/vmail virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf virtual_create_maildirsize = yes virtual_mailbox_extended = yes virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf virtual_mailbox_limit_override = yes virtual_maildir_limit_message = "The user you are trying to reach is over quota." virtual_overquota_bounce = yes proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps content_filter = amavis:[127.0.0.1]:10024 receive_override_options = no_address_mappings Can anybody please tell me what I'm doing wrong?
Please check all your configuration files against those from the tutorial. http://www.howtoforge.com/forums/showthread.php?t=1941 http://www.howtoforge.com/forums/showthread.php?t=1715 http://www.howtoforge.com/forums/showthread.php?t=2011 http://www.howtoforge.com/forums/showthread.php?t=2071