# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # dma # dma/Makefile # dma/distinfo # dma/pkg-descr # dma/files # dma/files/patch-libexec_dma_net.c # dma/files/patch-Makefile # dma/files/dma.rb # dma/pkg-plist # dma/pkg-message # echo c - dma mkdir -p dma > /dev/null 2>&1 echo x - dma/Makefile sed 's/^X//' >dma/Makefile << '733fe10ed2908626499b88c0ed44262c' X# New ports collection makefile for: dma X# Date created: 2009-01-17 X# Whom: Daniel Roethlisberger X# X# $FreeBSD$ X# X XPORTNAME= dma XPORTVERSION= 20080930 XCATEGORIES= mail ipv6 XMASTER_SITES= http://mirror.roe.ch/dist/dma/ X XMAINTAINER= daniel@roe.ch XCOMMENT= DragonFly Mail Agent, a small MTA for local/outbound mail X XUSE_BZIP2= yes XUSE_OPENSSL= yes X XMAN8= dma.8 X XPKGMESSAGE= ${WRKDIR}/pkg-message X XCFLAGS+= "-I${OPENSSLINC}" XLDFLAGS+= "-L${OPENSSLLIB}" X Xpost-patch: X @${REINPLACE_CMD} -e 's,/etc/dma,${PREFIX}/etc/dma,g' \ X ${WRKSRC}/libexec/dma/dma.8 \ X ${WRKSRC}/libexec/dma/dma.h X @${REINPLACE_CMD} -e 's, /etc/dma, ${PREFIX}/etc/dma,g' \ X ${WRKSRC}/etc/dma/dma.conf X Xdo-install: X ${INSTALL} -o root -g mail -m 4555 ${WRKSRC}/libexec/dma/dma ${PREFIX}/libexec X ${INSTALL_SCRIPT} files/dma.rb ${PREFIX}/libexec X ${INSTALL_MAN} ${WRKSRC}/libexec/dma/dma.8 ${PREFIX}/man/man8/ X ${MKDIR} ${PREFIX}/etc/dma X.for i in dma.conf virtusertable X ${INSTALL_DATA} -m 0644 ${WRKSRC}/etc/dma/${i} ${PREFIX}/etc/dma/${i}.sample X.endfor X ${INSTALL} -o root -g mail -m 0640 ${WRKSRC}/etc/dma/auth.conf \ X ${PREFIX}/etc/dma/auth.conf.sample X.for i in dma.conf virtusertable auth.conf X if [ ! -f ${PREFIX}/etc/dma/${i} ]; then \ X ${CP} -p ${PREFIX}/etc/dma/${i}.sample \ X ${PREFIX}/etc/dma/${i} ; \ X fi X.endfor X ${INSTALL} -d -o root -g mail -m 770 /var/spool/dma X @${SED} -e 's,%%PREFIX%%,${PREFIX},g' pkg-message > ${PKGMESSAGE} X Xpost-install: X @${CAT} ${PKGMESSAGE} X X.include 733fe10ed2908626499b88c0ed44262c echo x - dma/distinfo sed 's/^X//' >dma/distinfo << '0387bf614ff7e98d784c5f4b757dcd93' XMD5 (dma-20080930.tar.bz2) = 24c86a6f4e3f1c6a550b9fb58f0e75d3 XSHA256 (dma-20080930.tar.bz2) = e65e48208de4768087a39b4d8e01cacb51395e79812ec199d4b0c8d4cc301800 XSIZE (dma-20080930.tar.bz2) = 23743 0387bf614ff7e98d784c5f4b757dcd93 echo x - dma/pkg-descr sed 's/^X//' >dma/pkg-descr << 'aa2448ab7162a85f2823422b61280644' XThe DragonFly Mail Agent is a small Mail Transport Agent (MTA), Xdesigned for home and office use. It accepts mails from locally Xinstalled Mail User Agents (MUA) and delivers the mails either Xlocally or to a remote destination. Remote delivery includes Xseveral features like TLS/SSL support and SMTP authentication. X XSince dma is not intended as a replacement for real, big MTAs Xlike sendmail(8) or postfix(1), it does not listen on port 25 Xfor incoming connections. X XWWW: http://www.dragonflybsd.org/ aa2448ab7162a85f2823422b61280644 echo c - dma/files mkdir -p dma/files > /dev/null 2>&1 echo x - dma/files/patch-libexec_dma_net.c sed 's/^X//' >dma/files/patch-libexec_dma_net.c << '1daa97669b2ef63dd052e1b54a02099a' X--- libexec/dma/net.c.orig 2008-09-30 19:47:21.000000000 +0200 X+++ libexec/dma/net.c 2009-01-17 19:02:43.000000000 +0100 X@@ -342,14 +342,10 @@ X it->queueid); X else X goto out; X- } X- X- /* X- * If the user doesn't want STARTTLS, but SSL encryption, we X- * have to enable SSL first, then send EHLO X- */ X- if (((config->features & STARTTLS) == 0) && X- ((config->features & SECURETRANS) != 0)) { X+ /* X+ * The client SHOULD send an EHLO command as the X+ * first command after a successful TLS negotiation. X+ */ X send_remote_command(fd, "EHLO %s", hostname()); X if (read_remote(fd, 0, NULL) != 2) { X syslog(LOG_ERR, "%s: remote delivery deferred: " 1daa97669b2ef63dd052e1b54a02099a echo x - dma/files/patch-Makefile sed 's/^X//' >dma/files/patch-Makefile << 'a4cc689ada89d8919f060a792958ffe7' X--- /dev/null 2009-01-17 17:24:56.000000000 +0100 X+++ Makefile 2009-01-17 17:25:04.000000000 +0100 X@@ -0,0 +1,3 @@ X+DISTRIBUTION=portsmaildma X+SUBDIR=libexec/dma X+.include a4cc689ada89d8919f060a792958ffe7 echo x - dma/files/dma.rb sed 's/^X//' >dma/files/dma.rb << 'd99f68d0c1aa7213713d516d9b6c7018' X#!/usr/bin/env ruby X# Copyright (c) 2009 Daniel Roethlisberger X# All rights reserved. X# X# Redistribution and use in source and binary forms, with or without X# modification, are permitted provided that the following conditions X# are met: X# 1. Redistributions of source code must retain the above copyright X# notice unmodified, this list of conditions, and the following X# disclaimer. X# 2. Redistributions in binary form must reproduce the above copyright X# notice, this list of conditions and the following disclaimer in the X# documentation and/or other materials provided with the distribution. X# X# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X# SUCH DAMAGE. X# X# $FreeBSD$ X X# Wrapper around dma(8) which implements the missing -t sendmail option. X# WARNING: The address parsing is very incomplete and might break. X Xrequire 'open3' X Xdma = $0.gsub(/.rb$/, '') X Xif ARGV.delete "-t" X msg = STDIN.read X head, cr, body = msg.split(/(?<=\n)(\r?)\n/, 2) X tmphead = head.gsub(/\n\s+/m, ' ') X rcpts = [] X tmphead.gsub(/^(?:to|cc|bcc):\s.*$/i) do |match| X match.sub(/^[^:]+:\s*/, '').split(/\s*[,;]\s*/).each do |addr| X rcpts << addr.sub(/.*<([^<>]+)>.*/, '\\1') X end X end X head.gsub!(/^bcc:.*\n/i, '') X Open3.popen3(dma, *ARGV.concat(rcpts)) do |i,o,e| X i.write head X i.write "#{cr}\n" X i.write body X i.close_write X print o.read X print e.read X end Xelse X exec(dma, *ARGV) Xend X d99f68d0c1aa7213713d516d9b6c7018 echo x - dma/pkg-plist sed 's/^X//' >dma/pkg-plist << '677014bb7765b915dfbf8c4c26978833' Xlibexec/dma Xlibexec/dma.rb X@unexec if cmp -s %D/etc/dma/dma.conf.sample %D/etc/dma/dma.conf; then rm -f %D/etc/dma/dma.conf; fi Xetc/dma/dma.conf.sample X@exec if [ ! -f %B/dma.conf ] ; then cp -p %B/%f %B/dma.conf; fi X@unexec if cmp -s %D/etc/dma/auth.conf.sample %D/etc/dma/auth.conf; then rm -f %D/etc/dma/auth.conf; fi Xetc/dma/auth.conf.sample X@exec if [ ! -f %B/auth.conf ] ; then cp -p %B/%f %B/auth.conf; fi X@unexec if cmp -s %D/etc/dma/virtusertable.sample %D/etc/dma/virtusertable; then rm -f %D/etc/dma/virtusertable; fi Xetc/dma/virtusertable.sample X@exec if [ ! -f %B/virtusertable ] ; then cp -p %B/%f %B/virtusertable; fi X@dirrmtry etc/dma X@exec install -d -o root -g mail -m 770 /var/spool/dma X@unexec rmdir /var/spool/dma 2>/dev/null || true 677014bb7765b915dfbf8c4c26978833 echo x - dma/pkg-message sed 's/^X//' >dma/pkg-message << 'b39e999cc4d6d18a6b16a617dc018a9b' X XTo enable dma please edit /etc/mail/mailer.conf to replace all lines Xreferring to another MTA with the following: X Xsendmail %%PREFIX%%/libexec/dma Xsend-mail %%PREFIX%%/libexec/dma X XIf you need sendmail -t compatibility, e.g. for send-pr(1), you may use the Xruby wrapper script instead (make sure to install lang/ruby as well): X Xsendmail %%PREFIX%%/libexec/dma.rb Xsend-mail %%PREFIX%%/libexec/dma.rb X X*** WARNING: X*** The ruby wrapper is inefficient and only supports a small subset of X*** what is considered a valid email address by the relevant RFCs. X*** Use at your own risk! X XIf you not need sendmail anymore, please add in your rc.conf: X Xsendmail_enable="NO" Xsendmail_submit_enable="NO" Xsendmail_outbound_enable="NO" Xsendmail_msp_queue_enable="NO" X XAnd you can disable some sendmail specific daily maintenance routines in your X/etc/periodic.conf file: X Xdaily_clean_hoststat_enable="NO" Xdaily_status_mail_rejects_enable="NO" Xdaily_status_include_submit_mailq="NO" Xdaily_submit_queuerun="NO" X b39e999cc4d6d18a6b16a617dc018a9b exit