From owner-freebsd-questions@FreeBSD.ORG Fri Jul 30 09:56:52 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53D0216A4CE for ; Fri, 30 Jul 2004 09:56:52 +0000 (GMT) Received: from fwall.in.markiza.sk (fwall.in.markiza.sk [62.168.76.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 394B443D6A for ; Fri, 30 Jul 2004 09:56:51 +0000 (GMT) (envelope-from corwin@aeternal.net) Received: from localhost (localhost.markiza.sk [127.0.0.1]) by fwall.in.markiza.sk (Postfix) with ESMTP id 4129E22FA4 for ; Fri, 30 Jul 2004 11:56:49 +0200 (CEST) Received: from fwall.in.markiza.sk ([127.0.0.1]) by localhost (fwall.in.markiza.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 59509-09 for ; Fri, 30 Jul 2004 11:56:46 +0200 (CEST) Received: from pleiades.aeternal.net (pleiades.in.markiza.sk [192.168.13.7]) by fwall.in.markiza.sk (Postfix) with ESMTP id 6359122FA2 for ; Fri, 30 Jul 2004 11:56:46 +0200 (CEST) Received: by pleiades.aeternal.net (Postfix, from userid 502) id 76DAD1703C; Fri, 30 Jul 2004 12:01:15 +0200 (CEST) Date: Fri, 30 Jul 2004 12:01:15 +0200 From: Martin Hudec To: freebsd-questions@freebsd.org Message-ID: <20040730100115.GD20690@pleiades.aeternal.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xB0nW4MQa6jZONgY" Content-Disposition: inline X-Copyright: (C) 2004 Martin Hudec X-Operating-System: FreeBSD pleiades.aeternal.net 5.2.1-RELEASE-p9 i386 X-PGP-Key: http://www.aeternal.net/corwin_aeternal.asc User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at web.markiza.sk Subject: postfix, saslauthd, pam_mysql - wrong username is being send X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Martin Hudec List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 09:56:52 -0000 --xB0nW4MQa6jZONgY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I have postfix set up using saslauthd to authenticate against mysql database with pam_mysql. Usernames are stored in database like "user@domain.tld" (username with @ and domain is used because I have multiple domains virtualhosted there). But I am unable to authenticate because I am not getting whole username sent. I am getting just "username", not whole "username@domain.tld). Can anyone help and tell me how to get whole username to select from database please? In pam.conf: smtpd auth required pam_mysql.so user=3Dpostfix passwd=3D****** db=3Dpostfi= x table=3Dmailbox usercolumn=3Dusername passwdcolumn=3Dpassword crypt=3D1 smtp auth required pam_mysql.so user=3Dpostfix passwd=3D****** db=3Dpostfix= table=3Dmailbox usercolumn=3Dusername passwdcolumn=3Dpassword crypt=3D1 In smtpd.conf: pwcheck_method: saslauthd mech_list: plain login In auth.log: Jul 30 11:46:02 amber postfix/smtpd[58005]: sql_select option missing Jul 30 11:46:02 amber postfix/smtpd[58005]: auxpropfunc error no mechanism = available=20 Jul 30 11:46:40 amber saslauthd[57854]: pam_mysql: select returned more tha= n one result Jul 30 11:46:40 amber saslauthd[57854]: do_auth : auth failure: [us= er=3Dtaker] [service=3Dsmtp] [realm=3Daeternal.net] [mech=3Dpam] [reason=3D= PAM auth error] NOTE: sql_select option missing and auxpropfunc error are there maybe because I miss some things in smtpd.conf. Correct? In maillog: Jul 30 11:46:40 amber postfix/smtpd[58005]: connect from unknown[192.168.0.= 39] Jul 30 11:46:40 amber postfix/smtpd[58005]: setting up TLS connection from = unknown[192.168.0.39] Jul 30 11:46:40 amber postfix/smtpd[58005]: TLS connection established from= unknown[192.168.0.39]: TLSv1 with cipher RC4-MD5 (128/128 bits) Jul 30 11:46:40 amber postfix/smtpd[58005]: warning: SASL authentication fa= ilure: Password verification failed Jul 30 11:46:40 amber postfix/smtpd[58005]: warning: unknown[192.168.0.39]:= SASL PLAIN authentication failed Jul 30 11:46:40 amber postfix/smtpd[58005]: lost connection after AUTH from= unknown[192.168.0.39] Jul 30 11:46:40 amber postfix/smtpd[58005]: disconnect from unknown[192.168= =2E0.39] In mysql.log: 040730 11:46:40 240 Connect postfix@localhost on postfix 240 Init DB postfix 240 Query SELECT password FROM mailbox WHERE user= name=3D'taker' 240 Quit Thank you, Martin --=20 Martin Hudec | corwin at aeternal.net | corwin at web.markiza.sk http://www.aeternal.net | cell +421 907 303 393 --xB0nW4MQa6jZONgY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBChxrZYEZIv+rgggRApJQAKCUgzJfq0fPjXYumUGQ71yfKdXYTgCfXybZ w/JWbjuJcsg9AofXcaIfUHw= =Z58B -----END PGP SIGNATURE----- --xB0nW4MQa6jZONgY--