Тут подумал и решил отказаться от files, но возник вопрос о производительности: не будет ли это грамтным ручником для почтовой системы?
Аккаунты, редиректы, автоответчики хранятся в mysql. Данные о dynamic_polls и blocked в files.
Больше волнует dynamic_pools. Его содержание:
Работает вот так:^.*([1-9]+)-([0-9]+)-([0-9]+)-([1-9]+).*
^.*([1-9]+).([0-9]+).([0-9]+).([1-9]+).*
^.*pool.*
^.*dial.*
^.*dyn.*
^.*pppoe.*
^.*ppp([1-9]+).*
^host-.*
^.*upc-f.chello.nl.*
^.*-adsl.*
^.*.dynamicip..*
^.*user([1-9]+).99.udn.pl
^pehopwood.plus.com
^.*.dip([1-9]+).t-ipconnect.de
^.*cablelink-.*
^.*defnesrv.*
^friend$
^localhost.localdomain$
^.*(DM)
^.*dsldd
^.*dsl-
^.*dsld+-d+.*
^.*adsl.*
^.*dynamic.*
^.*dialup.*
^.*static*
^.*dhcp.*
^.*user.veloxzone.com.br.*
accept local_parts = postmaster
domains = +local_domains
accept authenticated = *
deny condition = ${lookup {$sender_helo_name} nwildlsearch{/usr/local/etc/exim/blocked}{1}{0}}
!hosts = +relay_from_hosts
message = "You are blocked. If you think this is wrong, please, send your complaint to the following adress xx@xx.xx."
deny condition = ${lookup {${escape:${lookup dnsdb{ptr=$sender_host_address}}}} nwildlsearch{/usr/local/etc/exim/dynamic_pools}{1}{0}}
!hosts = +relay_from_hosts
message = "Bad PTR record, use SMTP your ISP. If you think this is wrong, please, send your complaint to the following adress xx@xx.xx."
deny condition = ${lookup {$sender_host_name} nwildlsearch{/usr/local/etc/exim/dynamic_pools}{1}{0}}
!hosts = +relay_from_hosts
message = "Bad host, use SMTP your ISP. If you think this is wrong, please, send your complaint to the following adress xx@xx.xx."
deny condition = ${lookup {$sender_helo_name} nwildlsearch{/usr/local/etc/exim/dynamic_pools}{1}{0}}
!hosts = +relay_from_hosts
message = "Bad HELO, use SMTP your ISP. If you think this is wrong, please, send your complaint to the following adress xx@xx.xx."