SMTP message rate control on Ubuntu 8.04, preferably with postfix

Posted by TimDaMan on Server Fault See other posts from Server Fault or by TimDaMan
Published on 2009-06-26T18:10:39Z Indexed on 2014/08/18 22:23 UTC
Read the original article Hit count: 305

Filed under:
|
|

Maybe I am chasing a bug but I am trying to set up a smtp proxy of sorts. I have a postfix server which receives all the email for a collection of servers/clients. It them uses a smarthost (relayhost=...) to forward it's mail to our corporate MTA. I would like to limit the number of messages an individual server can relay to prevent swamping the corporate MTA. Postfix has a program called "anvil" that is capable of tracking stats about mail to be used for such things but it doesn't seem to be executed. I ran "inotifywait -m /usr/lib/postfix/anvil" while I started postfix and sent a number of messages through it from a remote server. inotifywait indicated anvil was never run. Anyone gotten postfix/anvil rate controls to work?

main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
myhostname = site-server-q9
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost = Out outgoing mail relay
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = 10.X.X.X
smtpd_client_message_rate_limit = 1
anvil_rate_time_unit = 1h

master.cf extract

anvil     unix  -       -       -       -       1       anvil
smtp      inet  n       -       -       -       -       smtpd

© Server Fault or respective owner

Related posts about email

Related posts about postfix