UnitedWare, LLCUnitedWare, LLC

"I have the highest praise for UnitedWare, the group that helped us with our website. They were diligent, responsive, and best of all skilled webmasters. What was once a hassle was actually fun this time!"


K.E. Smith
Executive Director
Oxford Community Foundation

Sendmail + Cyrus Local From: Verify

By Anish Mistry

Background - 2005-06-22

Over the past week or so we have been receiving a lot of spam that forged the From: header of a non-existent user with our local domain. ie. somefakeuser@united-ware.com. This became really annoying so I wrote some sendmail rules to lookup the "mail from:" and the "From:" header in the Cyrus (cyrusv2) database.

Instructions

  1. Cyrus v2.1.20 or greater. Lower versions may work, but 2.1.20 was what we are using.
  2. Sendmail 8.13 or greater or Sendmail 8.12.7 with the socketmap patch.
  3. Beyond the normal Cyrus compile flags for Sendmail. You will need to compile it with -DSOCKETMAP.
  4. In /usr/local/etc/cyrus.conf add smmap cmd="smmapd" listen="/var/imap/socket/smmapd" prefork=0 to create the socket map.
  5. Restart Cyrus. killall -HUP master
  6. Add the from verify code to your .mc
  7. Rebuild your .cf and then stop and start Sendmail.cd /etc/mail && make && make install && make stop && make start
  8. Enjoy!
DISCLAIMER: UNITEDWARE, LLC AND ITS OUTSIDE CONSULTANTS OR VENDORS PROVIDE THIS SOFTWARE AND/OR INFORMATION "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNITEDWARE, LLC AND ITS OUTSIDE CONSULTANTS OR VENDORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2002-2010     UnitedWare, LLC
High Quality Web, Software, and eCommerce Consultants for all of your IT needs
Site Map Privacy Policy