Exim 安裝並使用Sasl
Posted On 2007年6月5日 星期二 at 於 上午11:34 by Laniwget exim-xxx.tgz
tar -zxvf exim-xxx.tgz
cd exim-xxxx
cp src/EDITME Local/Makefile
vi Local/Makefile
需修改的地方
EXIM_USER=exim (如果要使用exim 此user執行,記得先新增)
#EXIM_MONITOR=eximon.bin
AUTH_CRAM_MD5=yes
AUTH_CYRUS_SASL=yes
AUTH_PLAINTEXT=yes
AUTH_LIBS=-lsasl2
SUPPORT_TLS=yes
TLS_LIBS=-lssl -lcrypto
TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto
TLS_INCLUDE=-I/usr/local/openssl/include/
CYRUS_PWCHECK_SOCKET=/var/pwcheck/pwcheck
CYRUS_SASLAUTHD_SOCKET=/var/run/saslauthd/mux
以上是支援sasl認證需unmark 的部份 預設是mark的
LOG_FILE_PATH=/var/log/exim_%slog
wq
useradd -s /sbin/nologin exim
touch /var/log/exim_mainlog
^mainlog^paniclog
^paniclog^rejectlog
chown exim:exim /var/log/exim_*
make
make install
vi /usr/exim/configure
primary_hostname = yourdomain
hostlist relay_from_hosts = allow relay ip/submask
#host_lookup = *
begin authenticators 區段加入
plain:
driver = plaintext
public_name = PLAIN
server_condition = ${if saslauthd{{$2}{$3}}{1}{0}}
login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if saslauthd{{$1}{$2}}{1}{0}}
/usr/exim/bin/exim –bd –q 15m 啟動exim