From owner-freebsd-questions@FreeBSD.ORG Fri Apr 6 11:36:32 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDB8916A408 for ; Fri, 6 Apr 2007 11:36:32 +0000 (UTC) (envelope-from outsidefactor@iinet.net.au) Received: from webmail.icp-qv1-irony3.iinet.net.au (webmail.icp-qv1-irony3.iinet.net.au [203.59.1.108]) by mx1.freebsd.org (Postfix) with ESMTP id 6365C13C46E for ; Fri, 6 Apr 2007 11:36:31 +0000 (UTC) (envelope-from outsidefactor@iinet.net.au) Received: from 203-217-86-61.dyn.iinet.net.au (HELO SAURON) ([203.217.86.61]) by webmail.icp-qv1-irony3.iinet.net.au with ESMTP; 06 Apr 2007 19:06:25 +0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswMADjGFUbL2VY9UGdsb2JhbACPcAEBKg X-IronPort-AV: i="4.14,381,1170604800"; d="scan'208"; a="1143007065:sNHT102201878" From: "Christopher Martin" To: Date: Fri, 6 Apr 2007 21:06:28 +1000 Message-ID: <05df01c7783b$a0dd74e0$d315a8c0@SAURON> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826 Thread-Index: Acd4O59WDND+6KVsSdSRueTpupymCQ== Subject: Receiver (To/CC envelope fields) addresses verification against LDAP/Active Directory in sendmail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 11:36:33 -0000 Spam with randomly generated recipient addresses is draining our mail system's life away, and it seems the easiest way would be to verify the receiving party's/parties' address against Active Directory and then TEMPFAIL any mails that don't have any valid internal mails (rejects would allow directory harvesting to work). Our network has a frontline mail filter system running FreeBSD 6.2, Sendmail, milter-regex, Spam Assassin 3.1.8 and Clam AV, which delivers to our internal Exchange server via a smarthost entry. I would prefer to do the check in a milter, if for no other reason than it removes the need to make unorthodox changes to the sendmail configuration files, and they can also be tested offline before being included in the main sendmail configuration, however the one milter I found the seems to provide what I want, LDAPMAP, doesn't seem to compile under FreeBSD (tried both make and gmake). I found LDAPMAP via this link: http://www.issociate.de/board/post/404279/Sendmail_LDAP_access_milter.html So, have I completely missed a milter in the ports tree that fulfils all my dreams, or am I going to have to get a little more exotic? I found milter-ahead (from Snertsoft), but it's no longer free. I found an article (link below) which suggests a rather hacky seeming solution by using LDAP Routing Maps, but I seem to recall reading posts in the past that said that this was a BAD THING(tm) when used in combination with smarthost delivery. http://groups.google.com.au/group/comp.mail.sendmail/browse_thread/thread/e8 0adc7166005b3c/aa657b332703fe6c%23aa657b332703fe6c Am I going to need to use the hacky solution, or is there a cleaner way? I guess what I am trying to avoid is having to set up a duplicate machine so I can test the hacky solution in isolation (I don't feel my understanding of Sendmail is good enough to quickly fix any problems that arise from hacking the config, and the system is already live). Anyone have any suggestions? Has anyone used the hacked LDAProuting method with smarthost and had it work? Maybe I am going to have to hack something together using milter-cli or py-milter to connect up on SMTP port of the Exchange server and do a HELO, FROM and RCPT and see if the account is valid. Am I missing something basic? Currently, we're very happy with the accuracy of our system, but 80% of the spam that hits our quarantine isn't even addressed to someone in the organisation, thus giving us a pile of cruft to go through that is 5 times as big as it should be. Any help or suggestions are appreciated! Chris Martin