Postfix will not respond to telnet, I've went through debugging, etc
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sure enough that line was no longer there, must of got removed somewhere along the lines.
Code:
Apr 18 23:06:43 cl-t112-271cl postfix/smtpd[22623]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Apr 18 23:06:43 cl-t112-271cl postfix/smtpd[22623]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
That is the problem, SASL is using the wrong authentication method, so I figure the config file I edited was the wrong one, because that guide has had a few files in different locations than mine. Not sure where the proper one is though.
Any chance /etc/postfix/sasl/smtpd.conf should be /etc/postfix/sasl2/smtpd.conf ?
Last edited by Guardian-Mage; 04-18-2009 at 11:09 PM.
Are you trying to authenticate against the standard user database? If so, you shouldn't need to change any sasl configs. If this is the case, you should be able to delete /etc/postfix/sasl and its contents
As the tutorial states, I am trying to authenticate against a mysql database, just like my IMAP server is.
cat /etc/sysconfig/saslauthd
Code:
# Directory in which to place saslauthd's listening socket, pid file, and so
# on. This directory must already exist.
#SOCKETDIR=/var/run/saslauthd
# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled with the ablity to use.
#MECH=pam
# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
# for the list of accepted flags.
#FLAGS=
# This needs to be uncommented before saslauthd will be run automatically
START=yes
# You must specify the authentication mechanisms you wish to use.
# This defaults to "pam" for PAM support, but may also include
# "shadow" or "sasldb", like this:
# MECHANISMS="pam shadow"
MECHANISMS="pam"
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
All the values that are commented out were original, and the uncommented ones are what the tutorial told me to add.
cat /etc/init.d/saslauthd
Code:
[root]~ # cat /etc/init.d/saslauthd
#! /bin/bash
#
# saslauthd Start/Stop the SASL authentication daemon.
#
# chkconfig: - 95 05
# description: saslauthd is a server process which handles plaintext \
# authentication requests on behalf of the cyrus-sasl library.
# processname: saslauthd
# Source function library.
. /etc/init.d/functions
# Source our configuration file for these variables.
SOCKETDIR=/var/run/saslauthd
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
MECH=shadow
FLAGS=
if [ -f /etc/sysconfig/saslauthd ] ; then
. /etc/sysconfig/saslauthd
fi
RETVAL=0
# Set up some common variables before we launch into what might be
# considered boilerplate by now.
prog=saslauthd
path=/usr/sbin/saslauthd
# Ugh. Switch to a specific copy of saslauthd if there's one with $MECH
# in its name, in case it wasn't included in the base cyrus-sasl package
# because it would have dragged in too many undesirable dependencies.
if test -x ${path}.${MECH} ; then
path=/usr/sbin/saslauthd.$MECH
fi
start() {
echo -n $"Starting $prog: "
daemon $path -m $SOCKETDIR -a $MECH $FLAGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $path
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status $path
;;
condrestart)
[ -f /var/lock/subsys/$prog ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit $?
And my smtpd.conf file from /etc/postfix/sasl/
Code:
[root]~ # cat /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: test123
sql_database: mail
sql_select: select password from users where email = '%u'
The thing is I entered an actual shell account username and password, which should not of authenticated if MySQL was being used. The problem is getting mysql to work now. Any ideas?
I am using /usr/lib/sasl/smtpd.conf /usr/lib/sasl2/smtpd.conf and /etc/postfix/sasl/smtpd.conf which all looks like this:
Code:
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: 36upuYacHuCUw57e9Ewazej5
sql_database: mail
sql_select: select password from users where email = '%u'
Shouldn't it use pam or something and if not, maybe auxprop isn't installed. Can I check?
Last edited by Guardian-Mage; 04-19-2009 at 11:17 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.