Integração com Exim do cPanel SPFBL

Leandro Carlos Rodrigues edited this page Jun 20, 2018 · 3 revisions

Se a configuração do Exim for feita for cPanel, basta seguir na guia "Advanced Editor", e ativar a opção "custom_begin_rbl" com o seguinte código:

  warn
    set acl_c_spfbl = ${run{/usr/local/bin/spfbl.sh query "$sender_host_address" "$sender_address" "$sender_helo_name" "$local_part@$domain"}{ERROR}{$value}}
    set acl_c_spfreceived = $runrc
    set acl_c_spfblticket = ${sg{$acl_c_spfbl}{(PASS |SOFTFAIL |NEUTRAL |NONE |FAIL |LISTED |BLOCKED |FLAG |WHITE )}{}}
  deny
    message = 5.7.1 SPFBL $sender_host_address is not allowed to send mail from $sender_address.
    log_message = SPFBL check failed.
    condition = ${if eq {$acl_c_spfreceived}{3}{true}{false}}
  defer
    message = A transient error occurred when checking SPF record from $sender_address, preventing a result from being reached. Try again later.
    log_message = SPFBL check error.
    condition = ${if eq {$acl_c_spfreceived}{6}{true}{false}}
  deny
    message = One or more SPF records from $sender_address_domain could not be interpreted. Please see http://www.openspf.org/SPF_Record_Syntax for details.
    log_message = SPFBL check unknown.
    condition = ${if eq {$acl_c_spfreceived}{7}{true}{false}}
  deny
    message = 5.7.1 SPFBL sender has non-existent internet domain. See http://spfbl.net/en/feedback
    log_message = SPFBL check nxdomain.
    condition = ${if eq {$acl_c_spfreceived}{13}{true}{false}}
  deny
    message = 5.7.1 SPFBL IP or sender is invalid. See http://spfbl.net/en/feedback
    log_message = SPFBL check invalid.
    condition = ${if eq {$acl_c_spfreceived}{14}{true}{false}}
  defer
    message = 4.7.2 SPFBL LISTED $acl_c_spfblticket
    log_message = SPFBL check listed.
    condition = ${if eq {$acl_c_spfreceived}{8}{true}{false}}
    condition = ${if match {$acl_c_spfblticket}{^http://}{true}{false}}
  defer
    message = 4.7.2 SPFBL you are temporarily blocked on this server. See http://spfbl.net/en/feedback
    log_message = SPFBL check listed.
    condition = ${if eq {$acl_c_spfreceived}{8}{true}{false}}
  deny
    message = 5.7.1 SPFBL BLOCKED $acl_c_spfblticket
    log_message = SPFBL check blocked.
    condition = ${if eq {$acl_c_spfreceived}{10}{true}{false}}
    condition = ${if match {$acl_c_spfblticket}{^http://}{true}{false}}
  deny
    message = 5.7.1 SPFBL you are permanently blocked on this server. See http://spfbl.net/en/feedback
    log_message = SPFBL check blocked.
    condition = ${if eq {$acl_c_spfreceived}{10}{true}{false}}
  discard
    log_message = SPFBL check spamtrap.
    condition = ${if eq {$acl_c_spfreceived}{11}{true}{false}}
  defer
    message = 4.7.1 SPFBL you are greylisted on this server. See http://spfbl.net/en/feedback
    log_message = SPFBL check greylisting.
    condition = ${if eq {$acl_c_spfreceived}{12}{true}{false}}
  defer
    message = A transient error occurred when checking SPF record from $sender_address, preventing a result from being reached. Try again later.
    log_message = SPFBL check timeout.
    condition = ${if eq {$acl_c_spfreceived}{9}{true}{false}}
  warn
    log_message = SPFBL check flag.
    condition = ${if eq {$acl_c_spfreceived}{16}{true}{false}}
    add_header = X-Spam-Status: Yes
    add_header = Received-SPFBL: $acl_c_spfbl
  warn
    condition = ${if eq {$acl_c_spfreceived}{16}{false}{true}}
    add_header = X-Spam-Status: No
    add_header = Received-SPFBL: $acl_c_spfbl
  warn
    set acl_c_spfblticket = ${sg{$acl_c_spfblticket}{http://.+/([0-9a-zA-Z_-]+)\\n}{\$1}}
  accept
    condition = ${if eq {$acl_c_spfreceived}{17}{true}{false}}

Para que a mensagem seja roteada pelo cPanel para a pasta ".Junk" do destinatário, é necessário criar o arquivo ".spamassassinboxenable" dentro da pasta home deste mesmo destinatário.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.