Hi,

You might want to 'replace' the postfix sendmail command with
mini_sendmail or something alike, and have that actually forward to
localhost:25 using SMTP. Then you can apply throttling on the localhost
ip, but lose the ability to see which local user was the source.


Tom

On 11-11-15 08:41, Benning, Markus wrote:
> On 2015-11-10 23:42, Donald Bindner wrote:
>> smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10040
> 
> You may want to use a different restriction than recipient.
> The recipient restrictions are executed for every recipient.
> It gets executed multiple times if the mail has more than one recipient.
> 
>> However, this kind of rule seems to run only for mail "passing
>> through" my Postfix server and not for mail originating locally.  In
>> any event, the service running on port 10040 does not receive
>> connections from Postfix for mail that is generated locally.
> 
> If you mean real local submission by commandline, then you cant limit
> mails sent
> this way. The checks are only implemented by smtpd.
> 
> If you mean the submission server (port 587) then you may want to check
> your master.cf.
> May be it overwrites the option with different value like:
> 
>   -o smtpd_recipient_restrictions=
> 
>> I'd love if someone would show an example that "hooks this up."  I'm
>> confident that I have postfwd configured correctly to listen on port
>> 10040, I just need Postfix to talk to it.
> 
> No postfwd example, but mtpolicyd is also able to add quotas based on
> sasl_username:
> 
> https://www.mtpolicyd.org/getting-started.html#Mail::MtPolicyd::Cookbook::HowtoAccountingQuota
> 
> 
> 
> Markus
> 

Reply via email to