summaryrefslogtreecommitdiff
path: root/mail/ssmtp
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>2001-02-26 05:17:57 +0000
committerSteve Price <steve@FreeBSD.org>2001-02-26 05:17:57 +0000
commit251624ffe21d43e04f264c1bab046eda22c7e44d (patch)
tree9bb05aa965c088b2fda589de5e4afbb5f82bfb03 /mail/ssmtp
parentBuild from source now that it is available starting with version (diff)
Adding ssmtp version 2.38.
A sendmail alternative for small routers (only for outgoing mail). PR: 24263 Submitted by: Tomasz Paszkowski <ns88@k.pl>
Notes
Notes: svn path=/head/; revision=38772
Diffstat (limited to 'mail/ssmtp')
-rw-r--r--mail/ssmtp/Makefile52
-rw-r--r--mail/ssmtp/distinfo1
-rw-r--r--mail/ssmtp/files/patch-aa62
-rw-r--r--mail/ssmtp/pkg-comment1
-rw-r--r--mail/ssmtp/pkg-descr5
-rw-r--r--mail/ssmtp/pkg-install29
-rw-r--r--mail/ssmtp/pkg-plist4
7 files changed, 154 insertions, 0 deletions
diff --git a/mail/ssmtp/Makefile b/mail/ssmtp/Makefile
new file mode 100644
index 000000000000..a268701e85e0
--- /dev/null
+++ b/mail/ssmtp/Makefile
@@ -0,0 +1,52 @@
+# New ports collection makefile for: ssmtp
+# Date created: 9 Jan 2001
+# Whom: Tomasz Paszkowski <ns88@k.pl>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ssmtp
+PORTVERSION= 2.38
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.debian.org/debian/dists/woody/main/source/mail/ \
+ ftp://ftp.icm.edu.pl/pub/Linux/debian/dists/woody/main/source/mail/
+DISTNAME= ssmtp_2.38-9
+
+MAINTAINER= ns88@k.pl
+
+WRKSRC= ${WRKDIR}/ssmtp-2.38
+USE_GMAKE= true
+MAN8= ssmtp.8
+
+pre-install:
+ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \
+ ${PREFIX}/etc/ssmtp
+
+post-install:
+ @PREFIX="${PREFIX}" ${SH} ${PKGINSTALL}
+ @${ECHO_MSG} --------------------------------------------------
+ @${ECHO_MSG}
+ @${ECHO_MSG} "To replace sendmail with ssmtp type make replace"
+ @${ECHO_MSG}
+ @${ECHO_MSG} --------------------------------------------------
+
+.include <bsd.port.pre.mk>
+
+replace:
+.if ${OSVERSION} >= 400014
+ @${ECHO} backuping old /etc/mail/mailer.conf
+ @${MV} -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old-ssmtp
+ @${ECHO} Replacing mailwarpper config
+ @${ECHO} "sendmail ${PREFIX}/sbin/ssmtp\n" > /etc/mail/mailer.conf
+ @${ECHO} "send-mail ${PREFIX}/sbin/ssmtp\n" >> /etc/mail/mailer.conf
+ @${ECHO} "mailq /bin/echo\n" >> /etc/mail/mailer.conf
+ @${ECHO} "newaliases /bin/echo\n" >> /etc/mail/mailer.conf
+.else
+ @${ECHO} bacckuping old /usr/sbin/sendmail
+ @${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF
+ @${CHMOD} 000 /usr/sbin/sendmail.OFF
+ @${LN} -s ${PREFIX}/sbin/ssmtp /usr/sbin/sendmail
+ @${ECHO} Done !
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/mail/ssmtp/distinfo b/mail/ssmtp/distinfo
new file mode 100644
index 000000000000..016700596437
--- /dev/null
+++ b/mail/ssmtp/distinfo
@@ -0,0 +1 @@
+MD5 (ssmtp_2.38-9.tar.gz) = 3f95d07488cf5bc3b92c7eb182634d8a
diff --git a/mail/ssmtp/files/patch-aa b/mail/ssmtp/files/patch-aa
new file mode 100644
index 000000000000..f1dba2001262
--- /dev/null
+++ b/mail/ssmtp/files/patch-aa
@@ -0,0 +1,62 @@
+--- Makefile.orig Tue Dec 5 23:40:45 2000
++++ Makefile Tue Dec 5 23:40:32 2000
+@@ -34,10 +34,10 @@
+
+ # Places to install things, used to relocate things for Ultrix kits.
+ # ROOT normally is the empty string...
+-#ROOT=
+-LOCATION=/usr
++ROOT=${PREFIX}
++#LOCATION=
+ DESTDIR=${ROOT}${LOCATION}/sbin
+-MANDIR=${ROOT}${LOCATION}/share/man/man8
++MANDIR=${PREFIX}/man/man8
+ ETCDIR=${ROOT}/etc
+ SSMTPCONFDIR=${ETCDIR}/ssmtp
+ # (End of relocation section)
+@@ -62,41 +62,15 @@
+ #FLAGS= -Wall -O6 -DDEBUG ${BASEFLAGS}
+ #FLAGS= -Wall -g ${BASEFLAGS}
+
+-CFLAGS= ${FLAGS} ${BASEFLAGS}
++CFLAGS+= ${FLAGS} ${BASEFLAGS}
+
+ all: ssmtp
+
+ install: ssmtp
+ test `whoami` = root
+- install -d -m 755 ${DESTDIR}
+- install -s -m 755 ssmtp ${DESTDIR}/ssmtp
+- install -d -m 755 ${MANDIR}
+- install -m 644 ssmtp.8 ${MANDIR}/ssmtp.8
+- install -d -m 755 ${SSMTPCONFDIR}
+- install -m 644 revaliases ${INSTALLED_REVALIASES_FILE}
+- $(GEN_CONFIG) ${INSTALLED_CONFIGURATION_FILE}
+-
+-
+-install-sendmail: ssmtp install
+- rm -f ${DESTDIR}/sendmail
+- ln -s ssmtp ${DESTDIR}/sendmail
+- install -d -m 755 ${DESTDIR}/../lib
+- rm -f ${DESTDIR}/../lib/sendmail
+- ln -s ../sbin/sendmail ${DESTDIR}/../lib
+- rm -f ${MANDIR}/sendmail.8
+- ln -s ssmtp.8 ${MANDIR}/sendmail.8
+-
+-uninstall:
+- test `whoami` = root
+- rm -f ${DESTDIR}/ssmtp
+- rm -f ${MANDIR}/ssmtp.8
+- rm -f ${CONFIGURATION_FILE} ${REVALIASES_FILE}
+- rmdir ${SSMTPCONFDIR}
+-
+-uninstall-sendmail: uninstall
+- rm -f ${DESTDIR}/sendmail ${DESTDIR}/../lib/sendmail
+- rm -f ${MANDIR}/sendmail.8
+-
++ ${BSD_INSTALL_PROGRAM} ssmtp ${DESTDIR}
++ ${BSD_INSTALL_MAN} ssmtp.8 ${MANDIR}/ssmtp.8
++ ${BSD_INSTALL_DATA} revaliases ${INSTALLED_REVALIASES_FILE}
+ clean:
+ rm -f ssmtp *.o core
+
diff --git a/mail/ssmtp/pkg-comment b/mail/ssmtp/pkg-comment
new file mode 100644
index 000000000000..bebdd9501aa7
--- /dev/null
+++ b/mail/ssmtp/pkg-comment
@@ -0,0 +1 @@
+Sendmail alternative for small routers (only for outgoing mail)
diff --git a/mail/ssmtp/pkg-descr b/mail/ssmtp/pkg-descr
new file mode 100644
index 000000000000..ee881553541b
--- /dev/null
+++ b/mail/ssmtp/pkg-descr
@@ -0,0 +1,5 @@
+This is sSMTP, a program that replaces sendmail on workstations that
+should send their mail via the departmental mailhub from which they pick up
+their mail (via pop, imap, rsmtp, pop_fetch, NFS... or the like). This
+program accepts mail and sends it to the mailhub, optionally replacing the
+domain in the From: line with a different one.
diff --git a/mail/ssmtp/pkg-install b/mail/ssmtp/pkg-install
new file mode 100644
index 000000000000..66d091ba5959
--- /dev/null
+++ b/mail/ssmtp/pkg-install
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+
+#
+# Generate configuration file
+#
+
+
+if [ -s ${PREFIX}/etc/ssmtp/ssmtp.conf ]; then
+ echo Configuration file $1 already exists.
+ exit
+fi
+
+umask 022
+
+cat >>${PREFIX}/etc/ssmtp/ssmtp.conf <<EOF
+#
+# ${PREFIX}/ssmtp/ssmtp.conf -- a config file for sSMTP sendmail.
+#
+# The person who gets all mail for userids < 10
+root=postmaster
+# The place where the mail goes. The actual machine name is required
+# no MX records are consulted. Commonly mailhosts are named mail.domain.com
+# The example will fit if you are in domain.com and you mailhub is so named.
+mailhub=mail
+# Where will the mail seem to come from?
+#rewriteDomain=`echo -n $mailname`
+# The full hostname
+hostname=`hostname`
+EOF
diff --git a/mail/ssmtp/pkg-plist b/mail/ssmtp/pkg-plist
new file mode 100644
index 000000000000..bdf1a8ea3b06
--- /dev/null
+++ b/mail/ssmtp/pkg-plist
@@ -0,0 +1,4 @@
+sbin/ssmtp
+etc/ssmtp/ssmtp.conf
+etc/ssmtp/revaliases
+@dirrm etc/ssmtp