diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2009-02-12 00:41:34 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2009-02-12 00:41:34 +0000 |
commit | 9dcab6ff8fe25cad14e5409730efbd53f8d908ac (patch) | |
tree | 8c831418c6b0a379fa7b56d69f425660d9ce63bf /mail/dma/files | |
parent | f018254623fc6c522af4c5addd9f76e3918db20d (diff) | |
download | ports-9dcab6ff8fe25cad14e5409730efbd53f8d908ac.tar.gz ports-9dcab6ff8fe25cad14e5409730efbd53f8d908ac.zip |
The DragonFly Mail Agent is a small Mail Transport Agent (MTA),
designed for home and office use. It accepts mails from locally
installed Mail User Agents (MUA) and delivers the mails either
locally or to a remote destination. Remote delivery includes
several features like TLS/SSL support and SMTP authentication.
Since dma is not intended as a replacement for real, big MTAs
like sendmail(8) or postfix(1), it does not listen on port 25
for incoming connections.
PR: ports/130658
Submitted by: Daniel Roethlisberger <daniel@roe.ch>
Notes
Notes:
svn path=/head/; revision=228091
Diffstat (limited to 'mail/dma/files')
-rw-r--r-- | mail/dma/files/dma.rb | 58 | ||||
-rw-r--r-- | mail/dma/files/patch-Makefile | 6 | ||||
-rw-r--r-- | mail/dma/files/patch-libexec_dma_net.c | 21 | ||||
-rw-r--r-- | mail/dma/files/pkg-message.in | 31 |
4 files changed, 116 insertions, 0 deletions
diff --git a/mail/dma/files/dma.rb b/mail/dma/files/dma.rb new file mode 100644 index 000000000000..3c7fc992bde7 --- /dev/null +++ b/mail/dma/files/dma.rb @@ -0,0 +1,58 @@ +#!/usr/bin/env ruby +# Copyright (c) 2009 Daniel Roethlisberger <daniel@roe.ch> +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice unmodified, this list of conditions, and the following +# disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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. +# +# $FreeBSD$ + +# Wrapper around dma(8) which implements the missing -t sendmail option. +# WARNING: The address parsing is very incomplete and might break. + +require 'open3' + +dma = $0.gsub(/.rb$/, '') + +if ARGV.delete "-t" + msg = STDIN.read + head, cr, body = msg.split(/(?<=\n)(\r?)\n/, 2) + tmphead = head.gsub(/\n\s+/m, ' ') + rcpts = [] + tmphead.gsub(/^(?:to|cc|bcc):\s.*$/i) do |match| + match.sub(/^[^:]+:\s*/, '').split(/\s*[,;]\s*/).each do |addr| + rcpts << addr.sub(/.*<([^<>]+)>.*/, '\\1') + end + end + head.gsub!(/^bcc:.*\n/i, '') + Open3.popen3(dma, *ARGV.concat(rcpts)) do |i,o,e| + i.write head + i.write "#{cr}\n" + i.write body + i.close_write + print o.read + print e.read + end +else + exec(dma, *ARGV) +end + diff --git a/mail/dma/files/patch-Makefile b/mail/dma/files/patch-Makefile new file mode 100644 index 000000000000..f0fdffdf85df --- /dev/null +++ b/mail/dma/files/patch-Makefile @@ -0,0 +1,6 @@ +--- /dev/null 2009-01-17 17:24:56.000000000 +0100 ++++ Makefile 2009-01-17 17:25:04.000000000 +0100 +@@ -0,0 +1,3 @@ ++DISTRIBUTION=portsmaildma ++SUBDIR=libexec/dma ++.include <bsd.subdir.mk> diff --git a/mail/dma/files/patch-libexec_dma_net.c b/mail/dma/files/patch-libexec_dma_net.c new file mode 100644 index 000000000000..0319794b7d09 --- /dev/null +++ b/mail/dma/files/patch-libexec_dma_net.c @@ -0,0 +1,21 @@ +--- libexec/dma/net.c.orig 2008-09-30 19:47:21.000000000 +0200 ++++ libexec/dma/net.c 2009-01-17 19:02:43.000000000 +0100 +@@ -342,14 +342,10 @@ + it->queueid); + else + goto out; +- } +- +- /* +- * If the user doesn't want STARTTLS, but SSL encryption, we +- * have to enable SSL first, then send EHLO +- */ +- if (((config->features & STARTTLS) == 0) && +- ((config->features & SECURETRANS) != 0)) { ++ /* ++ * The client SHOULD send an EHLO command as the ++ * first command after a successful TLS negotiation. ++ */ + send_remote_command(fd, "EHLO %s", hostname()); + if (read_remote(fd, 0, NULL) != 2) { + syslog(LOG_ERR, "%s: remote delivery deferred: " diff --git a/mail/dma/files/pkg-message.in b/mail/dma/files/pkg-message.in new file mode 100644 index 000000000000..37d7cc6be3b6 --- /dev/null +++ b/mail/dma/files/pkg-message.in @@ -0,0 +1,31 @@ + +To enable dma please edit /etc/mail/mailer.conf to replace all lines +referring to another MTA with the following: + +sendmail %%PREFIX%%/libexec/dma +send-mail %%PREFIX%%/libexec/dma + +If you need sendmail -t compatibility, e.g. for send-pr(1), you may use the +ruby wrapper script instead (make sure to install lang/ruby as well): + +sendmail %%PREFIX%%/libexec/dma.rb +send-mail %%PREFIX%%/libexec/dma.rb + +Note that the ruby wrapper only supports a subset of what is considered valid +email address syntax by the relevant RFCs. + +If you not need sendmail anymore, please add in your rc.conf: + +sendmail_enable="NO" +sendmail_submit_enable="NO" +sendmail_outbound_enable="NO" +sendmail_msp_queue_enable="NO" + +And you can disable some sendmail specific daily maintenance routines in your +/etc/periodic.conf file: + +daily_clean_hoststat_enable="NO" +daily_status_mail_rejects_enable="NO" +daily_status_include_submit_mailq="NO" +daily_submit_queuerun="NO" + |