Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th January 2006, 18:38
medendo medendo is offline
Junior Member
 
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Authentication failure postfix-mysql

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?
Reply With Quote
Sponsored Links
  #2  
Old 17th January 2006, 20:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

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
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th January 2006, 23:11
medendo medendo is offline
Junior Member
 
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

The 1st one did it, I feel so stupid ... @ domain.tld forgotten while logging in
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota... killfrog HOWTO-Related Questions 3 25th September 2009 21:45
Backup the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Qu rogierbanis HOWTO-Related Questions 1 13th January 2006 09:34
Virtual Users And Domains With Postfix, Courier And MySQL: POP/IMAP authentication SeanG HOWTO-Related Questions 3 1st January 2006 17:08
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04
Removed PostFix, Now MySql Problems!!! sapient Installation/Configuration 10 24th October 2005 07:11


All times are GMT +2. The time now is 03:34.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.