Re: Postfix - Sasl - mysql

2004-11-10 Thread Andrew L. Gould
On Wednesday 10 November 2004 07:07 am, Svein Gullby wrote:
> Hi !
>
>
>
> I'm sending you this mail because you've fixed a postfix problem at
> the same stage that I have problems now.
>
>
>
> What ./configure parameters did you use to get Cyrus SASL2 to work
> with MySQL ?
>
>
>
> Mvh
>
> Svein Gullby
>
> ICT Teamleader - Technology
>
> Astrup Fearnley AS

The link below will lead you to many how-to's regarding various 
combinations of postfix and related applications:

http://www.postfix.org/docs.html

Best regards,

Andrew Gould
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Postfix - Sasl - mysql

2004-11-10 Thread Svein Gullby
Hi !

 

I'm sending you this mail because you've fixed a postfix problem at the same 
stage that I have problems now.

 

What ./configure parameters did you use to get Cyrus SASL2 to work with MySQL ?

 

Mvh

Svein Gullby

ICT Teamleader - Technology

Astrup Fearnley AS

 

Tlf22 93 60 00Fax: 22 93 60 93

Dir:   22 93 60 75Mobil: 99164918

PB 1158, Sentrum, 0107 Oslo

Besøksadresse: Grev Wedels plass 9

[EMAIL PROTECTED]  

Besøk vår web: www.fearnleys.com  

 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Postfix + SASL + MySQL,,What did I miss >"

2004-07-28 Thread ¿WÃÈ LanceLoTest
Hi, everyone
Originally, I used /usr/local/etc/sasldb2 to store accounts/passwords(plain 
text) data,
and used Mozilla Thunderbird as my MUA. I can pass the SASL 
authentication(both smtp and imap) successfully.

After that, I wanted to use MySQL to store accounts/passwords(plain text),
but I got fail of SASL authentication.
I am using FreeBSD 5.2 release, and have complete installed these softwares 
from port:
cyrus-imapd-2.2.6
cyrus-sasl-2.1.19
cyrus-sasl-saslauthd-2.1.19
postfix-2.1.4,1 (build with MySQL)

I follow these instructions to set up smtpd.conf
http://lists.freebsd.org/mailman/htdig/freebsd-questions/2004-April/042847.html
http://lists.freebsd.org/pipermail/freebsd-questions/2004-March/039296.html
I have been searched and read many documents on mail-listing and google, but 
I still don't
know what I miss @@, and /var/log/maillog doesn't provide enough information 
to me to solve
the problem. I am sure that I have enter correct accounts/passwords.

Please note that it works well with /usr/local/etc/sasldb2, but not MySQL 
>"<
It seems to me that it doesn't talk to MySQL at all, because I tried
to use incorrect sql_user/sql_passwd in smtpd.conf, it gived me the same log 
in /var/log/maillog

Please give me some hints to fix this problem, I have tried it for several 
weeks, kind of tired,
but I don't want to give up. Thank you in advance.

These are some logs, and configurations:
(the accounts and password are real, you can test it if you want)
# cat /var/log/maillog
Jul 27 21:09:01 me postfix/smtpd[771]: connect from 
S01060050fc412395.vf.shawcable.net[70.68.235.3]
Jul 27 21:09:04 me postfix/smtpd[771]: warning: SASL authentication failure: 
Password verification failed
Jul 27 21:09:04 me postfix/smtpd[771]: warning: 
S01060050fc412395.vf.shawcable.net[70.68.235.3]: SASL PLAIN authentication 
failed
Jul 27 21:09:05 me postfix/smtpd[771]: warning: 
S01060050fc412395.vf.shawcable.net[70.68.235.3]: SASL LOGIN authentication 
failed
Jul 27 21:09:11 me postfix/smtpd[771]: lost connection after AUTH from 
S01060050fc412395.vf.shawcable.net[70.68.235.3]
Jul 27 21:09:11 me postfix/smtpd[771]: disconnect from 
S01060050fc412395.vf.shawcable.net[70.68.235.3]

mysql> use mail;
mysql> select * from user;
++--+--+-+---++
| ID | USERNAME | PASSWORD | FORWARD | DOMAIN| MAIL  
 | FILTER
++--+--+-+---++
|  1 | test | zz   | test| me.uos.idv.tw | [EMAIL PROTECTED]
 | OK
|  2 | cyrus| zz   | cyrus   | me.uos.idv.tw | [EMAIL PROTECTED]   
 | OK
|  3 | kkk  | zz   | kkk | me.uos.idv.tw | 
[EMAIL PROTECTED] | OK
++--+--+-+---++
3 rows in set (0.02 sec)

I have these parameters in main.cf:
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sender_restrictions =
   permit_mynetworks,
   permit_sasl_authenticated,
   reject_non_fqdn_sender
smtpd_recipient_restrictions =
   permit_mynetworks,
   permit_sasl_authenticated,
   permit_auth_destination,
   permit_mx_backup,
   check_relay_domains,
   reject_unknown_recipient_domain,
   reject_non_fqdn_recipient,
   reject_unauth_destination,
   reject
smtpd_client_restrictions =
   permit_mynetworks
   permit_sasl_authenticated
   reject_unauth_pipelining
   reject_unknown_client
# cat /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine: mysql
sql_hostnames: localhost
sql_user: mail
sql_passwd: secret
sql_database: mail
sql_select: select PASSWORD from user where USERNAME='%u'
sql_verbose: true
I have tried to change auxprop_plugin: mysql and USERNAME='[EMAIL PROTECTED]' as well.
_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Postfix - Sasl - mysql

2004-04-07 Thread Brent Wiese
> I used those instructions, although I modified some for my specific
> configuration.  the "username" field in my database is
> "[EMAIL PROTECTED]" however. 

Yes, that is how mine is.

> I had to create a 
> plain-text password

This is what I want to avoid. I think this is what the patch listed on the
howto.net page is supposed to fix, but it doesn't apply right for me.

> Here's my working smtpd.conf:
> 
> # smtpd.conf
> pwcheck_method: auxprop
> auxprop_plugin: sql
> mech_list: plain login
> 
> sql_engine: mysql
> sql_hostnames: localhost
> sql_user: postfix-user
> sql_passwd: thepassword
> sql_database: postfix
> sql_select: select pass_plain from mailbox where username='[EMAIL PROTECTED]'

Once I cleaned up my syntax (per another post, thanks!) while comparing to
this, I'm now able to check the DB correctly (I turned on MySQL logging to
make sure), except for the whole encrypted vs plaintext thing.

If I use PAM, is that going to break courier-IMAP?

Anyone succesfully patched a recent ( => .17) cyrus-sasl2 to use encrypted
passwords in MySQL?

Thanks for all the help, I think I'm nearly there. :)

Brent


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Postfix - Sasl - mysql

2004-04-07 Thread Drew Tomlinson
On 4/7/2004 12:32 PM Brent Wiese wrote:

Brent Wiese wrote:
   

I (tried) following the instructions at:
http://high5.net/howto/
I have postfix virtual users working in MySQL. I have 
 

courier imap/pop3
   

working w/ virtual users. I wanted to add SMTP auth.

I added the cyrus-sasl2 port (also chose support for it in 
 

postfix port)
   

"WITH_MYSQL".

No go.

I added the following lines to 
 

/usr/local/lib/sasl2/smtpd.conf (found this
   

in another faq/tutorial, so it may be incorrect)

sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql 
 

  sql_engine: mysql
  mech_list: login plain crammd6 digestmd5
   

sql_user: postfix-user
sql_passwd: thepassword
sql_database: postfix
sql_statement: SELECT password FROM mailbox WHERE username = '%u'
sql_verbose: yes
 

That works for me..
   

No go. Still getting "no user in db" in /var/log/maillog.

I get:
postfix/smtpd[23761]: sql_select option missing
postfix/smtpd[23761]: auxpropfunc error no mechanism available
In /var/log/messages
I turned on logging in mysql and it didn't log any queries.

Any other suggestions?
 

Have you verified that "smtpd_sasl_local_domain =" and not 
"smtpd_sasl_local_domain =$myhostname" as shown in the how-to?  Although 
I wasn't using MySQL, I still got the "no user in db" and "no secret in 
database" messages you were getting.  It stumped me for weeks until I 
stumbled across the Postfix bug tidbit on the web.  I'd be real curious 
to know if that solves your problems.

Cheers,

Drew
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Postfix - Sasl - mysql

2004-04-07 Thread Aaron Peterson

>> > I added the cyrus-sasl2 port (also chose support for it in
>> postfix port)
>> > "WITH_MYSQL".
>> >
>> > No go.
>> >
>> > I added the following lines to
>> /usr/local/lib/sasl2/smtpd.conf (found this
>> > in another faq/tutorial, so it may be incorrect)
>> >
>> > sasl_pwcheck_method: auxprop
>> > sasl_auxprop_plugin: sql
>>sql_engine: mysql
>>mech_list: login plain crammd6 digestmd5
>> > sql_user: postfix-user
>> > sql_passwd: thepassword
>> > sql_database: postfix
>> > sql_statement: SELECT password FROM mailbox WHERE username = '%u'
>> > sql_verbose: yes

I used those instructions, although I modified some for my specific
configuration.  the "username" field in my database is
"[EMAIL PROTECTED]" however.  I had to create a plain-text password
field that i modified the php scripts to create as part of the normal
process of things because the auxprop plugin alone didn't understand
anything but plain text.  you can use the PAM sasl plugin from what I
understand, and configure pam to use mysql with it's native plugin in
order to use encrypted passwords in the mysql database.  I haven't looked
at this stuff in a while, so my memory isn't so clear and things may have
changed...

Here's my working smtpd.conf:

# smtpd.conf
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login

sql_engine: mysql
sql_hostnames: localhost
sql_user: postfix-user
sql_passwd: thepassword
sql_database: postfix
sql_select: select pass_plain from mailbox where username='[EMAIL PROTECTED]'

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Postfix - Sasl - mysql

2004-04-07 Thread Remko Lodder
Hi Brent,


No go. Still getting "no user in db" in /var/log/maillog.

I get:
postfix/smtpd[23761]: sql_select option missing
postfix/smtpd[23761]: auxpropfunc error no mechanism available
In /var/log/messages
Oh typo :( SQL_Statement => SQL_Select)

Is SQL (MySQL) Support included within your installation?
What Mechlist did you enable? Are those included in your installation as 
well?

Cheers

I turned on logging in mysql and it didn't log any queries.

Any other suggestions?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


--

Kind regards,

Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl A Dutch community for helping newcomers on the 
hackerscene
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Postfix - Sasl - mysql

2004-04-07 Thread Brent Wiese
> Brent Wiese wrote:
> > I (tried) following the instructions at:
> > http://high5.net/howto/
> > 
> > I have postfix virtual users working in MySQL. I have 
> courier imap/pop3
> > working w/ virtual users. I wanted to add SMTP auth.
> > 
> > I added the cyrus-sasl2 port (also chose support for it in 
> postfix port)
> > "WITH_MYSQL".
> > 
> > No go.
> > 
> > I added the following lines to 
> /usr/local/lib/sasl2/smtpd.conf (found this
> > in another faq/tutorial, so it may be incorrect)
> > 
> > sasl_pwcheck_method: auxprop
> > sasl_auxprop_plugin: sql 
>sql_engine: mysql
>mech_list: login plain crammd6 digestmd5
> > sql_user: postfix-user
> > sql_passwd: thepassword
> > sql_database: postfix
> > sql_statement: SELECT password FROM mailbox WHERE username = '%u'
> > sql_verbose: yes
> > 
> 
> That works for me..

No go. Still getting "no user in db" in /var/log/maillog.

I get:
postfix/smtpd[23761]: sql_select option missing
postfix/smtpd[23761]: auxpropfunc error no mechanism available
In /var/log/messages

I turned on logging in mysql and it didn't log any queries.

Any other suggestions?


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Postfix - Sasl - mysql

2004-04-06 Thread Remko Lodder
Brent Wiese wrote:
I (tried) following the instructions at:
http://high5.net/howto/
I have postfix virtual users working in MySQL. I have courier imap/pop3
working w/ virtual users. I wanted to add SMTP auth.
I added the cyrus-sasl2 port (also chose support for it in postfix port)
"WITH_MYSQL".
No go.

I added the following lines to /usr/local/lib/sasl2/smtpd.conf (found this
in another faq/tutorial, so it may be incorrect)
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql 
  sql_engine: mysql
  mech_list: login plain crammd6 digestmd5
sql_user: postfix-user
sql_passwd: thepassword
sql_database: postfix
sql_statement: SELECT password FROM mailbox WHERE username = '%u'
sql_verbose: yes
That works for me..
--
Kind regards,

Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl A Dutch community for helping newcomers on the 
hackerscene
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Postfix - Sasl - mysql

2004-04-06 Thread Drew Tomlinson
Brent Wiese told a big fish story including the following on 04/06/2004 
5:40 PM:

I (tried) following the instructions at:
http://high5.net/howto/
I have postfix virtual users working in MySQL. I have courier imap/pop3
working w/ virtual users. I wanted to add SMTP auth.
I added the cyrus-sasl2 port (also chose support for it in postfix port)
"WITH_MYSQL".
No go.

I added the following lines to /usr/local/lib/sasl2/smtpd.conf (found this
in another faq/tutorial, so it may be incorrect)
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: mysql login plain crammd6 digestmd5
mysql_user: postfix-user
mysql_passwd: thepassword
mysql_database: postfix
mysql_statement: SELECT password FROM mailbox WHERE username = '%u'
mysql_verbose: yes
(I also tried "sasl_" in front of all the lines).

When I try to use SMTP Auth from Outlook Express, I get this in the logs:

Apr  6 20:35:01 server01 postfix/smtpd[22279]: warning: SASL authentication
failure: no user in db
Apr  6 20:35:01 server01 postfix/smtpd[22279]: warning: SASL authentication
failure: no secret in database
Apr  6 20:35:01 server01 postfix/smtpd[22279]: warning:
swing.bjwcs.com[208.185.25.11]: SASL NTLM authentication failed
I'm using cyrus-sasl-2.1.18 and postfix 2.0.19.

I also tried compiling w/ the patch listed in that tutorial link above, but
it breaks. I read somewhere that mysql stuff changed in cyrus-sasl-2.1.17.
Any help? I think I'm really close... I'm just so frustrated at this point,
I'm probably no longer thinking clearly.
 

I wasn't using mysql but had similar problems setting up SASL with 
Postfix.  After lots of searching, I finally found the answer and posted 
it to the list.  You can find my post here:

http://lists.freebsd.org/pipermail/freebsd-security/2003-July/000517.html

Maybe this will help you as my errors were similar.

Good Luck,

Drew
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Postfix - Sasl - mysql

2004-04-06 Thread Brent Wiese
I (tried) following the instructions at:
http://high5.net/howto/

I have postfix virtual users working in MySQL. I have courier imap/pop3
working w/ virtual users. I wanted to add SMTP auth.

I added the cyrus-sasl2 port (also chose support for it in postfix port)
"WITH_MYSQL".

No go.

I added the following lines to /usr/local/lib/sasl2/smtpd.conf (found this
in another faq/tutorial, so it may be incorrect)

sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: mysql login plain crammd6 digestmd5
mysql_user: postfix-user
mysql_passwd: thepassword
mysql_database: postfix
mysql_statement: SELECT password FROM mailbox WHERE username = '%u'
mysql_verbose: yes

(I also tried "sasl_" in front of all the lines).

When I try to use SMTP Auth from Outlook Express, I get this in the logs:

Apr  6 20:35:01 server01 postfix/smtpd[22279]: warning: SASL authentication
failure: no user in db
Apr  6 20:35:01 server01 postfix/smtpd[22279]: warning: SASL authentication
failure: no secret in database
Apr  6 20:35:01 server01 postfix/smtpd[22279]: warning:
swing.bjwcs.com[208.185.25.11]: SASL NTLM authentication failed

I'm using cyrus-sasl-2.1.18 and postfix 2.0.19.

I also tried compiling w/ the patch listed in that tutorial link above, but
it breaks. I read somewhere that mysql stuff changed in cyrus-sasl-2.1.17.

Any help? I think I'm really close... I'm just so frustrated at this point,
I'm probably no longer thinking clearly.

Thanks!
Brent


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"