Discussion:
How to configure Cyrus/SASL
(too old to reply)
d***@custserv.com
2008-04-02 14:45:12 UTC
Permalink
This is a multi-part message in MIME format.

------_=_NextPart_001_01C894CC.2D9A20BE
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello,

I am a Cyrus/SASL newbie (BIGTIME) and I cannot figure out how to
configure SASL. Here is what I have:

SUSE version 10
Postfix 2.2.9
Cyrus-imapd 2.2.12
Cyrus-sasl 2.1.21

/etc/imapd.conf
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
sievedir: /var/lib/sieve
sieve_maxscriptsize: 32
sieve_maxscripts: 5
admins: *******
autocreatequota: 10000
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: auxprop
sasl_mech_list: PLAIN, CRAM-MD5
lmtp_overquota_perm_failure: no
unixhierarchysep: yes

/etc/imapd-local.conf
postmaster: postmaster
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
sievedir: /var/lib/sieve
sieve_maxscriptsize: 32
sieve_maxscripts: 5
admins: ******
allowanonymouslogin: no
allowplaintext: yes
sasl_mech_list: PLAIN
autocreatequota: 10000
reject8bit: no
quotawarn: 90
timeout: 30
poptimeout: 10
dracinterval: 0
drachost: localhost
sasl_pwcheck_method: auxprop
unixhierarchysep: yes

/usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd

/usr/lib64/sasl2/smtpd.conf
#pwcheck_method: saslauthd
mech_list: plain login

My questions are:
1) What is the difference between imapd.conf and imapd-local.conf? How
do I know which one I am using?
2) What is the difference between /usr/lib/sasl2/smtpd.conf and
/usr/lib64/sasl2/smtpd.conf? How do I know which one I am using?
3) I'm confused...am I currently using auxprop or saslauthd? How can I
tell? What is the difference?

Many Thanks!





------_=_NextPart_001_01C894CC.2D9A20BE
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7652.24">
<TITLE>How to configure Cyrus/SASL</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hello,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am a Cyrus/SASL newbie (BIGTIME) and =
I cannot figure out how to configure SASL.&nbsp; Here is what I =
have:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">SUSE version 10</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Postfix 2.2.9</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Cyrus-imapd 2.2.12</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Cyrus-sasl 2.1.21</FONT>
</P>

<P><U><B><FONT SIZE=3D2 FACE=3D"Arial">/etc/imapd.conf</FONT></B></U>

<BR><FONT SIZE=3D2 FACE=3D"Arial">configdirectory: /var/lib/imap</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">partition-default: =
/var/spool/imap</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sievedir: /var/lib/sieve</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sieve_maxscriptsize: 32</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sieve_maxscripts: 5</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">admins: *******</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">autocreatequota: 10000</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">reject8bit: no</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">quotawarn: 90</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">timeout: 30</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">poptimeout: 10</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dracinterval: 0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">drachost: localhost</FONT>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">sasl_pwcheck_method: =
auxprop</FONT></B>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">sasl_mech_list: PLAIN, =
CRAM-MD5</FONT></B>

<BR><FONT SIZE=3D2 FACE=3D"Arial">lmtp_overquota_perm_failure: no</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">unixhierarchysep: yes</FONT>
</P>

<P><U><B><FONT SIZE=3D2 =
FACE=3D"Arial">/etc/imapd-local.conf</FONT></B></U>

<BR><FONT SIZE=3D2 FACE=3D"Arial">postmaster: postmaster</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">configdirectory: /var/lib/imap</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">partition-default: =
/var/spool/imap</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sievedir: /var/lib/sieve</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sieve_maxscriptsize: 32</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sieve_maxscripts: 5</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">admins: ******</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">allowanonymouslogin: no</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">allowplaintext: yes</FONT>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">sasl_mech_list: PLAIN</FONT></B>

<BR><FONT SIZE=3D2 FACE=3D"Arial">autocreatequota: 10000</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">reject8bit: no</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">quotawarn: 90</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">timeout: 30</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">poptimeout: 10</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dracinterval: 0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">drachost: localhost</FONT>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">sasl_pwcheck_method: =
auxprop</FONT></B>

<BR><FONT SIZE=3D2 FACE=3D"Arial">unixhierarchysep: yes</FONT>
</P>

<P><U><B><FONT SIZE=3D2 =
FACE=3D"Arial">/usr/lib/sasl2/smtpd.conf</FONT></B></U>

<BR><FONT SIZE=3D2 FACE=3D"Arial">pwcheck_method: saslauthd</FONT>
</P>

<P><U><B><FONT SIZE=3D2 =
FACE=3D"Arial">/usr/lib64/sasl2/smtpd.conf</FONT></B></U>

<BR><FONT SIZE=3D2 FACE=3D"Arial">#pwcheck_method: saslauthd</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">mech_list: plain login</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">My questions are:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">1) What is the difference =
between</FONT><U></U><U><B> <FONT SIZE=3D2 =
FACE=3D"Arial">imapd.conf</FONT></B></U><B></B> <FONT SIZE=3D2 =
FACE=3D"Arial">and</FONT><U></U><U><B> <FONT SIZE=3D2 =
FACE=3D"Arial">imapd-local.conf</FONT></B></U><B></B><FONT SIZE=3D2 =
FACE=3D"Arial">?&nbsp; How do I know which one I am using?</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">2) What is the difference between =
/usr/</FONT><U></U><U><B><FONT SIZE=3D2 =
FACE=3D"Arial">lib</FONT></B></U><B></B><FONT SIZE=3D2 =
FACE=3D"Arial">/sasl2/smtpd.conf and /usr/</FONT><U></U><U><B><FONT =
SIZE=3D2 FACE=3D"Arial">lib64</FONT></B></U><B></B><FONT SIZE=3D2 =
FACE=3D"Arial">/sasl2/smtpd.conf?&nbsp; How do I know which one I am =
using?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">3) I'm confused&#8230;am I currently =
using auxprop or saslauthd?&nbsp; How can I tell?&nbsp; What is the =
difference?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Many Thanks!</FONT>
</P>
<BR>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C894CC.2D9A20BE--
Dan White
2008-04-04 20:08:14 UTC
Permalink
Post by d***@custserv.com
/etc/imapd.conf
sasl_pwcheck_method: auxprop
sasl_mech_list: PLAIN, CRAM-MD5
/etc/imapd-local.conf
sasl_pwcheck_method: auxprop
/usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
/usr/lib64/sasl2/smtpd.conf
#pwcheck_method: saslauthd
mech_list: plain login
1) What is the difference between imapd.conf and imapd-local.conf? How
do I know which one I am using?
2) What is the difference between /usr/lib/sasl2/smtpd.conf and
/usr/lib64/sasl2/smtpd.conf? How do I know which one I am using?
3) I'm confused...am I currently using auxprop or saslauthd? How can I
tell? What is the difference?
Dino,

Cyrus IMAP services typically use /etc/imapd.conf for
configuration. That config file handles the configuration for
services like imapd, pop3d, timsieved etc.

I'm not familiar with any cyrus services which use
/etc/imapd-local.conf. I would examine your startup scripts, such
as /etc/init.d/cyrus*, for any reference to that file.

The location of the SASL configuration for other services, such
as your SMTP server, can be in one of several locations,
depending on how the SASL libraries were compiled, and how
Postfix was compiled.

If you can find out what configure options your SASL libraries
were compiled with, the --with-configdir option will tell you
what the default location(s) are.

Also, Postfix can define a default location for its SASL
configuration rather than (or in addition to?) the defaults. For
instance, Postfix looks in /etc/postfix/sasl/ on my system for
SASL configuration.

strings `which pluginviewer` | grep sasl2

may give you some hints about where the SASL libraries are
looking for plugins and configs.

With the configuration you have specified above, your Cyrus IMAPd
services will use your auxprop plugin(s) to authenticate both
your PLAIN and CRAM-MD5 mechs.

Your SMTP server, if using the /usr/lib64/sasl2/smtpd.conf file,
will use all available pwcheck_methods, I believe, since you
haven't specified it. So it would try to authenticate your PLAIN
and LOGIN mechs using your auxprop plugins (sasldb), saslauthd
and any others available until one of them authenticates
successfully, or all fail.

If you're using /usr/lib/sasl2/smtpd.conf, then your SMTP server
will use your auxprop plugins (sasldb) to authenticate your
plaintext mechs (PLAIN and LOGIN) and your auxprop mechs (see
pluginviewer). Since you haven't restricted which mechs are
offered, all initialized mechs should get offered to the client.

See the sysadmin doc for more:

http://www.sendmail.org/~ca/email/cyrus2/sysadmin.html

- Dan

Loading...