Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Apr 2004 01:49:09 +0300
From:      Andrey Slusar <vasallia@ukr.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/65178: [NEW PORT] mail/masqmail: Mail server/fetcher
Message-ID:  <E1BAGQP-0006lW-WA@santinel.home.ua>
Resent-Message-ID: <200404042300.i34N0gvG050358@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         65178
>Category:       ports
>Synopsis:       [NEW PORT] mail/masqmail: Mail server/fetcher
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 04 16:00:42 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Slusar
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Santinel
>Environment:
System: FreeBSD santinel.home.ua 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Sat Apr 3 01:27:44 EEST 2004 root@santinel.home.ua:/usr/obj/usr/src/sys/ANRAY i386
>Description:
	MasqMail is a mail server designed for hosts that do not have a permanent
	internet connection eg. a home network or a single host at home. It has
	special support for connections to different ISPs. It replaces sendmail or
	other MTAs such as qmail or exim.
>How-To-Repeat:
	N/A
>Fix:

--- send-masq begins here ---
# 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:
#
#	/usr/ports/mail/masqmail
#	/usr/ports/mail/masqmail/Makefile
#	/usr/ports/mail/masqmail/distinfo
#	/usr/ports/mail/masqmail/pkg-descr
#	/usr/ports/mail/masqmail/files
#	/usr/ports/mail/masqmail/files/patch-Makefile.in
#	/usr/ports/mail/masqmail/files/masqmail.sh
#	/usr/ports/mail/masqmail/files/patch-smtp_out.c
#	/usr/ports/mail/masqmail/files/patch-mserver.c
#	/usr/ports/mail/masqmail/files/patch-pop3_in.c
#	/usr/ports/mail/masqmail/files/patch-masqmail.c
#	/usr/ports/mail/masqmail/pkg-plist
#
echo c - /usr/ports/mail/masqmail
mkdir -p /usr/ports/mail/masqmail > /dev/null 2>&1
echo x - /usr/ports/mail/masqmail/Makefile
sed 's/^X//' >/usr/ports/mail/masqmail/Makefile << 'END-of-/usr/ports/mail/masqmail/Makefile'
X# Ports collection makefile for:  masqmail
X# Date created:                   4 Apr 2004
X# Whom:                           Andrey Slusar <vasallia@ukr.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	masqmail
XPORTVERSION=	0.1.17
XCATEGORIES=	mail
XMASTER_SITES=	http://innominate.org/kurth/masqmail/download/
XDISTNAME=	MasqMail-${PORTVERSION}
X
XMAINTAINER=	vasallia@ukr.net
XCOMMENT=	Mail server for hosts, not permanently connected to the internet
X
XMAN5=		masqmail.aliases.5 masqmail.conf.5 masqmail.get.5 masqmail.route.5
XMAN8=		masqmail.8
X
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS+= --mandir=${PREFIX}/man --with-user=mailnull --with-group=mail \
X		--with-conffile=${PREFIX}/etc/masqmail --with-logdir=/var/log/masqmail
X
X.if defined(WITHOUT_POP3)
XCONFIGURE_ARGS+= --disable-pop3
X.endif
X.if defined(WITH_AUTH)
XCONFIGURE_ARGS+= --enable-auth
X.endif
X.if defined(WITH_IDENT)
XCONFIGURE_ARGS+= --enable-ident
X.endif
X
XUSE_GNOME=	glib12
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} >= 500038
XRC_SUBR?=       ${DESTDIR}/etc/rc.subr
XRC_DIR=         ${DESTDIR}/etc/rc.d
XRC_SUFX=
X.else
XUSE_RC_SUBR=    yes
XRC_DIR=         ${PREFIX}/etc/rc.d
XRC_SUFX=        .sh
X.endif
X
XPLIST_SUB+=     RC_DIR=${RC_DIR} \
X		RC_SUFX=${RC_SUFX}
X
Xpost-build:
X	@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
X		-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
X	${FILESDIR}/masqmail.sh > ${WRKDIR}/masqmail.sh
X
Xpost-install:
X	${INSTALL_SCRIPT} ${WRKDIR}/masqmail.sh ${RC_DIR}/masqmail${RC_SUFX}
X	${MKDIR} ${PREFIX}/etc/masqmail
X	${CHOWN} mailnull:mail ${PREFIX}/etc/masqmail
X	${INSTALL_DATA} -o mailnull -g mail ${WRKSRC}/examples/masqmail.conf ${PREFIX}/etc/masqmail/masqmail.conf-dist
X	${INSTALL_DATA} -o mailnull -g mail ${WRKSRC}/examples/example.get ${PREFIX}/etc/masqmail/masqmail.get-dist
X	${INSTALL_DATA} -o mailnull -g mail ${WRKSRC}/examples/example.route ${PREFIX}/etc/masqmail/masqmail.route-dist
X
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X.for i in  AUTHORS COPYING INSTALL NEWS README THOUGHTS TODO docs/install.html
X	${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.post.mk>
END-of-/usr/ports/mail/masqmail/Makefile
echo x - /usr/ports/mail/masqmail/distinfo
sed 's/^X//' >/usr/ports/mail/masqmail/distinfo << 'END-of-/usr/ports/mail/masqmail/distinfo'
XMD5 (MasqMail-0.1.17.tar.gz) = d62975ed5c20d4cebe7ad9e20f439e15
XSIZE (MasqMail-0.1.17.tar.gz) = 175425
END-of-/usr/ports/mail/masqmail/distinfo
echo x - /usr/ports/mail/masqmail/pkg-descr
sed 's/^X//' >/usr/ports/mail/masqmail/pkg-descr << 'END-of-/usr/ports/mail/masqmail/pkg-descr'
XMasqMail is a mail server designed for hosts that do not have a permanent
Xinternet connection eg. a home network or a single host at home. It has
Xspecial support for connections to different ISPs. It replaces sendmail or
Xother MTAs such as qmail or exim.
X
XFeatures
X
X    * Delivers only when online to a destination 'outside' your LAN
X    * Support for multiple Providers (ie. Mail Servers, or direct delivery)
X    * Rewriting of Return addresses (Return-Path:, From:, Reply-To:),
X	configurable for each Provider separately
X    * can also be used as a Mail Server on a LAN
X    * alias support
X    * delivery to pipes
X    * delivery to MDAs (eg. procmail)
X    * Maildir support (version >= 0.2.5)
X    * routing depending on sender
X    * AUTH (RFC 2554) support (as client, since version 0.1.0)
X    * SMTP-after-POP
X    * POP3 client
X    * POP3 client daemon (fetch mail in regular intervals if online)
X
XWWW: http://innominate.org/kurth/masqmail/
END-of-/usr/ports/mail/masqmail/pkg-descr
echo c - /usr/ports/mail/masqmail/files
mkdir -p /usr/ports/mail/masqmail/files > /dev/null 2>&1
echo x - /usr/ports/mail/masqmail/files/patch-Makefile.in
sed 's/^X//' >/usr/ports/mail/masqmail/files/patch-Makefile.in << 'END-of-/usr/ports/mail/masqmail/files/patch-Makefile.in'
X--- Makefile.in.old	Sun Apr  4 19:10:04 2004
X+++ Makefile.in	Sun Apr  4 19:10:29 2004
X@@ -375,13 +375,13 @@
X 
X $(DESTDIR)@with_logdir@:
X 	mkdir -p $(DESTDIR)@with_logdir@
X-	chown @with_user@.@with_group@ $(DESTDIR)@with_logdir@
X+	chown @with_user@:@with_group@ $(DESTDIR)@with_logdir@
X 
X $(DESTDIR)@with_spooldir@:
X 	mkdir -p $(DESTDIR)@with_spooldir@
X 	mkdir -p $(DESTDIR)@with_spooldir@/input
X 	mkdir -p $(DESTDIR)@with_spooldir@/popuidl
X-	chown -R @with_user@.@with_group@ $(DESTDIR)@with_spooldir@
X+	chown -R @with_user@:@with_group@ $(DESTDIR)@with_spooldir@
X 
X # Tell versions [3.59,3.63) of GNU make to not export all variables.
X # Otherwise a system limit (for SysV at least) may be exceeded.
END-of-/usr/ports/mail/masqmail/files/patch-Makefile.in
echo x - /usr/ports/mail/masqmail/files/masqmail.sh
sed 's/^X//' >/usr/ports/mail/masqmail/files/masqmail.sh << 'END-of-/usr/ports/mail/masqmail/files/masqmail.sh'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: mail
X# REQUIRE: LOGIN
X# KEYWORD: FreeBSD shutdown
X#	we make mail start late, so that things like .forward's are not
X#	processed until the system is fully operational
X
X#
X# Add the following lines to /etc/rc.conf to enable masqmail:
X#
X#masqmail_enable="YES"
X#
X# See masqmail(8) for flags
X#
X
X. %%RC_SUBR%%
X
Xname=masqmail
Xrcvar=`set_rcvar`
X
Xcommand=%%PREFIX%%/sbin/masqmail
Xrequired_dirs=/var/log/masqmail
Xrequired_files=%%PREFIX%%/etc/masqmail/masqmail.conf
X
Xstart_precmd=start_precmd
Xstop_postcmd=stop_postcmd
X
Xextra_commands="reload"
X
Xstart_precmd()
X{
X  case $sendmail_enable in
X  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
X    warn "sendmail_enable should be set to NONE"
X    ;;
X  [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
X    case $sendmail_submit_enable in
X    [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
X      warn "sendmail_submit_enable should be set to NO"
X      ;;
X    esac
X    ;;
X  [Nn][Oo][Nn][Ee])
X    ;;
X  esac
X}
X
Xstop_postcmd()
X{
X  rm -f $pidfile
X}
X
X# set defaults
X
Xmasqmail_enable=${masqmail_enable:-"NO"}
Xmasqmail_flags=${masqmail_flags:-"-bd -q30m"}
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-/usr/ports/mail/masqmail/files/masqmail.sh
echo x - /usr/ports/mail/masqmail/files/patch-smtp_out.c
sed 's/^X//' >/usr/ports/mail/masqmail/files/patch-smtp_out.c << 'END-of-/usr/ports/mail/masqmail/files/patch-smtp_out.c'
X--- src/smtp_out.c.old	Mon Apr  5 01:07:18 2004
X+++ src/smtp_out.c	Mon Apr  5 01:08:18 2004
X@@ -60,7 +60,7 @@
X   struct hostent *host_entry;
X 
X   if(do_correct){
X-    getsockname(psb->sock, &sname, &len);
X+    getsockname(psb->sock, (struct sockaddr *)(&sname), &len);
X     DEBUG(5) debugf("socket: name.sin_addr = %s\n", inet_ntoa(sname.sin_addr));
X     host_entry =
X       gethostbyaddr((const char *)&(sname.sin_addr),
X@@ -455,7 +455,7 @@
X     DEBUG(5){
X       struct sockaddr_in name;
X       int len = sizeof(struct sockaddr);
X-      getsockname(sock, &name, &len);
X+      getsockname(sock, (struct sockaddr *)(&name), &len);
X       debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr));
X     }
X     return psb;
END-of-/usr/ports/mail/masqmail/files/patch-smtp_out.c
echo x - /usr/ports/mail/masqmail/files/patch-mserver.c
sed 's/^X//' >/usr/ports/mail/masqmail/files/patch-mserver.c << 'END-of-/usr/ports/mail/masqmail/files/patch-mserver.c'
X--- src/mserver.c.old	Mon Mar 19 17:45:28 2001
X+++ src/mserver.c	Mon Apr  5 01:27:29 2004
X@@ -56,7 +56,7 @@
X   if(init_sockaddr(&saddr, conf.mserver_iface)){
X     int sock = socket(PF_INET, SOCK_STREAM, 0);
X     int dup_sock;
X-    if(connect(sock, &saddr, sizeof(saddr)) == 0){
X+    if(connect(sock, (struct sockaddr *)(&saddr), sizeof(saddr)) == 0){
X       FILE *in, *out;
X       char buf[256];
X 
END-of-/usr/ports/mail/masqmail/files/patch-mserver.c
echo x - /usr/ports/mail/masqmail/files/patch-pop3_in.c
sed 's/^X//' >/usr/ports/mail/masqmail/files/patch-pop3_in.c << 'END-of-/usr/ports/mail/masqmail/files/patch-pop3_in.c'
X--- src/pop3_in.c.old	Mon Apr  5 01:13:51 2004
X+++ src/pop3_in.c	Mon Apr  5 01:15:27 2004
X@@ -372,7 +372,7 @@
X     DEBUG(5){
X       struct sockaddr_in name;
X       int len;
X-      getsockname(sock, &name, &len);
X+      getsockname(sock, (struct sockaddr *)(&name), &len);
X       debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr));
X     }
X     return popb;
END-of-/usr/ports/mail/masqmail/files/patch-pop3_in.c
echo x - /usr/ports/mail/masqmail/files/patch-masqmail.c
sed 's/^X//' >/usr/ports/mail/masqmail/files/patch-masqmail.c << 'END-of-/usr/ports/mail/masqmail/files/patch-masqmail.c'
X--- src/masqmail.c.old	Mon Apr  5 01:18:16 2004
X+++ src/masqmail.c	Mon Apr  5 01:23:09 2004
X@@ -167,7 +167,7 @@
X 
X   DEBUG(5) debugf("accepting smtp message on stdin\n");
X 
X-  if(getpeername(0, &saddr, &dummy) == 0){
X+  if(getpeername(0, (struct sockaddr *)(&saddr), &dummy) == 0){
X     peername = g_strdup(inet_ntoa(saddr.sin_addr));
X #ifdef ENABLE_IDENT
X     {
END-of-/usr/ports/mail/masqmail/files/patch-masqmail.c
echo x - /usr/ports/mail/masqmail/pkg-plist
sed 's/^X//' >/usr/ports/mail/masqmail/pkg-plist << 'END-of-/usr/ports/mail/masqmail/pkg-plist'
Xsbin/masqmail
Xetc/masqmail/masqmail.conf-dist
Xetc/masqmail/masqmail.get-dist
Xetc/masqmail/masqmail.route-dist
X%%DOCSDIR%%/AUTHORS
X%%DOCSDIR%%/COPYING
X%%DOCSDIR%%/INSTALL
X%%DOCSDIR%%/NEWS
X%%DOCSDIR%%/README
X%%DOCSDIR%%/THOUGHTS
X%%DOCSDIR%%/TODO
X%%DOCSDIR%%/install.html
X@dirrm etc/masqmail
X@dirrm %%DOCSDIR%%
X@cwd %%RC_DIR%%
Xmasqmail%%RC_SUFX%%
X@unexec rmdir /var/log/masqmail 2>/dev/null || true
END-of-/usr/ports/mail/masqmail/pkg-plist
exit
--- send-masq ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BAGQP-0006lW-WA>