- 查看postfix版本: postconf mail_version
安装:
http://stevejenkins.com/blog/2010/09/how-to-get-dkim-domainkeys-identified-mail-working-on-centos-5-5-and-postfix-using-opendkim/
http://cloudmail.iteye.com/blog/1576683
验证:
http://www.brandonchecketts.com/emailtest.php?email=y8sBSFrtEN%40www.brandonchecketts.com
1)安装sendmail、openssl-devel包,安装opendkim需要依赖,加密用到
yum install sendmail-devel openssl-devel
2)安装opendkim
tar zxvf opendkim-2.4.2.tar.gz
cd opendkim-2.4.2
./configure --sysconfdir=/etc --prefix=/usr/local --localstatedir=/var
make
make install
3)添加用户及组
groupadd opendkim
useradd -r -g opendkim opendkim -G mail -s /sbin/nologin -d /var/run/opendkim -c "OpenDKIM"
4)创建目录,并授权
mkdir -p /var/run/opendkim
chmod 700 /var/run/opendkim
mkdir -p /etc/opendkim/keys
chown -R opendkim:opendkim /etc/opendkim
chmod -R go-wrx /etc/opendkim/keys
5)拷贝到启动
cp /data/web/agx/opendkim-2.6.8/contrib/init/redhat/opendkim /etc/init.d/
chmod 755 /etc/init.d/opendkim
6)生成key
私钥:genrsa -out rsa.private 1024
公钥:openssl rsa -in rsa.private -out rsa.public -pubout -outform PEM writing RSA key (需要添加到DNS记录中)
chown -R opendkim:opendkim /etc/opendkim/keys/xiaozhao.com/
把生成的私钥重命名为default,放到/etc/opendkim/keys/xiaozhao.com/下
问题:
1)[root@SJSWT46-80 libmilter]# /etc/init.d/opendkim start
Starting OpenDKIM Milter: /usr/local/sbin/opendkim: error while loading shared libraries: libopendkim.so.7: cannot open shared object file: No such file or directory [FAILED]
解决:
[root@SJSWT46-80 libmilter]# echo "/usr/local/lib" >> /etc/ld.so.conf [root@SJSWT46-80 libmilter]# ldconfig
见:http://blog.chinaunix.net/uid-26212859-id-3256667.html
2)10.4.24.150
[root@YZSJHL24-150 opendkim-2.6.8]# make CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /data/web/dxm/opendkim/opendkim-2.6.8/build-aux/missing --run autoconf autom4te: cannot open /usr/local/share/autoconf/autom4te.cfg: No such file or directory make installmake: *** [configure] Error 1
3)10.3.23.52 没权限