大网数据广告活动
服务器运维问答

Postfix limit total sent per hour

· 52CE 我爱测

I'm not after services that could provide me with fancy fine-grained control like policyd , I don't need per user/domain control, I only want to: limit maximim number of emails that could be sent trough Postfix mail system per ho…

问题原文

原帖链接 · Miloš Đakonović · CC BY-SA 3.0

I'm not after services that could provide me with fancy fine-grained control like policyd, I don't need per user/domain control, I only want to:

limit maximim number of emails that could be sent trough Postfix mail system per hour, preferably but not necessary excluding domains that Postfix mail system itself handles.

Let's say I want to set limit of 200 messages per hour. Desired behavior is that 201 message holds until one hour period is over in order to be delivered.

I would be really amazed if solution to this could respect my previously set per-domain rate limits:

smtp_destination_concurrency_limit = 1
smtp_destination_rate_delay = 3s
smtp_extra_recipient_limit = 2

EDIT: here are some configuration options that might be related to what I'm looking for:

anvil_rate_time_unit = 120s
smtpd_client_recipient_rate_limit = 4
smtpd_client_message_rate_limit = 4
smtpd_client_connection_count_limit = 1
smtpd_client_connection_rate_limit = 1

This configuration should limit 4 emails per 2 minutes, thus 120 per hour - but I'm not sure if it works.

已采纳解答

原帖链接 · Drew Bloechl · CC BY-SA 3.0

You can configure Postfix to divert all messages to the hold queue, and an external script (which you'll need to write) can monitor this queue and release messages at the desired rate.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-06-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。