IRedMail/FAQ/Enable.Throttling/Debian.Ubuntu
From iRedMail
(Difference between revisions)
Shake.chen (Talk | contribs) (Created page with 'iRedMail ships Policyd-1.8.x for sender & recipient throttling, but it's disabled by default. You can enable it by follow below steps on Debian: * Disable throttling in '''/etc/…') |
|||
| Line 1: | Line 1: | ||
iRedMail ships Policyd-1.8.x for sender & recipient throttling, but it's disabled by default. You can enable it by follow below steps on Debian: | iRedMail ships Policyd-1.8.x for sender & recipient throttling, but it's disabled by default. You can enable it by follow below steps on Debian: | ||
| - | * Disable throttling in '''/etc/policyd.conf''': | + | * Disable throttling in '''/etc/postfix-policyd.conf''': |
{{cfg|/etc/policyd.conf|<pre> | {{cfg|/etc/policyd.conf|<pre> | ||
SENDERTHROTTLE=0 | SENDERTHROTTLE=0 | ||
| Line 10: | Line 10: | ||
</pre>}} | </pre>}} | ||
| - | * Enable throttling in '''/etc/policyd_sender_throttle.conf''': | + | * Enable throttling in '''/etc/postfix-policyd_sender_throttle.conf''': |
| - | {{cfg|/etc/policyd_sender_throttle.conf|<pre> | + | {{cfg|/etc/postfix-policyd_sender_throttle.conf|<pre> |
SENDERTHROTTLE=1 | SENDERTHROTTLE=1 | ||
SENDER_THROTTLE_SASL=1 | SENDER_THROTTLE_SASL=1 | ||
| - | SENDER_THROTTLE_HOST= | + | SENDER_THROTTLE_HOST=0 |
RECIPIENTTHROTTLE=1 | RECIPIENTTHROTTLE=1 | ||
</pre>}} | </pre>}} | ||
| - | * | + | * Copy '''/etc/init.d/postfix-policyd''' to '''/etc/init.d/postfix-policyd_sender_throttle''', change PID and config file location: |
| - | {{cfg|/etc/init.d/ | + | {{cfg|/etc/init.d/postfix-policyd_sender_throttle|<pre> |
| - | + | ||
</pre>}} | </pre>}} | ||
| - | * | + | * Start policyd via '''/etc/init.d/postfix-policyd_sender_throttle''': |
{{cmd|<pre> | {{cmd|<pre> | ||
| - | # /etc/init.d/ | + | # /etc/init.d/postfix-policyd_sender_throttle restart |
</pre>}} | </pre>}} | ||
Revision as of 08:06, 19 September 2010
iRedMail ships Policyd-1.8.x for sender & recipient throttling, but it's disabled by default. You can enable it by follow below steps on Debian:
- Disable throttling in /etc/postfix-policyd.conf:
| File: /etc/policyd.conf |
SENDERTHROTTLE=0 SENDER_THROTTLE_SASL=0 SENDER_THROTTLE_HOST=0 RECIPIENTTHROTTLE=0 |
- Enable throttling in /etc/postfix-policyd_sender_throttle.conf:
| File: /etc/postfix-policyd_sender_throttle.conf |
SENDERTHROTTLE=1 SENDER_THROTTLE_SASL=1 SENDER_THROTTLE_HOST=0 RECIPIENTTHROTTLE=1 |
- Copy /etc/init.d/postfix-policyd to /etc/init.d/postfix-policyd_sender_throttle, change PID and config file location:
| File: /etc/init.d/postfix-policyd_sender_throttle |
| |
- Start policyd via /etc/init.d/postfix-policyd_sender_throttle:
| Terminal: |
# /etc/init.d/postfix-policyd_sender_throttle restart |
It will listen on two ports: 10031, 10032. You can verify it via command netstat:
| Terminal: |
# netstat -ntlp | grep -i 1003 tcp 0 0 127.0.0.1:10031 0.0.0.0:* LISTEN 3454/policyd tcp 0 0 127.0.0.1:10032 0.0.0.0:* LISTEN 3459/policyd |
- Enable throttling in Postfix /etc/postfix/main.cf:
| File: /etc/postfix/main.cf |
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032 |
Restart postfix:
| Terminal: |
# /etc/init.d/postfix restart |
That's all. Enjoy. :)
