On 10/12/2012 13:18, soumya tr wrote:

Hi,

How can I set policyd to track mails with from address as header-from, instead of envelop from?

To elaborate the issue:

We have many cpanel shared servers. As of now all the outgoing emails from these shared servers are routed via another server. The relay server has postfix+policyd set.

In the Postfix server the limit set in policyd is like:

- X mails per sender [ eg: [email protected] <mailto:[email protected]>] per hour
- Y mails per domain [ eg: domain.com <http://domain.com>] per hour

So once the limit X,Y is reached, mails will be sent back to the sender itself.

Also, postfix server has some more checks like only the mails coming from shared servers will be processed [IP address is checked]

Coming to the actual issue:

Incase of forwarder mails, the from address is the actual sender address. To elaborate, suppose I have a forwarder set as shown below:

-------------------
All the mails for [email protected] <mailto:[email protected]> will be forwarded to [email protected] <mailto:[email protected]>
-------------------

Now suppose I am sending a mail from [email protected] <mailto:[email protected]> to [email protected] <mailto:[email protected]>. So as per the forwarder being set the mail will be forwarded to [email protected] <mailto:[email protected]>, and as per my set up it will be relaying via the Postfix server.

-------------------
Mail from '[email protected] <mailto:[email protected]>' -----> to '[email protected] <mailto:[email protected]>' -------> forwarded to '[email protected] <mailto:[email protected]>'
-------------------

The mail header shows the from address in case of forwarder mail as '[email protected] <mailto:[email protected]>' itself. And the mail being tracked is '[email protected] <mailto:[email protected]>', instead it should be '[email protected] <mailto:[email protected]>'.

Now say, there are many accounts for which forwarders are set. And the customers are sending mails from gmail.com <http://gmail.com> to forwarder mail addresses. But when the limit Y is reached at the relay server for 'gmail.com <http://gmail.com>', the mails start bouncing back. Which means in an hour only about Y forwarder mails with sender domain as 'gmail' will be allowed to send.

Is there any way to set policyd track the actual from address instead of envelop from address?

Please let me know your thoughts/tips. Also if any other method can be used to fix this issue, it would be of great help.

Unfortunately the postfix policy delegation protocol doesn't support sending headers in the policy request.

To do something like that we'd probably need to use milter, I started work on a milter interface but no one seemed interested so I kinda put that on hold.

-N

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users_lists.policyd.org

Reply via email to