Exim: автоблокировка спам-хостов

Exim: автоблокировка спам-хостов

Несмотря на то, что моя конфигурация Exim вышла довольно удачной, некоторое количество спама через нее все же проходит. Как правило, сыпется он с одних и тех же спам-серверов, которые можно блокировать. Однако, каждый раз ходить на сервер через некоторое время становится лениво, потому автоматизируем процесс:

#!/bin/sh

for file in `find /var/mail/yourdomain.com/spamreport/new -type f`
do
    cat $file | grep "Subject: block=" | sed 's/Subject: block=//' >> /usr/local/etc/exim/spam-hosts
done

rm -f /var/mail/yourdomain.com/spamreport/new/*

Осталось внести изменения в конфигурацию Exim. Добавляем в /usr/local/etc/exim/100.main.conf:

hostlist bad_hosts = net-iplsearch;/usr/local/etc/exim/spam-hosts

В /usr/local/etc/exim/configure правим ту часть, где описывается acl_check_rcpt:

# Эти правила срабатывают для каждого письма
acl_check_rcpt:

warn set acl_c_lp       = $local_part@$domain

deny   message = Relay not permitted
       hosts = +bad_hosts

Создаем файл и перезапускаем Exim:

# touch /usr/local/etc/exim/spam-hosts
# /usr/local/etc/rc.d/exim restart

Для успешной работы надо создать почтовый ящик [email protected] и вставить вызов скрипта в Cron. Теперь на [email protected] можно отправлять письма с темой «block=123.32.14.56», где 123.32.14.56 — ip спам-сервера.

Рейтинг 3.00/5

154 thoughts on “Exim: автоблокировка спам-хостов

  1. This was the Gene Simmons costume for thhe 1st couple of years of his joining KISS.
    Used copies flew off thhe shelves make any difference how badly abused had been looking.
    It’s about the only thing she isn’t taking part in.

  2. The best way to build trust is to continually put out good content.
    The more places you are seen, the stronger your message will be.
    Thee one underlying factor is «white hat techniques» always do property thing.

  3. First of all I want to say awesome blog! I had a quick question which I’d like to ask
    if you do not mind. I was curious to find out how you center yourself and clear your head prior to writing.
    I’ve had trouble clearing my thoughts in getting my thoughts out there.
    I truly do take pleasure in writing but it just seems
    like the first 10 to 15 minutes are generally lost simply just trying to figure out how to begin. Any recommendations or tips?
    Appreciate it!

  4. The grain used generating bread and feeding chickens has went up because theree just isn’t as
    muxh as there usually is. Consulting several doctirs will help to ensure
    the most accurate diagnosis possible.

  5. Manny plaayers tend to scafe oof busting, so simply take a couple
    of cards, then stand aand hoping for winning.

    Thus it’s almost impossible to predict the changes.
    The probability of winning big is low due for the house advantage.

  6. Our Islamabad-based independent escort organization gives VIP escort administrations in Islamabad satisfying global guidelines of escort administrations. Our suggestive and VIP call young ladies will make your evening and outing noteworthy.

    Call in Islamabad Escorts Service Islamabad

  7. Having read this I thought it was extremely enlightening.
    I appreciate you finding the time and effort to put
    this article together. I once again find myself spending a lot of time
    both reading and leaving comments. But so what, it was still worth it!

  8. Sexy Baccarat หรือ น่าหลงใหล บาคาร่า คือคาสิโนออนไลน์ยอดฮิตที่ปี ขวัญใจของนักเล่นบาคาร่าทั่วอีกทั้งเอเชีย ด้วยภาพจำที่ระลึกถึงได้ครั้งใดก็ตามได้ยินชื่อของชวนมองบาคาร่าก็คือสาวน้อยในชุดสุดวาบหวิว บีกินี่สีสันผ่องใส
    มีผ้าบางๆหุ้มด้านล่างไว้ หรือบางคนก็ไม่มีเลย มากับท่าเต้นน่ารักน่าเอ็นดู ผู้หญิงที่ร่าเริงแจ่มใส และรอยยิ้มที่ทำเอาคุณมองเพลิดเพลินกระทั่งแทบลืมวางเดิมพันก็มี
    แล้วก็ถ้าเกิดคุณยังใจสั่นน้อยเกินไปเราก็ขอบอกว่า ภาพและเสียงของการถ่ายทอดสดของค่ายเกมนี้มันแจ่มแจ้งหมดจดจริงๆแบบว่าคุณสามารถมองเห็นทุกมุมของโต๊ะพนันแบบไม่มีอะไรกั้น แถมยังมีเสียงดนตรีที่เชิญให้ครึกครื้นอยู่เสมอเวลา แล้วก็เว้นแต่บาคาร่ารวมทั้งยังมีอีกสารพัดสารพันเกมพนันให้ท่านได้เล่น เช่น ไฮโล, ไพ่เสือมังกร และรูเล็ต

Добавить комментарий для get more info Отменить ответ

Ваш адрес email не будет опубликован.