LINUX.ORG.RU

История изменений

Исправление leg0las, (текущая версия) :

Прикрутил я таки этот SPF к своему счетчику. Знатоки, поправьте, если накосячил:

.ifdef CHECK_RCPT_SPF
warn    !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${run{/usr/bin/spfquery.mail-spf-perl --ip \
            ${quote:$sender_host_address} --identity \
            ${if def:sender_address_domain \
            {--scope mfrom  --identity ${quote:$sender_address}}\
            {--scope helo --identity ${quote:$sender_helo_name}}}}\
            {no}{${if eq {$runrc}{1}{yes}{no}\
            {${if eq {$runrc}{6}{yes}{no}}}}}}
        log_message = SPF check failed
        set acl_m0   = ${eval:$acl_m0+150}

warn    !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${if eq {$runrc}{2}{yes}{no}\
            {${if eq {$runrc}{3}{yes}{no}\
            {${if eq {$runrc}{4}{yes}{no}\
            {${if eq {$runrc}{5}{yes}{no}}}}}}}}
        log_message = SPF information not valid
        set acl_m0   = ${eval:$acl_m0+45}

warn    !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${if >{$runrc}{6}{yes}{no}}
        log_message = Unexpected error in SPF check.
        set acl_m0   = ${eval:$acl_m0+60}
.endif

Исходная версия leg0las, :

Прикрутил я таки этот SPF к своему счетчику. Знатоки, поправьте, если накосячил:

.ifdef CHECK_RCPT_SPF
warn    !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${run{/usr/bin/spfquery.mail-spf-perl --ip \
            ${quote:$sender_host_address} --identity \
            ${if def:sender_address_domain \
            {--scope mfrom  --identity ${quote:$sender_address}}\
            {--scope helo --identity ${quote:$sender_helo_name}}}}\
            {no}{${if eq {$runrc}{1}{yes}{no}\
            {${if eq {$runrc}{6}{yes}{no}}}}}}
        log_message = SPF check failed
        set acl_m0   = ${eval:$acl_m0+60}

warn    !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${if eq {$runrc}{2}{yes}{no}\
            {${if eq {$runrc}{3}{yes}{no}\
            {${if eq {$runrc}{4}{yes}{no}\
            {${if eq {$runrc}{5}{yes}{no}}}}}}}}
        log_message = SPF information not valid
        set acl_m0   = ${eval:$acl_m0+45}

warn    !authenticated = *
        hosts = !+relay_from_hosts
        condition = ${if >{$runrc}{6}{yes}{no}}
        log_message = Unexpected error in SPF check.
        set acl_m0   = ${eval:$acl_m0+60}
.endif