首页 » VPS 知识 » 浏览内容

对debian 下的exim4添加DKIM支持


2012-02-21 00:12:44 1,945 0 发表评论 字体: 作者:C.K.
标签: Debianexim4

体验版 88 元,个人版 128 元,多用户版 288元个人版160元升级到多用户版。

exim是一款常见的邮件发送软件, 用自带的apt-get安装的exim4版本是不支持DKIM,我们必须要对其源码进行改造才行。
这里介绍一下在debian环境下对exim进行DKIM(DomainKeys Identified Mail)邮件签名的支持。
# apt-get install libdkim-dev dpatch
在/etc/apt/sources.list中添加:
deb-src http://ftp.us.debian.org/debian lenny main contrib non-free
添加必要的软件:
# cd /usr/src
# apt-get –force-yes -y install build-essential devscripts docbook-xsl xsltproc docbook-xml libpcre3-dev libldap2-dev libpam0g-dev libident-dev libdb4.6-dev libxmu-dev libxt-dev libxext-dev libx11-dev libxaw7-dev libpq-dev libmysqlclient15-dev libsqlite3-dev libperl-dev libgnutls-dev libsasl2-dev
# apt-get source exim4
# cd exim4-4.69/
# fakeroot debian/rules unpack-configs
然后复制配置文件
# cp EDITME.exim4-heavy EDITME.exim4-custom
# echo “EXPERIMENTAL_DKIM=yes” >> EDITME.exim4-custom
# echo “LDFLAGS += -ldkim” >> EDITME.exim4-custom
# fakeroot debian/rules pack-configs
修改
vi debian/rules
找到extradaemonpackages这行,修改为:
extradaemonpackages=exim4-daemon-heavy exim4-daemon-custom
为了让exim找到libdkim,还需要
echo “80_libdkim_patch” >> debian/patches/00list
cd debian/patches
wget ‘http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=99_libdkim_1.0.19.dpatch;att=1;bug=486437’ -O – | \
cat >> 80_libdkim_patch.dpatch
完成以上步骤,并无提示出错i后就可以编译了
debuild -uc -us
之后就可以得到安装包了:
# ls ../*.deb | grep exim4
../exim4_4.69-7_all.deb
../exim4-base_4.69-7_amd64.deb
../exim4-config_4.69-7_all.deb
../exim4-daemon-custom_4.69-7_amd64.deb
../exim4-daemon-custom-dbg_4.69-7_amd64.deb
../exim4-daemon-heavy_4.69-7_amd64.deb
../exim4-daemon-heavy-dbg_4.69-7_amd64.deb
../exim4-daemon-light_4.69-7_amd64.deb
../exim4-daemon-light-dbg_4.69-7_amd64.deb
../exim4-dbg_4.69-7_amd64.deb
../exim4-dev_4.69-7_amd64.deb
../eximon4_4.69-7_amd64.deb
安装包的顺序
dpkg -i exim4-config*.deb
dpkg -i exim4-base*.deb
dpkg -i exim4-daemon-light*.deb
dpkg -i daemon-custom*.deb
最后,修改配置文件/etc/exim4/exim4.conf.template在remote_smtp 处
添加:
dkim_selector = dkim
dkim_domain = ${lc:${domain:$h_from:}}
dkim_private_key = /root/dkim.private.key
dkim_strict = 0
dkim_canon = relaxed

    网站统计 Statistics

    • 创建时间: 2005年1月3日 距今4761 天
    • 日志总数: 2461
    • 评论总数: 630
    • 标签总数: 654
    • 链接总数: 273
    • 最后更新: 2017-7-1 18:16:33
    • 您是本站第 13192617 位访客

    广告区 Guǎng Gào