Limit email sending via web for shared hosting

Discussion in 'Plugins/Modules/Addons' started by themark, Mar 27, 2015.

  1. themark

    themark Member

    we need to limit the number of email that goes out from a specific website (eg. limit the function mail() to for example 1000email/day).
    At this time we have created a custom wrapper of the sendmail file. This barely works but is not the best way for sure.
    Some of you has some solid tools or tips that we can use?
    Must have:
    - ability to count the mail for any website hosted on the server (eg. 1000mail max per day for, 2000 mail max per day for;
    - must works with any php compilter (so suphp, fastcgi...);
    Any ideas?
    Thank you.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can do such email limits with policyd on a ISPConfig / postfix server.
  3. themark

    themark Member

    We already us policyd with success. But it's work only on smtp relay.
    My problem is to limit the mail that goes outsite from for example the mail() functions of php. Generally all the mail that goes out with sendmail.

    They don't goes throught policyd in any case in my experience...
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I know, all mail goes trough policyd. Maybe there is an exception rule for or something similar?
  5. themark

    themark Member

    Well actually the problem with policyd is that if the spammer change the mail-from or return-path (and this happen always), i can't count correctly the mail with policyd.

    btw i will open a new thread because probably i will facing another way to solve this, and could be usefull for others users.

  6. davidisko

    davidisko New Member

    I'm facing the same problem with policyd and php mail.
    Have you resolved this somehow?
  7. themark

    themark Member

    Yes we have solved. Specifically now we count not the mail from (that is wrong) but, the sasl-user used by the client in order to make the relay. You can choose that when you create the policyd policy.

Share This Page