0

I have total 4000 mail for an outgoing recipient and I want to send mail 2 mail every 1 minute. so I have configured postfwd.

#/etc/postfwd.cf
id=RATE01 ; action=rate($$recipient_domain/1/60/450 4.7.1 Message delivery request rate limit exceeded)

and

smtpd_recipient_restrictions =
                      permit_mynetworks,
                check_policy_service inet:127.0.0.1:10040,
                permit_sasl_authenticated,
                127.0.0.1:10040_time_limit = 3600,
                reject_unauth_destination

after 2 mails all the mails rejected and mailq empty. my requirment is send 2 mail and hold the mail for 1 minutes and send mail again.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
vivek jain
  • 1
  • 1
  • 4
  • 2
    The `check_policy_service` PostFWD doesn't hold mails: it rejects them with a (temporary 450) error after the limit has exceed. I think you have missunderstood the purpose of the tutorial you were following. – Esa Jokinen Jul 18 '18 at 06:22
  • is it possible for rate limit through postfwd. send 2 mail in 1 minute and again send – vivek jain Jul 18 '18 at 06:25
  • Is it possible to limit this in your software generating these mails? – Esa Jokinen Jul 18 '18 at 06:27
  • no. actually, I'm using centos 7. my injector, inject the mail in postfix and server send the mail outside. – vivek jain Jul 18 '18 at 06:30
  • cloud you tell me how to rate limit for outgoing. my requirement 2 mail every 1 minute. – vivek jain Jul 18 '18 at 06:45

1 Answers1

0

Your current PostFWD rate limiting approach affects mail before it gets to queue, causing your Postfix to reject mail.

Take a look at these configuration parameters that controls behaviour of outbound connections:

default_destination_rate_delay (default: 0s)

The default amount of delay that is inserted between individual deliveries to the same destination; the resulting behavior depends on the value of the corresponding per-destination recipient limit.

default_destination_recipient_limit (default: 50)

The default maximal number of recipients per message delivery. This is the default limit for delivery via the lmtp(8), pipe(8), smtp(8) and virtual(8) delivery agents.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
  • i m using a default parameter but all the mail sent in immediately. initial_destination_concurrency = 1 default_destination_rate_delay = 60s default_destination_concurrency_limit = 10 default_destination_recipient_limit = 2 master.cf:- smtp unix - - n - 10 smtp – vivek jain Jul 18 '18 at 06:57
  • Thank you. parameres working well. but I have 7 IP address for sending mail I need to rotate IP address for outgoing mail – vivek jain Jul 18 '18 at 08:54