安装postfix+extmail
时间:2010-10-12 来源:lafang2009
参考:
1.http://blog.sina.com.cn/s/blog_4fed8bc50100gnbi.html
2.http://bbs.linuxtone.org/viewthread.php?tid=2674&highlight=extmail、
尽量安装参考1的rpm来操作。
注意:
1.rpm安装courier-authlib,认证:/usr/sbin/authtest -s login [email protected] extmail出现如下报错:
Oct 12 15:36:11 mail authdaemond: Installing libauthmysql
Oct 12 15:36:11 mail authdaemond: libauthmysql.so: cannot open shared object file: No such file or directory 解决:yum install courier-authlib-mysql courier-authlib-devel 2.rpm安装courier-authlib,认证:/usr/sbin/authtest -s login [email protected] extmail出现如下报错: Oct 12 15:19:18 mail authdaemond: authpam: username '[email protected]' not found in password file 解决:修改vim /etc/authlib/authdaemonrc为如下: authmodulelist="authmysql" authmodulelistorig="authmysql" 正确认证如下: [root@mail ~]# /usr/sbin/authtest -s login [email protected] extmail
Authentication succeeded. Authenticated: [email protected] (uid 1000, gid 1000)
Home Directory: /home/domains/lafang.com/postmaster
Maildir: /home/domains/lafang.com/postmaster/Maildir/
Quota: 104857600S
Encrypted Password: $1$phz1mRrj$3ok6BjeaoJYWDBsEPZb5C0
Cleartext Password: extmail
Options: (none) 3.用phpmyadmin更改root密码
首先用root账号登陆phpmyadmin,然后点击左侧进入mysql数据库,在顶部点击“mysql”进入sql输入界面。输入以下命令:
update user set password=password('123456') where User='root'
然后点击右下角的“执行”,看到修改成功。
接着还要进入phpmyadmin目下下的libraries目录,修改config.default.php文件。找到$cfg['Servers'][$i]['password'] = ‘ ‘,修改为$cfg['Servers'][$i]['password'] = ‘123456′; 123456就是密码。现在赶快登陆试试吧 4.telnet 127.0.0.1 110不通 查看日志:tail /var/log/maillog 如下:Oct 14 11:21:17 mail pop3d: /usr/local/courier-imap/sbin/pop3login: error while loading shared libraries: libcourierauthsasl.so: cannot open shared object file: No such file or directory 解决: [root@mail ~]# find / -name libcourierauthsasl.so
/usr/lib/courier-authlib/libcourierauthsasl.so [root@mail ~]# echo "/usr/lib/courier-authlib/" >> /etc/ld.so.conf [root@mail ~]# ldconfig -v 5.
--enable-sendmail=/usr/sbin/sendmail \
--enable-trusted-users='root vuser' \
--enable-syslog=1 \
--enable-maildirquota \
--enable-maildrop-uid=1000 \
--enable-maildrop-gid=1000 \
--with-trashquota \
--with-dirsync
make
make install
Oct 12 15:36:11 mail authdaemond: libauthmysql.so: cannot open shared object file: No such file or directory 解决:yum install courier-authlib-mysql courier-authlib-devel 2.rpm安装courier-authlib,认证:/usr/sbin/authtest -s login [email protected] extmail出现如下报错: Oct 12 15:19:18 mail authdaemond: authpam: username '[email protected]' not found in password file 解决:修改vim /etc/authlib/authdaemonrc为如下: authmodulelist="authmysql" authmodulelistorig="authmysql" 正确认证如下: [root@mail ~]# /usr/sbin/authtest -s login [email protected] extmail
Authentication succeeded. Authenticated: [email protected] (uid 1000, gid 1000)
Home Directory: /home/domains/lafang.com/postmaster
Maildir: /home/domains/lafang.com/postmaster/Maildir/
Quota: 104857600S
Encrypted Password: $1$phz1mRrj$3ok6BjeaoJYWDBsEPZb5C0
Cleartext Password: extmail
Options: (none) 3.用phpmyadmin更改root密码
首先用root账号登陆phpmyadmin,然后点击左侧进入mysql数据库,在顶部点击“mysql”进入sql输入界面。输入以下命令:
update user set password=password('123456') where User='root'
然后点击右下角的“执行”,看到修改成功。
接着还要进入phpmyadmin目下下的libraries目录,修改config.default.php文件。找到$cfg['Servers'][$i]['password'] = ‘ ‘,修改为$cfg['Servers'][$i]['password'] = ‘123456′; 123456就是密码。现在赶快登陆试试吧 4.telnet 127.0.0.1 110不通 查看日志:tail /var/log/maillog 如下:Oct 14 11:21:17 mail pop3d: /usr/local/courier-imap/sbin/pop3login: error while loading shared libraries: libcourierauthsasl.so: cannot open shared object file: No such file or directory 解决: [root@mail ~]# find / -name libcourierauthsasl.so
/usr/lib/courier-authlib/libcourierauthsasl.so [root@mail ~]# echo "/usr/lib/courier-authlib/" >> /etc/ld.so.conf [root@mail ~]# ldconfig -v 5.
如果maildrop不支持Courier-authlib验证,则在发送邮件时会出现如下错误:
Mar 4 09:20:44 bht postfix/pipe[27723]: 8D584228CA: to=<[email protected]>, relay=maildrop, delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (user unknown. Command output: Invalid user specified. )
如果出现这种情况,则重新编译。
./configure \--enable-sendmail=/usr/sbin/sendmail \
--enable-trusted-users='root vuser' \
--enable-syslog=1 \
--enable-maildirquota \
--enable-maildrop-uid=1000 \
--enable-maildrop-gid=1000 \
--with-trashquota \
--with-dirsync
make
make install
相关阅读 更多 +