@aroun

Как сделать фильтрацию исходящих доменов у exim?

Коллеги, прошу помощи

Необходимо отфильтровать при отправке некоторые домены, из списка, использую вот такую конструкцию:

check_outgoing:
driver = redirect
domains = ! +local_domains
senders = *@lsearch;/etc/exim4/sender_reject.list
allow_fail = yes
data = :fail: You can not send mail from this mailbox from this server.


Вот сам список:

cat /etc/exim4/sender_reject.list
gmail.com
mail.ru
yandex.ru


Запускаю тест:

exim -bt -d-resolver kirkorn@yandex.ru

Testing kirkorn@yandex.ru
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering kirkorn@yandex.ru
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing kirkorn@yandex.ru
--------> check_outgoing router <--------
local_part=kirkorn domain=yandex.ru
checking domains
yandex.ru in "@:localhost"? no (end of list)
yandex.ru in "! +local_domains"? yes (end of list)
checking senders
address match: subject=root@worker.yandex.ru pattern=*@lsearch;/etc/exim4/sender_reject.list
search_open: lsearch "/etc/exim4/sender_reject.list"
search_find: file="/etc/exim4/sender_reject.list"
  key="worker.yandex.ru" partial=-1 affix=NULL starflags=0
LRU list:
  :/etc/exim4/sender_reject.list
  End
internal_search_find: file="/etc/exim4/sender_reject.list"
  type=lsearch key="worker.yandex.ru"
file lookup required for worker.yandex.ru
  in /etc/exim4/sender_reject.list
lookup failed
worker.yandex.ru in "lsearch;/etc/exim4/sender_reject.list"? no (end of list)
root@worker.yandex.ru in "*@lsearch;/etc/exim4/sender_reject.list"? no (end of list)
check_outgoing router skipped: senders mismatch


Если в список добавить worker.yandex.ru, то он отфильтруется:

Testing kirkorn@yandex.ru
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering kirkorn@yandex.ru
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing kirkorn@yandex.ru
--------> check_outgoing router <--------
local_part=kirkorn domain=yandex.ru
checking domains
yandex.ru in "@:localhost"? no (end of list)
yandex.ru in "! +local_domains"? yes (end of list)
checking senders
address match: subject=root@worker.yandex.ru pattern=*@lsearch;/etc/exim4/sender_reject.list
search_open: lsearch "/etc/exim4/sender_reject.list"
search_find: file="/etc/exim4/sender_reject.list"
  key="worker.yandex.ru" partial=-1 affix=NULL starflags=0
LRU list:
  :/etc/exim4/sender_reject.list
  End
internal_search_find: file="/etc/exim4/sender_reject.list"
  type=lsearch key="worker.yandex.ru"
file lookup required for worker.yandex.ru
  in /etc/exim4/sender_reject.list
lookup yielded:
worker.yandex.ru in "lsearch;/etc/exim4/sender_reject.list"? yes (matched "lsearch;/etc/exim4/sender_reject.list")
root@worker.yandex.ru in "*@lsearch;/etc/exim4/sender_reject.list"? yes (matched "*@lsearch;/etc/exim4/sender_reject.list")
calling check_outgoing router
rda_interpret (string): :fail: You can not send mail from this mailbox from this server.
expanded: :fail: You can not send mail from this mailbox from this server.
file is not a filter file
parse_forward_list: :fail: You can not send mail from this mailbox from this server.
extract item: :fail: You can not send mail from this mailbox from this server.
check_outgoing router forced address failure
kirkorn@yandex.ru is undeliverable: You can not send mail from this mailbox from this server.
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=12481 terminating with rc=2 >>>>>>>>>>>>>>>>
  • Вопрос задан
  • 415 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы