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

linux – 用于批量邮件作业的Sendmail调优,第1张

概述我有一个网络服务器,它将电子邮件作为批处理作业发送到sendmail中继服务器.电子邮件需要尽快被中继sendmail服务器接受,但是,它们不需要非常快速地出去(被中继). 我在网络服务器试图连接到中继服务器时偶尔会看到一些超时.目前的负载是每秒约30封电子邮件,持续几分钟. sendmail tuning guide中的sendmail有很多调优选项. 我现在关注的是交付模式: Delivery 我有一个网络服务器,它将电子邮件作为批处理作业发送到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

总结

以上是内存溢出为你收集整理的linux – 用于批量邮件作业的Sendmail调优全部内容,希望文章能够帮你解决linux – 用于批量邮件作业的Sendmail调优所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1040702.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存