Postfix - 限制由一個特定用戶發送的傳出訊息

Postfix - 限制由一個特定用戶發送的傳出訊息

我想將單一使用者的傳出訊息限制為每小時 5 條。然後,它應該在該小時內對任何其他訊息進行排隊,以便稍後嘗試傳遞。所有其他用戶不應受到此限制的影響。

我嘗試使用慢速運輸:

slow unix - - n - 5 smtp

使用依賴於發送者的常規傳輸映射:

[email protected] slow:

我也嘗試過使用 postfwd:

/user_check/   sender/regexp    =~ /^(user@example\.com)$/ local   hour >= 5   action=rate(sender/3600/5)

/etc/postfix/master.cf

postfwd unix - n n - 5 smtp
    -o content_filter=
    -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    -o smtpd_helo_restrictions=
    -o smtpd_client_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8

這似乎不起作用。任何人都可以針對這個問題提供解決方案或建議嗎?

作業系統:CentOS 8 postfix-3.5.20-2.redhat.8+p18.0.55.2+t230919.0741.x86_64

相關內容