|
NAMEqmail-rblchk - filter all incoming mail and check if it comes from RBL listed IPs.SYNOPSIS| qmail-rblchk [ options ] [ /SpamDir/ ]DESCRIPTIONqmail-rblchk is used in .qmail files to check the IP address from the Received: from lines. It has the same function as rblsmtpd(1) , but the messages are checked at local delivery time. With this you can check the content of the message by simply redirecting it to another mailbox or address.If a directory is given with /SpamDir/ parameter, all spam message are delivered to that directory if it exist and is in Maildir format. The directory name must start with a / or . (dot) and end with a /. OPTIONSGeneral options:
Control options:
You must specify one or more (max 32) RBL address or a CDB file, example: -r dnsbl.sorbs.net -r sbl-xbl.spamhaus.org -r relays.ordb.org -X rule.cdb -r relays.ordb.org
EXIT CODESThe program exit status in normal mode: 0 when the message is not blocked 100 when the message is blocked 111 when the program fails or no options were givenIn delivery mode: 0 the message is not blocked (continue .qmail checking) 99 the blocked message has been written to ``SpamDir'' Maildir 111 when the program fails or no options were given In condredirect compatibility mode: 0 when the message is blocked 1 when the message is not blocked 111 when the program fails or no options were given EXAMPLESThere are some examples of qmail-rblchk use, please use them carefully to prevent loss of mail.We check bl.spamcop.net and dialups.mail-abuse.org RBL list. If the mail is spam, the delivery will fail, and the sender will receive a bounce message: # we discard all suspected mail | qmail-rblchk -r dnsbl.sorbs.net -r sbl-xbl.spamhaus.org We delivery all mail that comes from RBL listed IP addresses to our ../spam/ Maildir: # save spam-suspected mail in another Maildir | qmail-rblchk -r dnsbl.sorbs.net -r sbl-xbl.spamhaus.org ../spam/ Same as above, but all spam messages are delivered to me-spam address with condredirect : # save spam-suspected mail in another box | condredirect me-spam qmail-rblchk -c -r dnsbl.sorbs.net \ -r sbl-xbl.spamhaus.org If you prefere to use a CDB file, crete a rule file like that: # allow mails from local network 192.168.0.:allow # some spammer IPs 10.0.0.1:deny 1.2.3.4:deny create the CDB file with: tcprules rule.cdb rule.tmp < rule The .qmail file is: # save spam-suspected mail in another Maildir | qmail-rblchk -X ./rule.cdb -r sbl-xbl.spamhaus.org ../spam/ if the IP is found in rule.cdb qmail-rblchk follow the rule in the file: allow the message is good deny the message is spam if the IP is not listed qmail-rblchk continue with normal RBL checking. You can insert into the CDB file a default rule (:allow or :deny), to block or accept all other IPs. AUTHORLuca Morettoni <luca@morettoni.net> - http://morettoni.netTHANKSJoerg Backschues <jbks@tca-os.de> for the English page check and testing on 300.000 users and 500.000 mails system;Brian T Glenn <glenn@delink.net> for some option suggestions and for the disk space at USA mirror; Emanuel Haupt <haupt@critical.ch> for the FreeBSD port and manpage hints; Emanuel's wife for the manpage correction. SEE ALSOdot-qmail(5), qmail-command(8), condredirect(1), tcprules(1)http://morettoni.net/qmail-rblchk.en.html BUGSReport me any bug, problem or other hints! Visit the GSP FreeBSD Man Page Interface. |