1 (edited by bijuedathodi 2013-03-10 16:07:39)

Topic: Throttling not working as expected

i Am using iRedAdmin-Pro    v1.8.1 (LDAP)+CentOs 6

what i want to acheive is only enabling sender throttling, recipient throttling not needed
Throttling setting via controll panel  is not working as expected i followed the wiki guide.I have made the changes as per the guide .My settings follows

/etc/policyd.conf

SENDERTHROTTLE=0
SENDER_THROTTLE_SASL=0
SENDER_THROTTLE_HOST=1
RECIPIENTTHROTTLE=0

File: /etc/policyd_sender_throttle.conf
SENDERTHROTTLE=1
SENDER_THROTTLE_SASL=1
SENDER_THROTTLE_HOST=0
RECIPIENTTHROTTLE=1

When ever i am sending mails to multiple email ids i am getting  "smtp Server policy Rejection Error".If iam seng to single email id ,it works.
By changing back to RECIPIENTTHROTTLE=0 in /etc/policyd_sender_throttle.conf,Error goes and everything works.But throttling is not working.
For Example
i enabled sender throttling in a domain through control panel after making the above changes and set maximum out going messages per day to 2 for that domain.Even after limiting i can send multiple mails from a user of this domain.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Throttling not working as expected

*) Please paste the original error message.
*) Paste output of command "postconf -n" to help troubleshoot.

3

Re: Throttling not working as expected

I am seeing identical behaviour on our server as what bijuedathodi reported.  We are also 0.8.3/1.8.1 LDAP on CENTOS 6.3

I would really like to get sender throttling working but get errors on all outbound mail with more than one recipient.

The following errors were occurring.  (IP's and names have been sanitized)  These are old errors that I archived so I could back and try to trouble shoot this at a later date.  (This is now that later date.)   Note the "invalid triplet" errors and the lack of "to=" log info from the message header.  There were just two recipients for this example.

Jan 15 10:56:27 cloud6 postfix/smtpd[22214]: connect from S010668efbddbbe4b.su.sender.net[17.5.21.24]
Jan 15 10:56:28 cloud6 postfix/smtpd[22214]: 3ADE824C16E: client=S010668efbddbbe4b.su.sender.net[17.5.21.24], sasl_method=
LOGIN, sasl_username=kayla@thedomain.com
Jan 15 10:56:29 cloud6 postfix/cleanup[22373]: 3ADE824C16E: message-id=<006c01cdf33a$cd1bdb20$67539160$@thedomain.com>
Jan 15 10:56:30 cloud6 policyd: invalid triplet_array[9][2]: (recipient throttle):
Jan 15 10:56:30 cloud6 postfix/smtpd[22214]: 3ADE824C16E: reject: END-OF-MESSAGE from S010668efbddbbe4b.su.sender.net[17.5.21.24]: 450 4.7.1 <END-OF-MESSAGE>: End-of-data rejected: Policy Rejection- Invalid data; from=<kayla@thedomain.com> proto=ESMTP helo=<DESIGN1>
Jan 15 10:56:31 cloud6 postfix/smtpd[22214]: CAA7524C16E: client=S010668efbddbbe4b.su.sender.net[17.5.21.24], sasl_method=LOGIN, sasl_username=kayla@thedomain.com
Jan 15 10:56:33 cloud6 postfix/cleanup[22371]: CAA7524C16E: message-id=<007301cdf33a$cf376820$6da63860$@thedomain.com>
Jan 15 10:56:33 cloud6 policyd: invalid triplet_array[9][2]: (recipient throttle):
Jan 15 10:56:33 cloud6 postfix/smtpd[22214]: CAA7524C16E: reject: END-OF-MESSAGE from S010668efbddbbe4b.su.sender.net[17.5.21.24]: 450 4.7.1 <END-OF-MESSAGE>: End-of-data rejected: Policy Rejection- Invalid data; from=<kayla@thedomain.com> proto=ESMTP helo=<DESIGN1>
Jan 15 10:56:35 cloud6 postfix/smtpd[22214]: disconnect from S010668efbddbbe4b.su.sender.net[17.5.21.24]

We are also getting the invalid triplet error on inbound mail that we relay to another external mail server.  In this case mail for domain.com is relayed to exchange.domain.com.

Jan 15 10:44:30 cloud6 postfix/smtpd[20344]: connect from unknown[16.18.0.17]
Jan 15 10:44:30 cloud6 policyd: rcpt=26, greylist=update_train, host=16.18.0.17 (unknown), from=sender@senderdomain.com, to=jack@domain.com, size=8580
Jan 15 10:44:30 cloud6 postfix/smtpd[20344]: 5544E24C16E: client=unknown[16.18.0.17]
Jan 15 10:44:31 cloud6 policyd: rcpt=27, greylist=update_train, host=16.18.0.17 (unknown), from=sender@senderdomain.com, to=jill@domain.com, size=8580
Jan 15 10:44:31 cloud6 postfix/cleanup[20114]: 5544E24C16E: message-id=<OF03CE5DC7.09BF7D3C-ON85257AF4.005670BF-85257AF4.0056783sender@senderdomain.com>
Jan 15 10:44:31 cloud6 policyd: invalid triplet_array[11][2]: (recipient throttle):
Jan 15 10:44:31 cloud6 postfix/smtpd[20344]: 5544E24C16E: reject: END-OF-MESSAGE from unknown[16.18.0.17]: 450 4.7.1 <END-OF-MESSAGE>: End-of-data rejected: Policy Rejection- Invalid data; from=<sender@senderdomain.com> proto=ESMTP helo=<mailus1.senderdomain.com>
Jan 15 10:44:31 cloud6 postfix/smtpd[20344]: disconnect from unknown[16.18.0.17]


Configs are thus:


iRedAdmin Pro LDAP 1.8.1
iRedMail 0.8.3
Postfix 2.6.6-2.3
Policyd 1.82-6

policyd.conf
SENDERTHROTTLE=0
SENDER_THROTTLE_SASL=0
SENDER_THROTTLE_HOST=0

policyd_sender_throttle.conf
SENDERTHROTTLE=1
SENDER_THROTTLE_SASL=1
SENDER_THROTTLE_HOST=0

main.cf

smtpd_recipient_restrictions =
        check_client_access hash:/etc/postfix/whitelist,
        reject_unknown_sender_domain,
        reject_unknown_recipient_domain,
        <skipping a few lines>
        check_policy_service inet:127.0.0.1:10031

smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
mailbox_command = /usr/libexec/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = ./dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024
smtp-amavis_destination_recipient_limit = 1

4

Re: Throttling not working as expected

Maybe there's something wrong with Policyd setup in iRedMail. Currently, we run two Policyd instances, but it should work with just one instance, and listen on port 10031.

5 (edited by bijuedathodi 2013-03-24 15:40:35)

Re: Throttling not working as expected

ZhangHuangbin wrote:

*) Please paste the original error message.
*) Paste output of command "postconf -n" to help troubleshoot.

Error SMTP: [450] 4.7.1 <END-OF-MESSAGE>: End-of-data rejected: Policy Rejection- Invalid data+iRedmail

dovecot_destination_recipient_limit=1 is missing in postconf -n .but this entry is showing in main.cf file.

Error found while sending from roundcube

Mar 24 12:03:05 mailsrv postfix/smtpd[27509]: connect from mailsrv.xxx.com[127.0.0.1]
Mar 24 12:03:05 mailsrv postfix/smtpd[27509]: 814F0CC0073: client=mailsrv.xxx.com[127.0.0.1], sasl_method=LOGIN, sasl_username=test@xyz.com
Mar 24 12:03:07 mailsrv policyd: connection from: 127.0.0.1 port: 41118 slots: 0 of 2044 used
Mar 24 12:03:07 mailsrv policyd: invalid triplet_array[8][2]: (recipient throttle):
Mar 24 12:03:07 mailsrv postfix/smtpd[27509]: 814F0CC0073: reject: END-OF-MESSAGE from mailsrv.xxx.com[127.0.0.1]: 450 4.7.1 <END-OF-MESSAGE>: End-of-data rejected: Policy Rejection- Invalid data; from=<test@xyz.com> proto=ESMTP helo=<webmail.xyz.com>
Mar 24 12:03:07 mailsrv postfix/cleanup[27518]: 814F0CC0073: message-id=<1ca8861687465bcbe5932fc71a80ebbc@xyz.com>
Mar 24 12:03:07 mailsrv roundcube: SMTP Error: SMTP error: Failed to send data in /var/www/webmails/xyz/program/include/main.inc on line 1485 (POST /?_unlock=loading1364106582303&_lang=undefined?_task=mail&_action=send)
Mar 24 12:03:07 mailsrv postfix/smtpd[27509]: disconnect from mailsrv.xxx.com[127.0.0.1]


Here i tried to send mails using test@xyz.com to multiple email ids using webmail.