> Hello! > > How can I limit outgoing mail with postfwd? > > I tried a simple rule like id=DEFAULT; action=dunno > > Dec 16 18:44:40 sheldon postfwd[4000]: [RULES] rule=0, id=DEFAULT, > client=*****[000.000.000.000], sender=<info@****>, > recipient=<info@****>, helo=<****>, proto=ESMTP, state=RCPT, delay=0s, > hits=DEFAULT, action=dunno > > but I don't figure out how can I add a rule for a outgoing traffic.
If you want to catch outgoing traffic, it is important that you call postfwd before permit_mynetworks and such. Otherwise postfix won't query postfwd for the particular request: smtpd_recipient_restrictions = check_policy_service 127.0.0.1:10040, # <-- here permit_mynetworks, reject_unauthdestination, ... And take care with "permit" actions in postfwd's ruleset, so that you do not become an open relay to anyone. Consider using "permit_auth_destination" instead. For rate limit examples see postfwd's documentation at http://postfwd.org. If you have any ruleset related questions you are welcome to ask them on postfwd's mailinglist. Best regards Jan P. Kessler