|
Arch的kmail默认不能用smtp发信,总是报“sas(-4)”错误,网上搜到凌晨,才找到答案,原来是默认的cyrus-sasl包有问题,解决办法:
重新编译cyrus-sasl, ./configure 中加入-enable-login选项。
新的PKGBUILD
- # $Id: PKGBUILD,v 1.12 2005/03/07 21:39:42 tpowa Exp $
- # Maintainer: eric <eric@archlinux.org>
- # Modified by Kevin Qian <archlinux@sina.com> , 2005-4-7
- pkgname=cyrus-sasl
- pkgver=2.1.20
- pkgrel=2
- pkgdesc="SASL authentication daemon"
- url="http://asg.web.cmu.edu/cyrus/download/"
- depends=('pam' 'openssl' 'db' 'bash')
- backup=(etc/conf.d/saslauthd)
- source=(ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$pkgname-$pkgver.tar.gz \
- saslauthd saslauthd.conf.d)
- md5sums=('268ead27f4ac39bcfe17d9e38e0f2977' '697dfb51206c398bc976ce9f4cffe72d' \
- 'dd12579e275a0924635e5ff003d301ab')
- build() {
- cd $startdir/src/$pkgname-$pkgver
- ./configure --prefix=/usr --enable-krb4=no --enable-login
- /usr/bin/make || return 1
- /usr/bin/make DESTDIR=$startdir/pkg install
- /bin/mkdir -p $startdir/pkg/var/state/saslauthd
- /bin/install -D -m755 ../saslauthd $startdir/pkg/etc/rc.d/saslauthd
- /bin/install -D -m644 ../saslauthd.conf.d $startdir/pkg/etc/conf.d/saslauthd
- }
复制代码
saslauthd
- #!/bin/bash
- # source application-specific settings
- [ -f /etc/conf.d/saslauthd ] && . /etc/conf.d/saslauthd
- . /etc/rc.conf
- . /etc/rc.d/functions
- DAEMON_NAME="saslauthd"
- SASLAUTHD_BIN=/usr/sbin/saslauthd
- SASLAUTHD_PID=`pidof -o %PPID $SASLAUTHD_BIN`
- case "$1" in
- start)
- stat_busy "Starting $DAEMON_NAME"
- [ -z "$SASLAUTHD_PID" ] && $SASLAUTHD_BIN $SASLAUTHD_OPTS
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- echo `pidof -o %PPID $SASLAUTHD_BIN` > /var/run/$DAEMON_NAME.pid
- fi
- add_daemon $DAEMON_NAME
- stat_done
- ;;
- stop)
- stat_busy "Stopping $DAEMON_NAME"
- [ ! -z "$SASLAUTHD_PID" ] && kill $SASLAUTHD_PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- rm /var/run/$DAEMON_NAME.pid &> /dev/null
- fi
- rm_daemon $DAEMON_NAME
- stat_done
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
- esac
- exit 0
- # vim: ts=2 sw=2 et ft=sh
复制代码
saslauthd.conf.d
- SASLAUTHD_OPTS="-m /var/state/saslauthd -a pam"
复制代码 |
|