寻觅生命中的那一片浅草......

文章属于类别 Postfix

Zimbra 8.0 data.mdb大小为80G的问题

1、ll -h /opt/zimbra/data/ldap/mdb/db/data.mdb看到是80G,但 du -sh 看只有4M,这样带来的问题是,当用rsync备份目录的时候,同步到远程的就是80G,十分坑爹

2、官方的说明

OpenLDAP_Performance_Tuning_8.0

3、解决方法

a、修改文件大小:solvedcritical-ldap-primary-mdb-database-is-90-full-in-zimbra

b、利用mdb_copy来备份:ldap data.mdb after upgrade from 8.0.0 -> 8.0.1 has a size of 85GB

Postfix里Maildir和Mailbox 的区别

版权声明:本文可以任意转载,转载时请保持文章的完整性,并以超链接形式标明文章原始出处和作者信息及本声明。

http://geoffl.blog.163.com/

作者: 富贵猫

前阵子开始要做Postfix邮件服务器,网上搜了好多文章,不过大部分文章只是作者自己安装步骤的罗列,只能算授人以鱼,所以我看了之后还是需要去看Postfix的手册,还要看很多官方的参考书,看完之后颇有心得,所以就打算写一个“授人以渔”的系列安装设置的文章,让你知其然也知其所以然。

——————————————————————————–

Postfix作邮箱,有4种设置方式,分别是共享域名+系统帐户、独立域名+系统帐户、独立域名+虚拟帐户和虚拟域名+特殊格式邮箱。鉴于通常我们不可能给每个用户设置一个系统帐户,所以第一第二种就不考虑不介绍了。既然是用Postfix来建立我们自己地邮箱系统,所以也没必要去兜很多圈子设置特殊格式邮箱,所以第四种也不考虑。剩下只有一种方式,就是独立域名+虚拟邮箱。

所谓独立域名,就是即使用户名是一样的,但如果域名不同其邮件也将放置在不同的目录。譬如info@abc.com和info@def.com,这二个e-mail地址都以info为用户名,但域名不同,如果是共享域名,他们的mail将被放置在同一个目录下,而独立域名将放置在不同目录下。如果你们公司是很大的集团,下面分好几个公司,分别有独立的域名,这难免有重名的员工,这种情况下,后者显然是我们希望看到的。而所谓虚拟帐户,既然那些邮箱用户只是使用mail服务,我们当然没有必要去给每个用户在Linux下面开设一个个系统帐户,所以我们就用一些数据库之类的东西来保存这些帐户信息,譬如用哈希表、SQL数据库或者LDAP。我使用的是独立域名+虚拟LDAP帐户。

Postfix的安装我就不说了,非常简单。不过如果不会也没关系,后面我会写一篇关于Postfix+mail quota的,那时候需要下载、补丁和编译,等于是Postfix的安装。

LDAP也不说了,要完全掌握LDAP不是这篇能解决的,我只假设你的LDAP服务器里已经有mail这个字段。

下面开始说Postfix如何设置。Postfix的配置文件是/etc/postfix/main.cf,这是独立域名+LDAP的设置

# ===== Basic Setting =====
mail_owner = postfix
myhostname = pop.test.com
inet_interfaces = all
queue_directory = /var/spool/postfix
mynetworks = 127.0.0.0/8

home_mailbox =

# ===== Virtual Mailbox =====
virtual_mailbox_domains = hash:/etc/postfix/v_domains
virtual_mailbox_maps = ldap:/etc/postfix/v_mailbox_maps

virtual_mailbox_base = /var/spool/vhosts/
virtual_minimum_uid = 500
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = virtual

myhostname设置你的邮件服务器名字

inet_interfaces = all设置你在哪些网卡上监听

另外有几个是需要解释的:我们接受哪些域名的邮件?我们的域名下有哪些用户?他们的邮件存放在什么目录?

我们接受那些域名的邮件,这是由virtual_mailbox_domains来定义的。虽然我们可以直接使用

virtual_mailbox_domains = test.com, test2.com

这样的格式来定义这些域名,不过我还是建议如我这样使用一个表来存放,这样更方便日后的维护,表名是随意取的,有没有后缀都没关系,我用v_domains作为表的名字,在main.cf里定义是

virtual_mailbox_domains = hash:/etc/postfix/v_domains

v_domains的内容如下

test.com OK

test2.com OK

这是个text文件,仅仅包含域名,但为了满足哈希表的格式,所以在后面添加一个OK。然后我们还要把这个文件变成Postfix的数据库格式,因此用如下命令转变其格式

postmap v_domains

之后你会得到一个以db为后缀的文件v_domains.db。注意,每次修改完v_domains你都需要使用一次postmap。

我们有哪些用户,这是由virtual_mailbox_maps来决定。同样,你可以用哈希表,不过我还是用LDAP。为了方便你理解,我先说明一下如果用哈希表,它的格式应该是

user1@test.com test.com/user1_mailDirectory/

user2@test.com test.com/user2_mailDirectory/

user1@test2.com test2.com/user1_mailDirectory/

左边是用户的e-mail地址,空格之后是该用户的邮件存放目录。既然我们说了,独立域名代表info@abc.com和info@def.com的邮件放置在不同目录下,所以我们的定义里user1@test.com和user1@test2.com的目录是不同的。如果换成LDAP,我们要得到相同的结果,即用e-mail地址来搜索,得到其邮件存放目录

既然讲到邮件存放目录,就一并解释一下到底这个目录怎样定义的。邮件是存放在

virtual_mailbox_base\virtual_mailbox_maps\home_mailbox下,也就是说virtual_mailbox_base定义的目录下,postfix会根据virtual_mailbox_maps返回的用户目录自动创建该目录,然后如果home_mailbox也有定义,那么在用户目录下还会创建home_mailbox定义的名字。举例来说,按照上面的设置,邮件会存放在

/var/spool/vhosts/test.com/user1/下面。

如果home_mailbox不是空白而是Mail/,那么就会存放在

/var/spool/vhost/test/com/user1/Mail/下面。home_mailbox有什么用呢?举个例子,比方你已经有homeDirectory了,但那是你平时放文件的地方,那么再在同样目录下放邮件就变得很奇怪,所以需要home_mailbox来定义邮件放在你homeDirectory下的什么目录下

注意:地址的最后有没有”/”决定了使用mailbox格式还是maildir格式,没有”/”表示mailbox,有表示maildir。所以并不象大部分人认为的,home_mailbox定义为MailDir才表示使用maildir格式。再举几个例子

/var/spool/vhosts/test.com/user1/  表示使用MailDir格式

/var/spool/vhosts/test.com/user1  表示使用MailBox格式

/var/spool/vhosts/test.com/user1/Mail/  表示使用MailDir格式

/var/spool/vhosts/test.com/user1/MailDir/ 表示使用MailDir格式

/var/spool/vhosts/test.com/user1/MailDir 表示使用MailBox格式,即使home_mailbox是maildir,但没有最后的”/”,只能表示使用MailBox格式。同样道理

/var/spool/vhosts/test.com/user1/MailBox/ 表示使用MailDir格式,虽然home_mailbox是mailbox,但最后的”/”就说明了是使用MailDir格式。

回到virtual_mailbox_maps的LDAP定义,其格式是

virtual_mailbox_maps = ldap:/etc/postfix/v_mailbox_maps

v_mailbox_maps只是一个连接Postfix和LDAP的配置文件,同样文件名是随意取的。v_mailbox_maps的内容是

# LDAP Server的IP地址,我是设在和postfix同一电脑,所以是127.0.0.1

server_host = 127.0.0.1
# 下面这些关于LDAP Search的内容如果你不了解,请学习LDAP

search_base = ou=people,o=test
server_port = 389
bind = yes
bind_dn = cn=root,o=test
bind_pw = <rootpassword>
version = 3

# 下面是关键,我会额外解释

query_filter = (mail=%s)
result_attribute = mail
result_format = %d/%u/

query_filter = (mai=%s)里,query_filter表示搜索用的字段,mail是表示你LDAP里的字段名,%s表示要进入Postfix服务器的那封e-mail的收件人,mail=%s就是搜索LDAP里的mail字段等于收件人的结果。

result_attribute 是LDAP返回的字段,如果你已经在LDAP里定义了譬如homeDirectory或者mailDirectory这样的字段来存放邮件目录,那么你可以直接使用

result_attribute = homeDirectory

这样的格式来定义,那么它直接返回你定义的homeDirectory,而且不需要后面的result_format。我没有这个字段,但我想把用户邮件放在各自的域名下,就如user1@test.com在test.com/user1/下一样,所以我只需要它返回mail字段,然后用result_format来改变返回字段的格式。result_format顾名思义就是把结果format一下,其中%d表示e-mail地址@之后的域名,d应该是domain的首字母,%u表示e-mail地址@之前的用户名,想来u就是username之类的,所以返回的mail地址user1@test.com经过result_format之后就变成了test.com/user1/。注意,%d/%u/最后那个”/”表示我使用MailDir格式存放我的e-mail。

virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

这2行表示邮件用什么身份的用户来存放,我定义了5000,所以你需要事先添加一个用户,并且其uid是5000

useradd postfixadmin –u 5000

名字是随意取的,只要注意uid和main.cf里这2行的定义相同就OK.

好了,如果一切顺利,你应该已经可以收到mail了,收件人没有存在在你LDAP里的那些邮件,会被退回。

chroot环境下Postfix的一些问题

ispCP装好后,没用过它的邮局功能,那天在CentOS5.3上安装了,发现不能发邮件,记得之前在CentOS5.2上装,新开主机什么的都可以发邮件的,经过一番折腾,发现CentOS5.2上能发,是因为它用的是sendmail,CentOS5.3上则是用Postfix,为解燃眉之急,只能把CentOS5.3上的Postfix停掉,启用sendmail,发信正常。

前天专门再装了台测试机,用来测试邮局功能。下面先贴下默认情况下,发信收信时,maillog的一些错误,日志中的邮箱地址和IP地址均已被替换。

测试时,首先把sendmail关掉
chkconfig –level 2345 sendmail off
service sendmail stop

然后开启相关邮局服务

maillog的内容

#################################################
Jun 20 13:32:16 test.com postfix/smtpd[318]: warning: connect to 127.0.0.1:12525: Connection refused
Jun 20 13:32:16 test.com postfix/smtpd[318]: warning: problem talking to server 127.0.0.1:12525: Connection refused
Jun 20 13:32:17 test.com postfix/smtpd[318]: warning: connect to 127.0.0.1:12525: Connection refused
Jun 20 13:32:17 test.com postfix/smtpd[318]: warning: problem talking to server 127.0.0.1:12525: Connection refused
Jun 20 13:32:17 test.com postfix/smtpd[318]: NOQUEUE: reject: RCPT from unknown[125.77.233.210]: 451 4.3.5 Server configuration problem; from=<root@debian.ispcp.net> to=<user@example.net> proto=ESMTP helo=<debian.ispcp.net>
Jun 20 13:32:17 test.com postfix/smtpd[318]: disconnect from unknown[125.77.233.210]
Jun 20 21:35:37 test.com postfix/anvil[319]: statistics: max connection rate 1/60s for (smtp:125.77.233.210) at Jun 20 21:32:16
Jun 20 13:35:37 test.com postfix/anvil[319]: statistics: max connection count 1 for (smtp:125.77.233.210) at Jun 20 13:32:16
Jun 20 13:35:37 test.com postfix/anvil[319]: statistics: max cache size 1 at Jun 20 13:32:16
Jun 20 21:36:00 test.com imapd: Connection, ip=[::ffff:127.0.0.1]
Jun 20 21:36:00 test.com imapd: LOGIN, user=user@example.net, ip=[::ffff:127.0.0.1], port=[48051], protocol=IMAP
Jun 20 21:36:00 test.com imapd: LOGOUT, user=user@example.net, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=87, sent=391, time=0
Jun 20 21:37:01 test.com spamd[500]: logger: removing stderr method
Jun 20 21:37:08 test.com spamd[502]: spamd: server started on port 783/tcp (running version 3.2.5)
Jun 20 21:37:08 test.com spamd[502]: spamd: server pid: 502
Jun 20 21:37:08 test.com spamd[502]: spamd: server successfully spawned child process, pid 507
Jun 20 21:37:08 test.com spamd[502]: spamd: server successfully spawned child process, pid 508
Jun 20 21:37:08 test.com spamd[502]: prefork: child states: II
Jun 20 21:37:39 test.com postfix/smtpd[511]: connect from unknown[127.0.0.1]
Jun 20 13:37:39 test.com postfix/smtpd[511]: NOQUEUE: reject: RCPT from unknown[127.0.0.1]: 450 4.1.2 <user@example.com>: Recipient address rejected: Domain not found; from=<user@example.net> to=<user@example.com> proto=ESMTP helo=<11.22.33.44>
Jun 20 13:37:39 test.com postfix/smtpd[511]: lost connection after RCPT from unknown[127.0.0.1]
Jun 20 13:37:39 test.com postfix/smtpd[511]: disconnect from unknown[127.0.0.1]
Jun 20 13:37:41 test.com postfix/smtpd[511]: connect from unknown[127.0.0.1]
Jun 20 13:37:41 test.com postfix/smtpd[511]: NOQUEUE: reject: RCPT from unknown[127.0.0.1]: 450 4.1.2 <user@example.com>: Recipient address rejected: Domain not found; from=<user@example.net> to=<user@example.com> proto=ESMTP helo=<11.22.33.44>
Jun 20 13:37:41 test.com postfix/smtpd[511]: lost connection after RCPT from unknown[127.0.0.1]
Jun 20 13:37:41 test.com postfix/smtpd[511]: disconnect from unknown[127.0.0.1]
Jun 20 13:38:14 test.com postfix/smtpd[511]: connect from unknown[125.77.233.210]
Jun 20 13:38:14 test.com postfix/smtpd[511]: warning: connect to 127.0.0.1:12525: Connection refused
Jun 20 13:38:14 test.com postfix/smtpd[511]: warning: problem talking to server 127.0.0.1:12525: Connection refused
Jun 20 21:38:14 test.com postfix/smtpd[516]: connect from unknown[125.77.233.210]
Jun 20 13:38:14 test.com postfix/smtpd[516]: warning: connect to 127.0.0.1:12525: Connection refused
Jun 20 13:38:14 test.com postfix/smtpd[516]: warning: problem talking to server 127.0.0.1:12525: Connection refused
Jun 20 13:38:15 test.com postfix/smtpd[511]: warning: connect to 127.0.0.1:12525: Connection refused
Jun 20 13:38:15 test.com postfix/smtpd[511]: warning: problem talking to server 127.0.0.1:12525: Connection refused
Jun 20 13:38:15 test.com postfix/smtpd[511]: NOQUEUE: reject: RCPT from unknown[125.77.233.210]: 451 4.3.5 Server configuration problem; from=<root@debian.ispcp.net> to=<user@example.net> proto=ESMTP helo=<debian.ispcp.net>
Jun 20 13:38:15 test.com postfix/smtpd[511]: disconnect from unknown[125.77.233.210]
Jun 20 13:38:15 test.com postfix/smtpd[516]: warning: connect to 127.0.0.1:12525: Connection refused
Jun 20 13:38:15 test.com postfix/smtpd[516]: warning: problem talking to server 127.0.0.1:12525: Connection refused

#################################################

Jun 20 23:51:18 test.com postfix/postfix-script: starting the Postfix mail system
Jun 20 23:51:18 test.com postfix/master[6161]: daemon started — version 2.3.3, configuration /etc/postfix
Jun 20 23:51:18 test.com postfix/qmgr[6164]: C8FB618A830B: from=<xxx@dddf.com>, size=331, nrcpt=1 (queue active)
Jun 20 23:51:18 test.com postfix/smtp[6166]: fatal: unknown service: smtp/tcp
Jun 20 23:51:19 test.com postfix/qmgr[6164]: warning: premature end-of-input on private/smtp socket while reading input attribute name
Jun 20 23:51:19 test.com postfix/qmgr[6164]: warning: private/smtp socket: malformed response
Jun 20 23:51:19 test.com postfix/qmgr[6164]: warning: transport smtp failure — see a previous warning/fatal/panic logfile record for the problem description
Jun 20 23:51:19 test.com postfix/master[6161]: warning: process /usr/libexec/postfix/smtp pid 6166 exit status 1
Jun 20 23:51:19 test.com postfix/master[6161]: warning: /usr/libexec/postfix/smtp: bad command startup — throttling
Jun 20 23:51:19 test.com postfix/qmgr[6164]: C8FB618A830B: to=<user@example.com>, relay=none, delay=1708, delays=1707/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)

好了,关键出错日志都贴出来了,下面讲解决办法

1、connect to 127.0.0.1:12525: Connection refused

输入命令netstat -aln | grep 12525
发现确实没有12525的监听程序

我们在/etc/postfix/main.cf可以看到一段配置:
smtpd_recipient_restrictions = reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_unlisted_recipient,
check_policy_service inet:127.0.0.1:12525,
check_policy_service inet:127.0.0.1:60000,

check_policy_service inet:127.0.0.1:12525
这一行是配置使用policyd-weight来进行垃圾邮件判别的,CentOS上默认没有装,但在debian5.0.1上装ispCP,默认是安装policyd-weight的
详细可以参考以下这个网址:

http://www.policyd-weight.org/

解决办法

a、安装policyd-weight,然后启用它
安装可以参考这篇文章:http://www.187299.com/archives/1044

b、把policyd-weight相关配置注释掉
把/etc/postfix/main.cf里相应配置注释掉,修改为如下:
#                               check_policy_service inet:127.0.0.1:12525,
#                               check_policy_service inet:127.0.0.1:60000,
service postfix restart重启服务。

2、Recipient address rejected: Domain not found
chroot环境下,Postfix不能用/etc/resolv.conf来进行域名解析,所以说Domain not found

解决办法:
cp /etc/resolv.conf /var/spool/postfix/etc/

处理到这一步,能达到的效果是Postfix能收不能发,也就是可以收到外部发给本地的邮件,但本地还不能发邮件给外面。

3、fatal: unknown service: smtp/tcp
跟第二个问题一样,chroot环境下,Postfix不能使用/etc/services

解决办法:
cp /etc/services /var/spool/postfix/etc/

至此,将邮局相应服务启动起来就可以进行邮件收发了。

知识备忘
/etc/postfix/master.cf
# service type  private unpriv  chroot  wakeup  maxproc command + args
smtp   inet     n       –       –       –       –       smtpd

这里对各种服务进行定义,如果是-或者y,则表示为真,所以以上关于smtp的配置,就是运行在chroot环境下。

网上很多文章都建议不要在chroot环境下运行Postfix,因为Postfix本来已经是一个非常健壮的MTA
有时间再研究下怎样设置Postfix在chroot环境下的根目录,再看如何把它改为普通环境运行。

Howto setup Postfix and policyd-weight

1. Read the changelog
1.1. Download policyd-weight
Depending on the bugfixes (see changelog) download the appropriate release:

or if quot;devel&quot; sounds more exciting:

Move policyd-weight to the proper location for your operating system (example shows *BSD

):

# mv policyd-weight /usr/local/libexec/postfix/policyd-weight
# chmod 0555 /usr/local/libexec/postfix/policyd-weight

Check the default settings

# /usr/local/libexec/postfix/policyd-weight defaults

If these settings seem appropriate you don&#39;t need a configuration file at all. In case you like to change some settings, create a file (i.e. /usr/local/etc/policyd-weight.conf) and add only the variables that differ from the defaults. For example if you want only DNSBL checks and a different port use:

# —————————————————————-
#  minimal configuration for policyd-weight
# —————————————————————-
$dnsbl_checks_only = 1;
$TCP_PORT &nbsp;  &nbsp;  &nbsp;  = 12336;

There is another option, which is not recommended:

# /usr/local/libexec/postfix/policyd-weight defaults &gt; /usr/local/etc/policyd-weight.conf
# chmod 0644 /usr/local/etc/policyd-weight.conf

This will write the default configuration to a file. However, this is not good practice, because it will make maintaining the configuration file difficult and changed defaults will not picked up automatically.
2.1 Add a system account for policyd-weight
Use the appropriate commands for your operating system to add a new user and a new group named polw. This unprivileged user does not need a valid shell.
2.2 Create an init script
Either create an rc-init script or manage otherwise that policyd-weight gets started at boot-time. The command to start policyd-weight in daemon mode is:

# /path/to/policyd-weight start

You need to be root to do that.
3. Edit Postfix main.cf
This example shows a minimal setup. Do NOT copy & paste, instead adjust your main.cf to meet the minimal requirements. Please keep old authentication restrictions (such as SASL) and so forth:

01:  smtpd_helo_required = yes &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;   # required
02:  smtpd_delay_reject = yes &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; # suggested
03:
04:  smtpd_helo_restrictions =
05: &nbsp;  &nbsp; permit_mynetworks, &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;   # suggested
06: &nbsp;  &nbsp; reject_invalid_hostname &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; # suggested
07:
08:  smtpd_client_restrictions = permit_mynetworks &nbsp;  &nbsp; # suggested
09:
10:  smtpd_sender_restrictions = permit_mynetworks &nbsp;  &nbsp; # suggested
11:
12:  smtpd_recipient_restrictions =
13: &nbsp;  &nbsp; permit_mynetworks, &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;   # required
14: &nbsp;  &nbsp; … other authed permits …
15: &nbsp;  &nbsp; … (permit_sasl_authenticated) …
16: &nbsp;  &nbsp; reject_unauth_destination, &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; # required
17: &nbsp;  &nbsp; reject_unauth_pipelining, &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  # suggested
18: &nbsp;  &nbsp; … whitelists (role accounts, clients) …
19: &nbsp;  &nbsp; reject_non_fqdn_recipient, &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp; # suggested
20: &nbsp;  &nbsp; check_policy_service inet:127.0.0.1:12525 &nbsp;  &nbsp; # required

Lines 6: makes sure to only allow valid DNS Names (in terms of [RFC 2821] Sect. 2.3.5, [RFC 1123] Sect. 5.2.5 and [RFC 1035] Sect. 2.3.1) in the HELO command. reject_invalid_hostname (or reject_invalid_helo_hostname as of Postfix 2.3.x) makes sure that no bogus characters are used. It&#39;s a safety and RFC setting.

Line 20: calls the policy daemon on host 127.0.0.1 (localhost) at port 12525.
For whitelisting hosts read the FAQ.

To prevent that a proper MTA can use your own domain as sender please read and unterstand Ralf Hildebrandts receipe

If you don&#39;t understand some settings or don&#39;t know their meaning please read Postfix SMTP relay and access control first, respectively the postconf.5 manpage.
4. Score tuning and other configurations
To tune scores or turn on/off some features such as X-headers, read and edit /usr/local/etc/policyd-weight.conf
The configuration file is Perl syntax. If you make Perl syntax errors there, policyd-weight won&#39;t work.
It is not required to restart or reload postfix. Changes made to the configuration are picked up by each new policyd-weight instance. To have changes take effect immediately you can a) kill each policyd-weight instance, or b) restart Postfix if running in master.cf mode.

转载自:http://www.thismail.org/bbs/thread-2044-1-1.html

postfix权威指南笔记

pcre perl兼容正则表达式

postconf -m 查看postfix支持的函数

postmap -q 测试任何种类的查询表

postmap -q hash:/etc/postfix/transport
postmap -q mysql:/etc/postfix/transport.cf

postalias

postfix check
检查配置文件是否有问题,文件与目录的拥有权是否正确,甚至帮你创建任何遗失的目录,

postfix的等效机制是定义在main.cf的queue_run_delay参数,默认值是1000秒

postfix -D 得出调试信息

/etc/services —查看下文件内容

postsuper -h 保留邮件队列

postsuper -H 将保留的邮件队列重新激活

postsuper -r ALL 将被延迟了的邮件重新排队

postcat -q 邮件ID 查看一个队列文件的内容

要求postfix立刻投递滞留在队列里的邮件的操作成为清空(flush),
命令是 postqueue -f

postqueue -s 清空寄到特定站点的邮件

postconf -l 查看postfix支持的锁机制

最简单的虚拟网域模式,是每位用户都可以收到每个网域的邮件。就用户的感受而言,
就好像同一个邮箱有多个地址一样。这种模式的设定方法最简单,只要将所有虚拟网域名称都列在mydestination参数,并像平常一样为每一位用户(不管他们在哪一个网域)都创建自己的系统账户,他们就可以收到写给任何网域的邮件。

默认情况下,flush只管理relay_domains所列的网域。如果还有其他网域也需要快速清空服务,你可以将它们的网域名称列在fast_flush_domains

2018年十二月
« 2月    
 12
3456789
10111213141516
17181920212223
24252627282930
31