From owner-freebsd-questions@FreeBSD.ORG Mon Jun 15 08:59:27 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE1EF43F for ; Mon, 15 Jun 2015 08:59:27 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [108.92.93.123]) by mx1.freebsd.org (Postfix) with ESMTP id CA28E842 for ; Mon, 15 Jun 2015 08:59:27 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from [10.0.1.2] (static-71-177-216-148.lsanca.fios.verizon.net [71.177.216.148]) (authenticated bits=0) by zoom.lafn.org (8.14.7/8.14.9) with ESMTP id t5F8pTCT032756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Jun 2015 01:51:30 -0700 (PDT) (envelope-from bc979@lafn.org) From: Doug Hardie Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Sendmail Modification Message-Id: Date: Mon, 15 Jun 2015 01:51:29 -0700 To: FreeBSD - Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) X-Virus-Scanned: clamav-milter 0.98 at zoom.lafn.org X-Virus-Status: Clean X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 08:59:28 -0000 I need to modify sendmail such that when a SMTP-AUTH request fails, = sendmail drops the connection. I am constantly being hit by password = guessing attempts. My first thought was to introduce a 1 or 2 minute = delay after an authentication failure. However, I suspect the attackers = would just open a new connection and leave me with bunches of = connections waiting to time out. Hence the need to drop the connection. Looking through the code it appears there are 2 places in srvrsmtp.c = where the SASL return code is not SASL_OK or SASL_CONT. An "AUTH = failure=E2=80=9D is logged in both those instances. I believe that an = exit right after the RESET_SASLCONN would do what I need. Does this = appear to be the right place?