我尝试通过anvil命令设置Postfix,以便可以在2分钟内最多发送5封电子邮件,看起来这是不可能的,因为可以发送电子邮件没有任何限制。 也许我还没有find关于选项smtpd和铁砧或类似的master.cf文件的正确设置。 许多问候
main.cf:
anvil_rate_time_unit = 120s smtpd_client_connection_count_limit = 1 smtpd_client_connection_rate_limit = 1 smtpd_client_recipient_rate_limit = 5 smtpd_client_message_rate_limit = 5
master.cf:
# service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd #smtp inet n - - - 1 postscreen #smtpd pass - - - - - smtpd #dnsblog unix - - - - 0 dnsblog #tlsproxy unix - - - - 0 tlsproxy #submission inet n - - - - smtpd #smtps inet n - - - - smtpd #628 inet n - - - - qmqpd pickup unix n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr unix n - n 300 1 qmgr #qmgr unix n - n 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - - - - smtp relay unix - - - - - smtp # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error retry unix - - - - - error discard unix - - - - - discard local unix - nn - - local virtual unix - nn - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache
iirc,所有这些设置适用于每个连接到的远程服务器(或域),因此每个远程邮件服务器或域每120个邮件5个邮件。
您可以检查的一种方法是仅限队列模式:
每两分钟最多可以发送4条消息。
另一种方法是configurationPostfix依靠服务器。 使用您需要的接收限制configuration中继服务器。 您应该能够configurationPostfix只中继一个主机。
这些解决scheme都可能导致邮件服务器的队列失去控制。