Commit ac7a2f15 authored by Florian Pritz's avatar Florian Pritz
Browse files

Add role/postfwd



Config copied from nymeria.
Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 7adb07bd
---
- name: reload postfwd
service: name=postfwd state=reloaded
---
- name: install postfwd
pacman: name=postfwd state=present
- name: install postfwd.cf
template: src=postfwd.cf.j2 dest=/etc/postfwd/postfwd.cf owner=root group=root mode=600
notify:
- reload postfwd
- name: start and enable postfwd
service: name=postfwd enabled=yes state=started
# skip lower rate limiting for certain users
# TODO: populate this from a variable if the feature is used
&&SASL_WHITELIST {
sasl_username=devnull;
};
# skip lower rate limiting for certain users
# sasl_username != doesn't work for whatever reason
id=SaslWhitelist;
protocol_state==END-OF-MESSAGE;
&&SASL_WHITELIST;
action=rcpt(sasl_username/300/21600/REJECT You can only send to 300 recipients per 6h per user)
# skip lower rate limiting for certain users
id=SaslWhitelist2;
protocol_state==END-OF-MESSAGE;
&&SASL_WHITELIST;
action=dunno;
# sasl_username != doesn't work for whatever reason
id=RcptRate;
protocol_state==END-OF-MESSAGE;
sasl_username!~/^$/;
action=rcpt(sasl_username/100/21600/REJECT You can only send to 100 recipients per 6h per user)
# this causes postfwd to log something for every mail; easier testing
id=logging;
protocol_state==END-OF-MESSAGE;
action=dunno;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment