UnitedWare, LLCUnitedWare, LLC

"We called UnitedWare after we realized that generating master key systems by hand was becoming a burden on our time and money. The system they created was a huge success for our business. We have cut our time down on that operation significantly and our clients see the difference in the time it takes to deliver our work. Great job guys!"


Allied Lock and Door Co.

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.
Member of the Independent Computer Consultants Association Copyright 2002-2009     UnitedWare, LLC
High Quality Web, Software, and Network Security Consultants for all of your IT needs
Site Map Privacy Policy