Exim backup mx (только если основной mx недоступен)
Добавлено: 2012-06-26 16:04:45
Доброе время суток!
Возникла необходимость предоставить части клиентов backup mx, т.к. довольно много СПАМа отправляется именно через backup mx я решил ограничить доступность backup mx только временем недоступности основного mx.
Гуглением было найдено решение:
(с)http://tinderblog.wordpress.com/category/bandwidth/
Хотелось бы узнать нет ли каких-то "подводных камней" в использовании такого решения?
Возникла необходимость предоставить части клиентов backup mx, т.к. довольно много СПАМа отправляется именно через backup mx я решил ограничить доступность backup mx только временем недоступности основного mx.
Гуглением было найдено решение:
Код: Выделить всё
CHECK_RCPT_LOCAL_ACL_FILE=/etc/exim4/exim4.acl.conf
callout_positive_expire = 5m
This allows us to create a file called /etc/exim4/exim4.acl.conf which contains additional ACL (access control list) conditions. The other change, callout_positive_expire, I’ll describe in a minute.
I created /etc/exim4/exim4.acl.conf with the following contents:
# if we know that the primary MX rejects this address, we should too
deny
! verify = recipient/callout=30s,defer_ok
message = Rejected by primary MX
# detect whether the callout is failing, without causing it to
# defer the message. only a warn verb can do this.
warn
set acl_m_callout_deferred = true
verify = recipient/callout=30s
set acl_m_callout_deferred = false
# if the callout did not fail, and the primary mail server is not
# refusing mail for this address, then it's accepting it, so tell
# our client to try again later
defer
! condition = $acl_m_callout_deferred
message = The primary MX is working, please use it
# callout is failing, main server must be failing,
# accept everything
accept
message = Accepting mail on behalf of primary MX
Хотелось бы узнать нет ли каких-то "подводных камней" в использовании такого решения?