Adding ssmtp version 2.38.
A sendmail alternative for small routers (only for outgoing mail). PR: 24263 Submitted by: Tomasz Paszkowski <ns88@k.pl>
This commit is contained in:
parent
0ca92406d0
commit
251624ffe2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38772
@ -144,6 +144,7 @@
|
||||
SUBDIR += spambnc
|
||||
SUBDIR += spruce
|
||||
SUBDIR += sqwebmail
|
||||
SUBDIR += ssmtp
|
||||
SUBDIR += stuphead
|
||||
SUBDIR += sylpheed
|
||||
SUBDIR += teapop
|
||||
|
52
mail/ssmtp/Makefile
Normal file
52
mail/ssmtp/Makefile
Normal file
@ -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>
|
1
mail/ssmtp/distinfo
Normal file
1
mail/ssmtp/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (ssmtp_2.38-9.tar.gz) = 3f95d07488cf5bc3b92c7eb182634d8a
|
62
mail/ssmtp/files/patch-aa
Normal file
62
mail/ssmtp/files/patch-aa
Normal file
@ -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
|
||||
|
1
mail/ssmtp/pkg-comment
Normal file
1
mail/ssmtp/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Sendmail alternative for small routers (only for outgoing mail)
|
5
mail/ssmtp/pkg-descr
Normal file
5
mail/ssmtp/pkg-descr
Normal file
@ -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.
|
29
mail/ssmtp/pkg-install
Normal file
29
mail/ssmtp/pkg-install
Normal file
@ -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
|
4
mail/ssmtp/pkg-plist
Normal file
4
mail/ssmtp/pkg-plist
Normal file
@ -0,0 +1,4 @@
|
||||
sbin/ssmtp
|
||||
etc/ssmtp/ssmtp.conf
|
||||
etc/ssmtp/revaliases
|
||||
@dirrm etc/ssmtp
|
Loading…
Reference in New Issue
Block a user