Страница 1 из 1

Exim backup mx (только если основной mx недоступен)

Добавлено: 2012-06-26 16:04:45
allan_sundry
Доброе время суток!

Возникла необходимость предоставить части клиентов 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

(с)http://tinderblog.wordpress.com/category/bandwidth/

Хотелось бы узнать нет ли каких-то "подводных камней" в использовании такого решения?

Re: Exim backup mx (только если основной mx недоступен)

Добавлено: 2012-11-18 17:03:34
Alex Keda
нет...
но некоторые будут до посинения стучаться тока на backup...

Re: Exim backup mx (только если основной mx недоступен)

Добавлено: 2012-11-19 11:03:33
allan_sundry
Alex Keda писал(а):нет...
но некоторые будут до посинения стучаться тока на backup...
Спасибо!

P.S.
С момента внедрения жалоб на работу схемы не поступало, хотя "некоторые" действительно ломятся именно на backup mx.
В основном большинстве "некоторые" - это злостные СПАМеры. :drinks: