linux – 用于批量邮件作业的Sendmail调优

前端之家收集整理的这篇文章主要介绍了linux – 用于批量邮件作业的Sendmail调优前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个网络服务器,它将电子邮件作为批处理作业发送到sendmail中继服务器.电子邮件需要尽快被中继sendmail服务器接受,但是,它们不需要非常快速地出去(被中继).

我在网络服务器试图连接到中继服务器时偶尔会看到一些超时.目前的负载是每秒约30封电子邮件,持续几分钟.

sendmail tuning guide中的sendmail有很多调优选项.

我现在关注的是交付模式:

Delivery Mode

There are a number of delivery modes
that sendmail can operate in,set by
the DeliveryMode ( d) configuration
option. These modes specify how
quickly mail will be delivered. Legal
modes are:

i deliver interactively
(synchronously) b deliver in
background (asynchronously) q queue
only (don’t deliver) d defer delivery
attempts (don’t deliver) There are
tradeoffs. Mode i gives the sender the
quickest Feedback,but may slow down
some mailers and is hardly ever
necessary. Mode b delivers promptly
but can cause large numbers of
processes if you have a mailer that
takes a long time to deliver a
message. Mode q minimizes the load on
your machine,but means that delivery
may be delayed for up to the queue
interval. Mode d is identical to mode
q except that it also prevents lookups
in maps including the -D flag from
working during the initial queue
phase; it is intended for “dial on
demand” sites where DNS lookups might
cost real money. Some simple error
messages (e.g.,host unknown during
the SMTP protocol) will be delayed
using this mode. Mode b is the usual
default. If you run in mode q (queue
only),d (defer),or b (deliver in
background) sendmail will not expand
aliases and follow .forward files upon
initial receipt of the mail. This
speeds up the response to RCPT
commands. Mode i should not be used by
the SMTP server.

我目前有CentOS默认模式:

Sendmail.cf:

DeliveryMode=background

Submit.cf:

DeliveryMode=i

> sendmail.cf/mc用于从中继(到intertubes)的传出电子邮件和sumbit.cf/mc用于传入的eamil(来自我的网络服务器).
>将传出传送模式更改为队列是否有意义?如果我这样做了,出站电子邮件流的行为是什么样的?
>如果这是正确的事情,有人能告诉我这个变化的示例mc配置吗?如果不是,对这些限制有什么建议?

解决方法

凯尔,

**我绝不是sendmail专家**

在您的使用案例中,sendmail需要尽快接受/排队消息是关键(批处理?).如果还没有,请查看sendmail选项:QueueLA和RefuseLA – 队列负载平均值和拒绝负载平均值.如果你真的在轰炸sendmail,那么你的平均负载快速通过,你会遇到RefuseLA,这可能是你超时问题的一部分.您可能想要增加RefuseLA(如果您还没有).

为了防止sendmail立即做太多(接收和传输),降低你的QueueLA.较低的QueueLA值会将sendmail置于仅队列模式,因此sendmail将专注于排队工作并保存发送/发送工作以供日后使用.较低的QueueLA和较高的RefuseLA将导致系统排队大量邮件(磁盘空间),然后在负载低于QueueLA之后开始将其发送出去.

对于普通的sendmail配置,值得注意的是QueueLA不应该比RefuseLA低得多,并且可能它应该略高一些.

传递模式“q”是低QueueLA设置的极端版本​​,您必须以某种方式启动传递命令以开始传出邮件传输.

资源:
http://www.brandonhutchinson.com/QueueLA_and_RefuseLA.html

原文链接:https://www.f2er.com/linux/399633.html

猜你在找的Linux相关文章