From: ChantCd_com on
Below is an old thread (from Sept 12, 2001) but it never solved the
problem.I'm having pretty much the same problem.

When I telnet to port 25 of localhost, I get this error in the log file
(and Telnet hangs):
"fatal: SASL per-process initialization failed"

I am trying to use MySQL for my user authentication.

I am running OpenSuSE 10.1

Matthew

---------------------------------------------------

Hi all,

I spent days compiling and recompiling both cyrus SASL (1.5.24) and
Postfix (snapshot-20010808) but no matter what I did, I would still get

the below error:


It starts properly:


Sep 10 14:53:58 vincent postfix/postfix-script: starting the Postfix
mail
system
Sep 10 14:53:58 vincent postfix/master[17541]: daemon started


Then when I telnet to port 25, the connection hangs and the log shows
this:


Sep 10 14:54:41 vincent postfix/smtpd[17547]: fatal: SASL per-process
initialization failed
Sep 10 14:54:42 vincent postfix/master[17541]: warning: process
/usr/lib/postfix/smtpd pid 17547 exit status 1
Sep 10 14:54:42 vincent postfix/master[17541]: warning:
/usr/lib/postfix/smtpd: bad command startup -- throttling


I looked through all the mailing lists and all I could find was an
unanswered thread posted in May.


What I would like to accomplish is use SMTP AUTH with Postfix where the

user details are in a mysql database.


I have sasl authentication happening through mysql already I just need
postfix to recognize SASL. I'm using pam_mysql.


Here are the options I used for cyrus SASL 1.5.24:


../configure --prefix=/usr --enable-login --disable-krb4
--disable-gssapi
--disable-anon --disable-plain --enable-pwcheck


These are the options for Postfix snapshot-20010808:


make makefiles CCARGS="-DHAS_MYSQL -I/usr/local/mysql/include/mysql
-DUSE_SASL_AUTH -I/usr/include" AUXLIBS="-L/usr/local/mysql/lib
-lmysqlclient -lz -lm -L/usr/lib -lsasl -lpam -lpam_misc"


My main.cf for postfix has this in it for sasl authentication:


smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
check_relay_domains
smtpd_sasl_security_options = noanonymous
smtp_sasl_password_maps = mysql:/etc/postfix/mysql_auth.conf


The /etc/postfix/mysql_auth.conf file looks like this:


------------
user = user
password = pass


dbname = dbname
table = user


select_field = user
where_field = password


hosts = localhost


-------------


It doesn't even seem to connect to the database.


Sorry for making this message so long. I hope I didn't leave out any
important info.


Can anyone give me some pointers, more documentation to read or just
tell
me what I'm doing wrong?


Thanks in advance.
Tamas.


-
To unsubscribe, send mail to majord...(a)postfix.org with content
(not subject): unsubscribe postfix-users


Reply Rate this post: Text for clearing space


From: Nick Simicich - view profile
Date: Thurs, Sep 13 2001 12:50 am
Email: n...(a)scifi.squawk.com (Nick Simicich)
Groups: mailing.postfix.users
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author


Are you chrooting the smtpd process? The default is to do so these
days.

If so, did you copy all of the files you need into the chroot jail?
The
documentation implies that it is impossibly hard to do so, I think I
copied
just a few more library fles and the sasl authentication database. I
think
that the files may have to be copied in under
/var/spool/postfix/etc/sasldb
needs to be there, for example.


Try not chrooting the smtpd process and if that works, try copying the
contents of /usr/lib/sasl and /etc/sasldb into the chroot jail.


If you want to go through mysql there may be conflicts with the unix
socket
for mysql - you may have to turn off chroot period.


I was able to get sasl auth to work chrooted (I allow some friends to
relay
through my server because the local popular ISP, bellsouth, seems to be

unable to configure their smtp servers to use a real hostname in the
helo
message) but I wanted some anto relay, so I use sasl to force a
userid/password.


At 01:04 PM 9/12/2001 -0400, Tamas Acs wrote:



- Hide quoted text -
- Show quoted text -

>Hi all,

>I spent days compiling and recompiling both cyrus SASL (1.5.24) and
>Postfix (snapshot-20010808) but no matter what I did, I would still get
>the below error:


>It starts properly:


>Sep 10 14:53:58 vincent postfix/postfix-script: starting the Postfix mail
>system
>Sep 10 14:53:58 vincent postfix/master[17541]: daemon started


>Then when I telnet to port 25, the connection hangs and the log shows
>this:


>Sep 10 14:54:41 vincent postfix/smtpd[17547]: fatal: SASL per-process
>initialization failed
>Sep 10 14:54:42 vincent postfix/master[17541]: warning: process
>/usr/lib/postfix/smtpd pid 17547 exit status 1
>Sep 10 14:54:42 vincent postfix/master[17541]: warning:
>/usr/lib/postfix/smtpd: bad command startup -- throttling


>I looked through all the mailing lists and all I could find was an
>unanswered thread posted in May.


>What I would like to accomplish is use SMTP AUTH with Postfix where the
>user details are in a mysql database.


>I have sasl authentication happening through mysql already I just need
>postfix to recognize SASL. I'm using pam_mysql.


>Here are the options I used for cyrus SASL 1.5.24:


>./configure --prefix=/usr --enable-login --disable-krb4 --disable-gssapi
>--disable-anon --disable-plain --enable-pwcheck


>These are the options for Postfix snapshot-20010808:


>make makefiles CCARGS="-DHAS_MYSQL -I/usr/local/mysql/include/mysql
>-DUSE_SASL_AUTH -I/usr/include" AUXLIBS="-L/usr/local/mysql/lib
>-lmysqlclient -lz -lm -L/usr/lib -lsasl -lpam -lpam_misc"


>My main.cf for postfix has this in it for sasl authentication:


>smtpd_sasl_auth_enable = yes
>smtpd_recipient_restrictions =
> permit_mynetworks,
> permit_sasl_authenticated,
> check_relay_domains
>smtpd_sasl_security_options = noanonymous
>smtp_sasl_password_maps = mysql:/etc/postfix/mysql_auth.conf


>The /etc/postfix/mysql_auth.conf file looks like this:


>------------
>user = user
>password = pass


>dbname = dbname
>table = user


>select_field = user
>where_field = password
From: Greg Hackney on
ChantCd_com wrote:

> When I telnet to port 25 of localhost, I get this error in the log file
> (and Telnet hangs):
> "fatal: SASL per-process initialization failed"
>
> I am trying to use MySQL for my user authentication.
>
> I am running OpenSuSE 10.1



What does your smtpd.conf file look like? Something like this?

pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login


--
Greg