Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dnslookup:
- driver = dnslookup
- domains = ! +local_domains
- transport = remote_smtp
- ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
- no_more
- mailman_router:
- driver = accept
- require_files = MAILMAN_HOME/lists/$local_part/config.pck
- local_part_suffix_optional
- local_part_suffix = -bounces : -bounces+* : \
- -confirm+* : -join : -leave : \
- -owner : -request : -admin
- headers_remove = X-Spam-Score:X-Spam-Report
- transport = mailman_transport
- ditch_maxmsgsize:
- driver = redirect
- allow_fail
- condition = ${if >{$message_size}{${lookup mysql{select users.maxmsgsize from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.maxmsgsize > 0 \
- and users.domain_id=domains.domain_id }{${value}K}fail}} {yes}{no}}
- data = :fail:\n\Your message is too big.\n \
- Your message was rejected because the user $local_part@$domain\n \
- does not accept messages larger than \
- ${lookup mysql{select users.maxmsgsize from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.maxmsgsize > 0 \
- and users.domain_id=domains.domain_id}{${value}K}fail} Kb.
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- ditch_malware:
- driver = redirect
- allow_fail
- data = :blackhole:
- condition = ${if and { {match {$h_X-ACL-Warn:}{.*malware.*}} \
- {eq {${lookup mysql{select users.on_avscan from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_avscan = '1' \
- and users.domain_id=domains.domain_id}}}{1} }} {yes}{no} }
- ditch_spam:
- driver = redirect
- allow_fail
- data = :blackhole:
- condition = ${if >{$spam_score_int}{${lookup mysql{select users.sa_refuse * 10 from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_spamassassin = '1' \
- and users.domain_id=domains.domain_id \
- and users.sa_refuse > 0 }{$value}fail}} {yes}{no}}
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- ditch_hdrmailer:
- driver = redirect
- allow_fail
- data = :blackhole:
- condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
- where blocklists.blockhdr = 'x-mailer' \
- and blocklists.blockval = '${quote_mysql:$h_x-mailer:}' \
- and users.localpart = '${quote_mysql:$local_part}' \
- and domains.domain = '${quote_mysql:$domain}' \
- and domains.domain_id=blocklists.domain_id \
- and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- ditch_hdrto:
- driver = redirect
- allow_fail
- data = :blackhole:
- condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
- where blocklists.blockhdr = 'to' \
- and blocklists.blockval = '${quote_mysql:$h_to:}' \
- and users.localpart = '${quote_mysql:$local_part}' \
- and domains.domain = '${quote_mysql:$domain}' \
- and domains.domain_id=blocklists.domain_id \
- and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- ditch_hdrfrom:
- driver = redirect
- allow_fail
- data = :blackhole:
- condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
- where blocklists.blockhdr = 'from' \
- and blocklists.blockval = '${quote_mysql:$h_from:}' \
- and users.localpart = '${quote_mysql:$local_part}' \
- and domains.domain = '${quote_mysql:$domain}' \
- and domains.domain_id=blocklists.domain_id \
- and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- ditch_hdrsubject:
- driver = redirect
- allow_fail
- data = :blackhole:
- condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
- where blocklists.blockhdr = 'subject' \
- and blocklists.blockval = '${quote_mysql:$h_subject:}' \
- and users.localpart = '${quote_mysql:$local_part}' \
- and domains.domain = '${quote_mysql:$domain}' \
- and domains.domain_id=blocklists.domain_id \
- and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- virtual_vacation:
- driver = accept
- condition = ${if and { {!match {$h_precedence:}{(?i)junk|bulk|list}} \
- {eq {${lookup mysql{select users.on_vacation from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_vacation = '1' \
- and users.domain_id=domains.domain_id}}}{1} }} {yes}{no} }
- no_verify
- no_expn
- unseen
- transport = virtual_vacation_delivery
- virtual_forward:
- driver = redirect
- check_ancestor
- unseen = ${if eq {${lookup mysql{select unseen from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_forward = '1' \
- and users.domain_id=domains.domain_id}}}{1} {yes}{no}}
- data = ${lookup mysql{select forward from users,domains \
- where localpart='${quote_mysql:$local_part}' \
- and domain='${quote_mysql:$domain}' \
- and users.domain_id=domains.domain_id \
- and on_forward = '1'}}
- # We explicitly make this condition NOT forward mailing list mail!
- condition = ${if and { {!match {$h_precedence:}{(?i)junk}} \
- {eq {${lookup mysql{select users.on_forward from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_forward = '1' \
- and users.domain_id=domains.domain_id}}}{1} }} {yes}{no} }
- virtual_domains:
- driver = redirect
- allow_fail
- data = ${lookup mysql{select smtp from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and domains.enabled = '1' \
- and users.enabled = '1' \
- and users.domain_id = domains.domain_id}}
- headers_add = ${if >{$spam_score_int}{${lookup mysql{select users.sa_tag * 10 from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_spamassassin = '1' \
- and users.domain_id=domains.domain_id }{$value}fail}} {X-Spam-Flag: YES\n}{} }
- headers_remove = ${if or { { <{$spam_score_int}{1} } \
- { <{$spam_score_int}{${lookup mysql{select users.sa_tag * 10 from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_spamassassin = 1 \
- and users.domain_id=domains.domain_id}{$value}fail}} } \
- { eq {0}{${lookup mysql{select users.sa_tag * 10 from users,domains \
- where localpart = '${quote_mysql:$local_part}' \
- and domain = '${quote_mysql:$domain}' \
- and users.on_spamassassin = 0 \
- and users.domain_id=domains.domain_id}{$value}fail}}} \
- } {X-Spam-Score:X-Spam-Report} }
- local_part_suffix = -*
- local_part_suffix_optional
- retry_use_local_part
- file_transport = virtual_delivery
- reply_transport = address_reply
- pipe_transport = address_pipe
- .include /etc/exim4/vexim-group-router.conf
- virtual_domains_catchall:
- driver = redirect
- allow_fail
- data = ${lookup mysql{select smtp from users,domains where localpart = '*' \
- and domain = '${quote_mysql:$domain}' \
- and users.domain_id = domains.domain_id}}
- retry_use_local_part
- file_transport = virtual_delivery
- reply_transport = address_reply
- pipe_transport = address_pipe_catchall
- virtual_domain_alias:
- driver = redirect
- allow_fail
- data = ${lookup mysql{select concat('${quote_mysql:$local_part}@', domain) \
- from domains,domainalias where domainalias.alias = '${quote_mysql:$domain}' \
- and domainalias.domain_id = domains.domain_id}}
- retry_use_local_part
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement