POSTFIX - SPAM mentesítés, domain tartomány blokkolással

Fórumok

Sziasztok,

szeretnék blokkolni domain neveket, illetve domain tartományokat, de sajnos valami gond van a megvalósításomban :(.

A leírás szerint létrehoztam egy file-t:

/etc/postfix/access
Tartalma:


*.icu REJECT
canthocamera.com REJECT
carpartetc.com REJECT
bumbumtv.com REJECT
brightpagesapp.com REJECT
bidvise.com REJECT

Továbbá a main.cf-et kiegészítettem az alábbiakkal:


smtpd_sender_restrictions = hash:/etc/postfix/access
reject_unauth_destination = hash:/etc/postfix/access

Futtattam ezt a parancsot

postmap hash:/etc/postfix/access

Illetve újraindítottam a servert. - service postfix restart - Eddig hiba nélkül fut.

Viszont, ha "postfix stop && postfix start" a parancsot adom ki a következő hibát kapom.


/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
postfix/postfix-script: stopping the Postfix mail system
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: reject_unauth_destination=hash:/etc/postfix/access

Továbbá a blokkolni kívánt tartományból továbbra is jönnek a SPAM-ek....

Kérdésem, mit rontottam el, illetve hogyan lehetne blokkolni domain tartományt?

Köszi előre is!

Kalmi

Hozzászólások

Nekem a main.cf-ben ez van:

smtpd_sender_restrictions = pcre:/etc/postfix/rejected_domains

A rejected_domains-ban pedig ez:


/\.icu$/ REJECT All Icu Domains

Régen minden más volt... ma meg minden a régi.

+1 Én is épp tegnapelőtt csináltam meg. Jobb ide a PCRE, mint a hash, mert így bármilyen regexp-re lehet szűrni a komplett e-mail címet. Illetve én mellette smtpd_helo_restrictions-t is használok a host-okra szűrve.

----------------------------------^v--------------------------------------
"Probléma esetén nyomják meg a piros gombot és nyugodjanak békében!"

PCRE-ben így kell kinéznie:


/\.icu$/ REJECT Stop spamming!
/^go.*\.org/ REJECT

...és nem kell postmap-elni (nem is lehet), "önmagában" működik.

----------------------------------^v--------------------------------------
"Probléma esetén nyomják meg a piros gombot és nyugodjanak békében!"

Sikerült vele foglalkoznom és szerintem sikerült megoldanom.

Az első "gond" az volt, hogy nem ment a "pcre:" - postconf -m. Nem telepítettem fel a "apt-get install postfix-mysql".

Helyette: "check_sender_access regexp:/etc/postfix/access" lett.

Az access file-ban pedig:


/\.icu$/ REJECT
/\canthocamera.com$/ REJECT
....

Ennyi. Köszi a segítséget :)

Kalmi

Olyan kérdésem lenne, hogy esetleg tartalmat lehetne-e valahogy blokkolni, mert amit kapok SPAM áradatot abban néha egyeznek a domain nevek. Ellenben a tartalom az nagyon hasonló elemeket tartalmaz...