Updated port of mail/ssmtp to 2.50.9 Fixed PR ports/35576 (http://www.freebsd.org/cgi/query-pr.cgi?pr=35576)
Can you please submit this update in diff -u format? See the porter's handbook for more details if you need them. Kris
ok, here is the update as a patch. I used 2.50.6, because that is the latest stable version from debian. The patch is attached again in base64 encoding, just in case. Regards Oliver diff -u -rN ssmtp.orig/Makefile ssmtp/Makefile --- ssmtp.orig/Makefile Thu Oct 17 11:06:45 2002 +++ ssmtp/Makefile Sat Nov 2 22:26:23 2002 @@ -6,31 +6,64 @@ # PORTNAME= ssmtp -PORTVERSION= 2.38 +PORTVERSION= 2.50.6 CATEGORIES= mail -MASTER_SITES= http://ftp.debian.org/debian/pool/main/s/ssmtp/ \ - ftp://ftp.icm.edu.pl/pub/Linux/debian/pool/main/s/ssmtp/ -DISTNAME= ssmtp_2.38-9 +MASTER_SITES= http://ftp.us.debian.org/debian/%SUBDIR%/ \ + http://http.us.debian.org/debian/%SUBDIR%/ \ + http://ftp.debian.org/debian/%SUBDIR%/ \ + http://ftp.egr.msu.edu/debian/%SUBDIR%/ \ + http://mirrors.kernel.org/debian/%SUBDIR%/ \ + http://archive.progeny.com/debian/%SUBDIR%/ \ + http://osdn.dl.sourceforge.net/debian/%SUBDIR%/ \ + http://debian.crosslink.net/debian/%SUBDIR%/ \ + http://ftp-mirror.internap.com/pub/debian/%SUBDIR%/ \ + http://ftp.cerias.purdue.edu/pub/os/debian/%SUBDIR%/ \ + http://ftp.lug.udel.edu/debian/%SUBDIR%/ \ + http://debian.lcs.mit.edu/debian/%SUBDIR%/ \ + http://debian.teleglobe.net/%SUBDIR%/ \ + http://ftp.de.debian.org/debian/%SUBDIR%/ \ + http://ftp.at.debian.org/debian/%SUBDIR%/ \ + http://ftp.bg.debian.org/debian/%SUBDIR%/ \ + http://ftp.cz.debian.org/debian/%SUBDIR%/ \ + http://ftp.dk.debian.org/debian/%SUBDIR%/ \ + http://ftp.ee.debian.org/debian/%SUBDIR%/ \ + http://ftp.fi.debian.org/debian/%SUBDIR%/ \ + http://ftp.fr.debian.org/debian/%SUBDIR%/ \ + http://ftp.hr.debian.org/debian/%SUBDIR%/ \ + http://ftp.hu.debian.org/debian/%SUBDIR%/ \ + http://ftp.it.debian.org/debian/%SUBDIR%/ \ + http://ftp.nl.debian.org/debian/%SUBDIR%/ \ + http://ftp.no.debian.org/debian/%SUBDIR%/ \ + http://ftp.pl.debian.org/debian/%SUBDIR%/ \ + http://ftp.si.debian.org/debian/%SUBDIR%/ \ + http://ftp.es.debian.org/debian/%SUBDIR%/ \ + http://ftp.se.debian.org/debian/%SUBDIR%/ \ + http://ftp.uk.debian.org/debian/%SUBDIR%/ \ + http://ftp.au.debian.org/debian/%SUBDIR%/ \ + http://ftp.wa.au.debian.org/debian/%SUBDIR%/ \ + http://ftp.nz.debian.org/debian/%SUBDIR%/ \ + http://ftp.jp.debian.org/debian/%SUBDIR%/ \ + http://ftp.br.debian.org/debian/%SUBDIR%/ +MASTER_SITE_SUBDIR= pool/main/s/ssmtp +DISTNAME= ssmtp_${PORTVERSION} -IGNORE= pkg_add cannot create /etc/ssmtp/smmtp.conf +MAINTAINER= eikemeier@fillmore-labs.com -MAINTAINER= ns88@k.pl +WRKSRC= ${WRKDIR}/ssmtp-2.50 -WRKSRC= ${WRKDIR}/ssmtp-2.38 +USE_AUTOCONF= yes +GNU_CONFIGURE= yes USE_GMAKE= true + MAN8= ssmtp.8 -pre-install: - ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \ - ${PREFIX}/etc/ssmtp +USE_OPENSSL?= yes post-install: - @PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} - @${ECHO_MSG} -------------------------------------------------- @${ECHO_MSG} @${ECHO_MSG} "To replace sendmail with ssmtp type make replace" @${ECHO_MSG} - @${ECHO_MSG} -------------------------------------------------- + @${SED} -e "s:/usr/local:${PREFIX}:g" pkg-message .include <bsd.port.pre.mk> @@ -41,8 +74,8 @@ @${ECHO} Replacing mailwarpper config @${ECHO_CMD} "sendmail ${PREFIX}/sbin/ssmtp" > /etc/mail/mailer.conf @${ECHO_CMD} "send-mail ${PREFIX}/sbin/ssmtp" >> /etc/mail/mailer.conf - @${ECHO_CMD} "mailq /bin/echo" >> /etc/mail/mailer.conf - @${ECHO_CMD} "newaliases /bin/echo" >> /etc/mail/mailer.conf + @${ECHO_CMD} "mailq ${PREFIX}/sbin/ssmtp" >> /etc/mail/mailer.conf + @${ECHO_CMD} "newaliases ${PREFIX}/sbin/ssmtp" >> /etc/mail/mailer.conf .else @${ECHO} backuping old /usr/sbin/sendmail @${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF diff -u -rN ssmtp.orig/distinfo ssmtp/distinfo --- ssmtp.orig/distinfo Mon Feb 26 06:17:57 2001 +++ ssmtp/distinfo Fri Nov 1 17:39:32 2002 @@ -1 +1 @@ -MD5 (ssmtp_2.38-9.tar.gz) = 3f95d07488cf5bc3b92c7eb182634d8a +MD5 (ssmtp_2.50.6.tar.gz) = 2a5a055a27b5a5dc0294789d040e7597 diff -u -rN ssmtp.orig/files/patch-Makefile_in ssmtp/files/patch-Makefile_in --- ssmtp.orig/files/patch-Makefile_in Mon Jul 8 13:53:11 2002 +++ ssmtp/files/patch-Makefile_in Sat Nov 2 21:54:13 2002 @@ -1,5 +1,5 @@ ---- Makefile.in.orig Mon Jul 8 13:47:12 2002 -+++ Makefile.in Mon Jul 8 13:53:01 2002 +--- Makefile.in.orig Sun Feb 10 22:15:37 2002 ++++ Makefile.in Sun Feb 10 22:15:37 2002 @@ -9,7 +9,7 @@ LN_S=@LN_S@ diff -u -rN ssmtp.orig/files/patch-aa ssmtp/files/patch-aa --- ssmtp.orig/files/patch-aa Mon Feb 26 06:17:57 2001 +++ ssmtp/files/patch-aa Thu Jan 1 01:00:00 1970 @@ -1,62 +0,0 @@ ---- 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 -u -rN ssmtp.orig/files/patch-arpadate_c ssmtp/files/patch-arpadate_c --- ssmtp.orig/files/patch-arpadate_c Tue Jul 9 23:49:01 2002 +++ ssmtp/files/patch-arpadate_c Thu Jan 1 01:00:00 1970 @@ -1,11 +0,0 @@ ---- arpadate.c.orig Mon Jun 3 14:05:28 2002 -+++ arpadate.c Tue Jul 9 23:48:19 2002 -@@ -79,7 +79,7 @@ - time_t now; - - /* RFC822 format string borrowed from GNU shellutils date.c */ -- const char *format = "%a, %_d %b %Y %H:%M:%S %z"; -+ const char *format = "%a, %d %b %Y %H:%M:%S %z"; - - now = time(NULL); - diff -u -rN ssmtp.orig/files/patch-base64_c ssmtp/files/patch-base64_c --- ssmtp.orig/files/patch-base64_c Thu Jan 1 01:00:00 1970 +++ ssmtp/files/patch-base64_c Sat Nov 2 21:54:13 2002 @@ -0,0 +1,10 @@ +--- base64.c.orig Mon Apr 1 15:07:09 2002 ++++ base64.c Mon Apr 1 15:07:09 2002 +@@ -13,6 +13,7 @@ + * Eric S. Raymond <esr@snark.thyrsus.com>. + */ + ++#include <ctype.h> + + static const char base64digits[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff -u -rN ssmtp.orig/files/patch-main_c ssmtp/files/patch-main_c --- ssmtp.orig/files/patch-main_c Thu Jan 1 01:00:00 1970 +++ ssmtp/files/patch-main_c Sat Nov 2 22:16:52 2002 @@ -0,0 +1,22 @@ +--- main.c.orig Mon Apr 1 15:07:13 2002 ++++ main.c Mon Apr 1 15:07:13 2002 +@@ -36,7 +36,7 @@ + + bool_t UseTLS = False; /* Use SSL to transfer mail to HUB */ + bool_t UseTLSCert = False; /* Use a certificate to transfer SSL mail */ +-char *TLSCert = "/etc/ssl/certs/ssmtp.pem"; /* Default Certificate */ ++char *TLSCert = "/usr/local/etc/ssmtp/ssmtp.pem"; /* Default Certificate */ + + char *full_from = (char)NULL; /* Use this as the From: address */ + char *full_name; +@@ -220,9 +220,8 @@ + } + } + } ++ fclose(fp); + } +- +- fclose(fp); + } + + diff -u -rN ssmtp.orig/files/patch-net_c ssmtp/files/patch-net_c --- ssmtp.orig/files/patch-net_c Mon Jul 8 15:06:46 2002 +++ ssmtp/files/patch-net_c Sat Nov 2 21:54:13 2002 @@ -1,5 +1,5 @@ ---- net.c.orig Mon Jul 8 14:39:23 2002 -+++ net.c Mon Jul 8 15:04:06 2002 +--- net.c.orig Mon Apr 1 15:07:13 2002 ++++ net.c Mon Apr 1 15:07:13 2002 @@ -5,6 +5,7 @@ See COPYRIGHT for the license @@ -8,12 +8,3 @@ #include <sys/socket.h> #include <netinet/in.h> #include <stdlib.h> -@@ -25,7 +26,7 @@ - bool_t UseTLS = False; /* Use SSL to transfer mail to HUB */ - bool_t UseTLSCert = False; /* Use a certificate to transfer SSL mail */ - --char *TLSCert = "/etc/ssl/certs/ssmtp.pem"; /* Default Certificate */ -+char *TLSCert = "/usr/local/etc/ssmtp/ssmtp.pem"; /* Default Certificate */ - - extern int log_level; - extern int minus_v; diff -u -rN ssmtp.orig/files/patch-ssmtp_8 ssmtp/files/patch-ssmtp_8 --- ssmtp.orig/files/patch-ssmtp_8 Mon Jul 8 15:07:15 2002 +++ ssmtp/files/patch-ssmtp_8 Sat Nov 2 21:54:13 2002 @@ -1,5 +1,5 @@ ---- ssmtp.8.orig Mon Jul 8 15:02:36 2002 -+++ ssmtp.8 Mon Jul 8 15:03:24 2002 +--- ssmtp.8.orig Sun Feb 10 22:52:32 2002 ++++ ssmtp.8 Sun Feb 10 22:52:32 2002 @@ -262,9 +262,9 @@ through mail.isp.com. diff -u -rN ssmtp.orig/files/patch-ssmtp_conf ssmtp/files/patch-ssmtp_conf --- ssmtp.orig/files/patch-ssmtp_conf Mon Jul 8 15:11:05 2002 +++ ssmtp/files/patch-ssmtp_conf Sat Nov 2 21:54:13 2002 @@ -1,5 +1,5 @@ ---- ssmtp.conf.orig Mon Jul 8 15:08:37 2002 -+++ ssmtp.conf Mon Jul 8 15:10:45 2002 +--- ssmtp.conf.orig Tue May 8 12:22:08 2001 ++++ ssmtp.conf Tue May 8 12:22:08 2001 @@ -1,5 +1,5 @@ # -# /etc/ssmtp.conf -- a config file for sSMTP sendmail. diff -u -rN ssmtp.orig/pkg-comment ssmtp/pkg-comment --- ssmtp.orig/pkg-comment Mon Feb 26 06:17:57 2001 +++ ssmtp/pkg-comment Mon Jul 8 14:15:50 2002 @@ -1 +1 @@ -Sendmail alternative for small routers (only for outgoing mail) +Extremely simple MTA to get mail off the system to a mail hub diff -u -rN ssmtp.orig/pkg-descr ssmtp/pkg-descr --- ssmtp.orig/pkg-descr Mon Feb 26 06:17:57 2001 +++ ssmtp/pkg-descr Fri Nov 1 17:35:55 2002 @@ -1,5 +1,12 @@ -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. +A secure, effective and simple way of getting mail off a system to your mail +hub. It contains no suid-binaries or other dangerous things - no mail spool to +poke around in, and no daemons running in the background. Mail is simply +forwarded to the configured mailhost. Extremely easy configuration. + +WARNING: the above is all it does; it does not receive mail, expand aliases or +manage a queue. That belongs on a mail hub with a system administrator. + +WWW: http://packages.debian.org/stable/mail/ssmtp.html + +- Oliver Eikemeier +eikemeier@fillmore-labs.com diff -u -rN ssmtp.orig/pkg-install ssmtp/pkg-install --- ssmtp.orig/pkg-install Mon Feb 26 06:17:57 2001 +++ ssmtp/pkg-install Thu Jan 1 01:00:00 1970 @@ -1,29 +0,0 @@ -#!/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 -u -rN ssmtp.orig/pkg-plist ssmtp/pkg-plist --- ssmtp.orig/pkg-plist Mon Feb 26 06:17:57 2001 +++ ssmtp/pkg-plist Mon Jul 8 14:15:50 2002 @@ -1,4 +1,4 @@ sbin/ssmtp -etc/ssmtp/ssmtp.conf -etc/ssmtp/revaliases +etc/ssmtp/ssmtp.conf.sample +etc/ssmtp/revaliases.sample @dirrm etc/ssmtp
State Changed From-To: open->feedback Patches don't apply cleanly: diff -u -rN ssmtp.orig/files/patch-net_c ssmtp/files/patch-net_c --- ssmtp.orig/files/patch-net_c Mon Jul 8 15:06:46 2002 +++ ssmtp/files/patch-net_c Sat Nov 2 21:54:13 2002 @@ -1,5 +1,5 @@ ---- net.c.orig Mon Jul 8 14:39:23 2002 -+++ net.c Mon Jul 8 15:04:06 2002 +--- net.c.orig Mon Apr 1 15:07:13 2002 ++++ net.c Mon Apr 1 15:07:13 2002 @@ -5,6 +5,7 @@ See COPYRIGHT for the license @@ -8,12 +8,3 @@ #include <sys/socket.h> #include <netinet/in.h> #include <stdlib.h> -@@ -25,7 +26,7 @@ - bool_t UseTLS = False; /* Use SSL to transfer mail to HUB */ - bool_t UseTLSCert = False; /* Use a certificate to transfer SSL mail */ - --char *TLSCert = "/etc/ssl/certs/ssmtp.pem"; /* Default Certificate */ -+char *TLSCert = "/usr/local/etc/ssmtp/ssmtp.pem"; /* Default Certificate */ - - extern int log_level; - extern int minus_v; this one. Could you please check if you the patch against 2.38 as in the current ports collection? (ps. patches towards a version > 2.58 are welcome too. if you CC me on the PR I'll handle them)
Responsible Changed From-To: freebsd-ports-bugs->edwin I'll handle it with submitter.
This is a multi-part message in MIME format.
Edwin Groothuis wrote: > (ps. patches towards a version > 2.58 are welcome too. if you CC > me on the PR I'll handle them) Ok, patch to version 2.60.3 attached cd /usr/ports/mail patch < ~/ssmtp.patch find ssmtp -name "*.orig" -delete Regards Oliver
State Changed From-To: feedback->closed Commited, thanks! Any chance of getting it to use MASTER_SITE_DEBIAN ?