From 7d4409c7b798ec4eee4fb86406a54209910ae6e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Tue, 22 Jan 2002 03:53:48 +0000 Subject: [PATCH] Make the MAIL FROM host dns check configurable. (thanks to Devin Carraway). Add more documentation to the README file. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@10 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 5 ++++ README | 33 +++++++++++++++++++++++ config.sample/require_resolvable_fromhost | 3 +++ qpsmtpd | 4 +-- 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 config.sample/require_resolvable_fromhost diff --git a/Changes b/Changes index dbd6d78..147e17e 100644 --- a/Changes +++ b/Changes @@ -8,4 +8,9 @@ support and enable taint checking (thanks to Devin Carraway ) + Make the MAIL FROM host dns check configurable. (thanks to Devin + Carraway). + + Add more documentation to the README file. + diff --git a/README b/README index fe50809..c576b42 100644 --- a/README +++ b/README @@ -6,3 +6,36 @@ mailinglist: qpsmtpd-subscribe@perl.org +Configuration files: + All configuration files goes into $DIR/config/ or /var/qmail/control/ + + qpsmtpd is supposed to support all the files that qmail-smtpd + supports and use them in the same way. When you find that it is not + the case, feel free to send a patch to the mailinglist or to + ask@develooper.com. + + Extra files you can use to configure qpsmtpd: + + rhsbl_zones + + Right hand side blocking lists, one per line. For example: + + dsn.rfc-ignorant.org does not accept bounces - http://www.rfc-ignorant.org/ + + See http://www.rfc-ignorant.org/ for more examples. + + + dnsbl_zones + + Normal ip based dns blocking lists ("RBLs"). For example: + + relays.ordb.org + spamsources.fabel.dk + + + require_resolvable_fromhost + + If this file contains anything but a 0 on the first line, + envelope senders will be checked against DNS. If an A or a MX + record can't be found the mail command will return a soft + rejection (450). diff --git a/config.sample/require_resolvable_fromhost b/config.sample/require_resolvable_fromhost new file mode 100644 index 0000000..ce052b5 --- /dev/null +++ b/config.sample/require_resolvable_fromhost @@ -0,0 +1,3 @@ +1 + +# use 0 to disable; anything else to enable. \ No newline at end of file diff --git a/qpsmtpd b/qpsmtpd index 893e4cb..1ce8be5 100755 --- a/qpsmtpd +++ b/qpsmtpd @@ -2,8 +2,7 @@ # Copyright (c) 2001 Ask Bjoern Hansen. See the LICENSE file for details. # The "command dispatch" system is taken from colobus - http://trainedmonkey.com/colobus/ # -# this is designed to be run under tcpserver -# (http://cr.yp.to/ucspi-tcp.html) +# this is designed to be run under tcpserver (http://cr.yp.to/ucspi-tcp.html) # or inetd if you're into that sort of thing # # @@ -140,6 +139,7 @@ sub mail { return respond(501, "could not parse your mail from command") unless $from; $from->format ne "<>" + and get_config("require_resolvable_fromhost") and !check_dns($from->host) and return respond(450, "Could not resolve ". $from->host);