当前位置:Linux教程 - RedHat - email - Red Hat Postfix中文FAQ

email - Red Hat Postfix中文FAQ

Red Hat Postfix中文FAQ
2004-04-23 15:18 pm
来自:Linux文档
现载:Www.8s8s.coM
地址:无名

1,Q:我从哪儿可以得到postfix的RPM安装包?
A:http://www.pobox.com/~sjmudd/postfix

2,Q:我下载的RPM安装包,但是在安装过程中出现了一个错误无法继续安装?
A:Postfix是用来替代sendmail的,除非你用源码进行安装,否则,sendmail和postfix是不能同时存在在一个系统上的。要想解决这个问题,

必须要把sendmail删掉,但删除之前,最好对sendmail做一个备份。以root身份登录:
mkdir /root/sendmail-old
cp /etc/aliases /root/sendmail-old
cp /etc/sendmail.cf /root/sendmail-old
cp /etc/sendmail.cw /root/sendmail-old
cp /etc/mail/* /root/sendmail-old
rpm -e sendmail sendmail-doc sendmail-cf --nodeps(在卸载sendmail的时候可能会有一些错误,用--nodeps可以不显示错误信息)
killall sendmail
rpm -Uvh postfix-postfix-1.1.11-5.i386.rpm

3:Q:我是用的Red Hat Linux 7.3以上的版本,sendmail和postfix都已经安装上了,但系统现在用的是sendmail,我应该怎么办?
A:在Red Hat Linux 7.3以上的版本提供了两个MTA软件:sendmail和postfix,默认情况下,系统用的是sendmail,如果你想用postfix,你可

以在图形界面下,GNOME选择Main Menu Button (就是左下角的大按纽) => Programs => System => Red Hat Mail Transport Agent Switcher

。KDE选择Main Menu Button (就是左下角的大按纽) System => Red Hat Mail Transport Agent

Switcher。也可以在终端里输入指令redhat-switchmail(8.0下应该是redhat-config-switchmail),如果这时没有启Xwindow系统,程序会自动

把Xwindow系统启来,你可以用redhat-switchmail-nox来强制让程序运行在text模式下。在这个程序里你可以选择你所要用的MTA软件,是send

mail还是postfix,如果想用postfix,选中postfix,保存退出。
/sbin/service sendmail stop 停止sendmail服务
/sbin/service postfix start 启动postfix服务
这样系统的MTA就换成postfix了。

4,Q:安装完成了,我应该怎么来配置呢?
A:postfix的配置文件位于/etc/postfix目录下,一共有四个最基本的配置文件:install.cf main.cf master.cf postfix-script。mail.cf

:是postfix主要的配置文件。Install.cf:包含RPM包安装过程中安装程序产生的postfix初始化设置。master.cf:是postfix的master进程的

配置文件,该文件中的每一行都是用来配置postfix的组件进程的运行方式。postfix-script:这个里面包含了一些postfix命令,以便我们在l

inux环境中安全地执行这些postfix命令。这些配置文件你只需要对/etc/postfix/mail.cf时行配置就可以了。

5,Q:我以前sendmail下的aliases怎么办?
A:你可以把安装postfix前备份的sendmail的aliases文件拷贝到/etc/postfix/aliases,如果确认配置没有什么问题并且在mail.cf中的配置

是正确的,就输入newaliases把文件转换成db文件就OK了。

6,Q:我使用了majordomo,并且我的所有aliases都在/etc/mail/majordomo里,我应该怎么办?
A:把你以前用的majordomo文件可以拷贝到/etc/postfix/majordomo,并且保证在mail.cf中#alias_database = hash:/etc/aliases,

hash:/opt/majordomo/aliases这一行是没有被注释掉的,修改这一行为#alias_database =

hash:/etc/aliases,hash:/etc/postfix/majordomo,保存退出后,运行newaliases,如果你使用了bulk_mailer,你还需要对你的majordomo

aliases做一些修改。

7,Q:postfix用的是什么mail delivery agent (MDA)?
A:postfix可以配置来用不同的MDA软件,在Red Hat Linux下默认的MDA软件是procmail,procmail对于Red Hat Linux和postfix是非常好用

的,没有理由去使用其它的MDA软件。你可以用rpm -q procmail检查你的系统是否安装了procmail。

8,Q:对于postfix的安全性,我如何让postfix不响应verify请求?
A:在默认的情况下,postfix是不对verify请求响应的。不充许通过发通电子邮件来探知用户是否存在。可以看下面的例子:
[root@linuxserver /]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 linuxserver.test.com ESMTP Postfix PostFix-v.2000
helo localhost
250 linuxserver.test.com
vrfy testuser
252 Send mail to find out
quit
221 Bye
Connection closed by foreign host.
[root@linuxserver /]#

9,Q:在sendmail中我的设置有的虚拟域,在postfix下我如何来用呢?
A:在postfix中使用虚拟域要比sendmail的配置方便多了,它没有用m4来处理,是一些简单易懂的E文。首先在/etc/postfix/mail.cf中要配

置上你的虚拟域为正确的转发和接收域,修改/etc/postfix/main.cf中的mydestination参数,缺省地,postfix接受符合以下条件的邮件:目

的地为$inet_interfaces的邮件、目的地为$mydestination的邮件、目的地为$virtual_maps的邮件。修改/etc/postfix/mail.cf文件中的参数

virtual_maps=hash:/etc/po stfix/virtual,如果/etc/postfix/virtual不存在,就新创建一个,下面是一个virtual文件的示例:
[root@linuxserver /]cat /etc/postfix/virtual
linux.net, abc.com, cc123.org, ppp.com

10,Q:postfix中我如何让我的配置生效?
A:以root用户身份 postfix reload

11,Q:postfix中我如何刷新邮件队列?
A:以root用户身份 postfix flush

12,Q:我必须使用一些map文件,来设置access文件和mailertable,我如何把这些转换成.db格式?
A:以root用户身份 postmap /etc/postfix/access postmap 或 /etc/postfix/mailertable

13,Q:我如何让postfix开机后自己运行?
A:你可以通过ntsysv工具,选中postfix

14,Q:我如何设置postfix的队列延迟?
A:你可以在postfix的主要配置文件/etc/postifx/main.cf中修改下列参数:
queue_run_delay (默认值 1000秒) 设置多长时间队列管理进程去扫描无法投递的邮件
Maximal_queue_lifetime (默认值 5天) 设置邮件在队列里的最长时间
Minimal_backoff_time (默认值 1000秒) 在这个时间内,邮件不能够被锁定
Maximal_backoff_time (默认值 4000秒) 在这个时间之后,如果邮件仍然没有被投递,就认为是无法投递
qmgr_message_recipient_limit (默认值 1000)

15,Q:如何禁止postfix对客户端IP作反向域名解析?
A:以root用户身份登录
postconf -e disable_client_dns_lookup = 1 postfix reload