mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Initial import of qmail-contrib version 0.1.
A set of contrib'd tools for qmail. PR: 8899 Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
This commit is contained in:
parent
c4ccdffc92
commit
a63d37261e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=18372
7 changed files with 238 additions and 0 deletions
78
mail/qmail-contrib/Makefile
Normal file
78
mail/qmail-contrib/Makefile
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
# New ports collection makefile for: qmail-contrib
|
||||||
|
# Version required: 1.0
|
||||||
|
# Date created: 28 November 1998
|
||||||
|
# Whom: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
DISTNAME= qmail-contrib-0.1
|
||||||
|
CATEGORIES= mail
|
||||||
|
MASTER_SITES= ftp://ftp.qmail.org/pub/software/ \
|
||||||
|
ftp://rucus.ru.ac.za/pub/mail/qmail/src/
|
||||||
|
DISTFILES= dot-forward-${DF_VER}.tar.gz \
|
||||||
|
fastforward-${FF_VER}.tar.gz
|
||||||
|
|
||||||
|
MAINTAINER= ports@freebsd.org
|
||||||
|
|
||||||
|
RUN_DEPENDS= ${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
|
||||||
|
|
||||||
|
NO_PACKAGE= Unsure of djb\'s license
|
||||||
|
|
||||||
|
ALL_TARGET= it
|
||||||
|
INSTALL_TARGET= setup
|
||||||
|
|
||||||
|
MAN1= dot-forward.1 fastforward.1 printforward.1 setforward.1
|
||||||
|
MAN1+= newaliases.1 printmaillist.1 setmaillist.1 newinclude.1
|
||||||
|
|
||||||
|
PLIST_SUB= DOCDIR=${DOCDIR}
|
||||||
|
|
||||||
|
.if exists(${PREFIX}/qmail/bin/qmail-send)
|
||||||
|
QMAIL_DIR?= ${PREFIX}/qmail
|
||||||
|
PREFIX?= ${PREFIX}/qmail
|
||||||
|
.else
|
||||||
|
QMAIL_DIR?= /var/qmail
|
||||||
|
PREFIX?= /var/qmail
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if (${PREFIX} == "/usr/local")
|
||||||
|
DOCDIR= share/doc/qmail
|
||||||
|
.else
|
||||||
|
DOCDIR= doc
|
||||||
|
.endif
|
||||||
|
|
||||||
|
FF_VER= 0.51
|
||||||
|
DF_VER= 0.71
|
||||||
|
QCK_VER= 0.1
|
||||||
|
|
||||||
|
WRKFF= ${WRKDIR}/fastforward-${FF_VER}
|
||||||
|
WRKDF= ${WRKDIR}/dot-forward-${DF_VER}
|
||||||
|
|
||||||
|
NO_MTREE= yes
|
||||||
|
|
||||||
|
pre-patch:
|
||||||
|
@cd ${WRKFF} \
|
||||||
|
&& ${PATCH} -s <${FILESDIR}/patch-newaliases
|
||||||
|
# && ${PATCH} <${FILESDIR}/patch-striplocal
|
||||||
|
# apparently the above patch is no longer needed
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
@perl -pi.bak -e "s|-O2|${CFLAGS}|" ${WRKFF}/conf-cc
|
||||||
|
@perl -pi.bak -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKFF}/conf-qmail
|
||||||
|
@perl -pi.bak -e '$$_ = "" if /cat/' ${WRKFF}/hier.c
|
||||||
|
@perl -pi.bak -e "s|-O2|${CFLAGS}|" ${WRKDF}/conf-cc
|
||||||
|
@perl -pi.bak -e "s|.var.qmail|${QMAIL_DIR}|" ${WRKDF}/conf-qmail
|
||||||
|
@perl -pi.bak -e '$$_ = "" if /cat/' ${WRKDF}/hier.c
|
||||||
|
|
||||||
|
do-build:
|
||||||
|
@cd ${WRKDIR}/dot-forward-${DF_VER} \
|
||||||
|
&& make ${ALL_TARGET}
|
||||||
|
@cd ${WRKDIR}/fastforward-${FF_VER} \
|
||||||
|
&& make ${ALL_TARGET}
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
@cd ${WRKDIR}/dot-forward-${DF_VER} \
|
||||||
|
&& make ${INSTALL_TARGET}
|
||||||
|
@cd ${WRKDIR}/fastforward-${FF_VER} \
|
||||||
|
&& make ${INSTALL_TARGET}
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
2
mail/qmail-contrib/distinfo
Normal file
2
mail/qmail-contrib/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
MD5 (dot-forward-0.71.tar.gz) = 1fefd9760e4706491fb31c7511d69bed
|
||||||
|
MD5 (fastforward-0.51.tar.gz) = 6dc619180ba9726380dc1047e45a1d8d
|
113
mail/qmail-contrib/files/extra-patch-newaliases
Normal file
113
mail/qmail-contrib/files/extra-patch-newaliases
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
*** newaliases.c.orig Fri Apr 24 17:34:58 1998
|
||||||
|
--- newaliases.c Fri Apr 24 17:38:32 1998
|
||||||
|
***************
|
||||||
|
*** 12,17 ****
|
||||||
|
--- 12,21 ----
|
||||||
|
|
||||||
|
#define FATAL "newaliases: fatal: "
|
||||||
|
|
||||||
|
+ stralloc fnsrc = {0};
|
||||||
|
+ stralloc fncdb = {0};
|
||||||
|
+ stralloc fntmp = {0};
|
||||||
|
+
|
||||||
|
void nomem()
|
||||||
|
{
|
||||||
|
strerr_die2x(111,FATAL,"out of memory");
|
||||||
|
***************
|
||||||
|
*** 26,36 ****
|
||||||
|
}
|
||||||
|
void writeerr()
|
||||||
|
{
|
||||||
|
! strerr_die2sys(111,FATAL,"unable to write to /etc/aliases.tmp: ");
|
||||||
|
}
|
||||||
|
void readerr()
|
||||||
|
{
|
||||||
|
! strerr_die2sys(111,FATAL,"unable to read /etc/aliases: ");
|
||||||
|
}
|
||||||
|
void die_control()
|
||||||
|
{
|
||||||
|
--- 30,40 ----
|
||||||
|
}
|
||||||
|
void writeerr()
|
||||||
|
{
|
||||||
|
! strerr_die4sys(111,FATAL,"unable to write to ",fntmp.s,": ");
|
||||||
|
}
|
||||||
|
void readerr()
|
||||||
|
{
|
||||||
|
! strerr_die4sys(111,FATAL,"unable to read ",fnsrc.s,": ");
|
||||||
|
}
|
||||||
|
void die_control()
|
||||||
|
{
|
||||||
|
***************
|
||||||
|
*** 270,288 ****
|
||||||
|
if (cdbmss_add(&cdbmss,key.s,key.len,instr.s,instr.len) == -1) writeerr();
|
||||||
|
}
|
||||||
|
|
||||||
|
! void main()
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
umask(033);
|
||||||
|
readcontrols();
|
||||||
|
|
||||||
|
! fd = open_read("/etc/aliases");
|
||||||
|
if (fd == -1) readerr();
|
||||||
|
substdio_fdbuf(&ssin,read,fd,inbuf,sizeof inbuf);
|
||||||
|
|
||||||
|
! fd = open_trunc("/etc/aliases.tmp");
|
||||||
|
! if (fd == -1) strerr_die2sys(111,FATAL,"unable to create /etc/aliases.tmp: ");
|
||||||
|
if (cdbmss_start(&cdbmss,fd) == -1) writeerr();
|
||||||
|
|
||||||
|
if (!stralloc_copys(&line,"")) nomem();
|
||||||
|
--- 274,305 ----
|
||||||
|
if (cdbmss_add(&cdbmss,key.s,key.len,instr.s,instr.len) == -1) writeerr();
|
||||||
|
}
|
||||||
|
|
||||||
|
! void main(argc,argv)
|
||||||
|
! int argc;
|
||||||
|
! char **argv;
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
umask(033);
|
||||||
|
readcontrols();
|
||||||
|
|
||||||
|
! if (!stralloc_copys(&fnsrc,argv[1] ? argv[1] : "/etc/aliases")) nomem();
|
||||||
|
! if (!stralloc_0(&fnsrc)) nomem();
|
||||||
|
!
|
||||||
|
! if (!stralloc_copys(&fncdb,fnsrc.s)) nomem();
|
||||||
|
! if (!stralloc_cats(&fncdb,".cdb")) nomem();
|
||||||
|
! if (!stralloc_0(&fncdb)) nomem();
|
||||||
|
!
|
||||||
|
! if (!stralloc_copys(&fntmp,fnsrc.s)) nomem();
|
||||||
|
! if (!stralloc_cats(&fntmp,".tmp")) nomem();
|
||||||
|
! if (!stralloc_0(&fntmp)) nomem();
|
||||||
|
!
|
||||||
|
! fd = open_read(fnsrc.s);
|
||||||
|
if (fd == -1) readerr();
|
||||||
|
substdio_fdbuf(&ssin,read,fd,inbuf,sizeof inbuf);
|
||||||
|
|
||||||
|
! fd = open_trunc(fntmp.s);
|
||||||
|
! if (fd == -1) strerr_die4sys(111,FATAL,"unable to create ",fntmp.s,": ");
|
||||||
|
if (cdbmss_start(&cdbmss,fd) == -1) writeerr();
|
||||||
|
|
||||||
|
if (!stralloc_copys(&line,"")) nomem();
|
||||||
|
***************
|
||||||
|
*** 314,321 ****
|
||||||
|
if (fsync(fd) == -1) writeerr();
|
||||||
|
if (close(fd) == -1) writeerr(); /* NFS stupidity */
|
||||||
|
|
||||||
|
! if (rename("/etc/aliases.tmp","/etc/aliases.cdb") == -1)
|
||||||
|
! strerr_die2sys(111,FATAL,"unable to move /etc/aliases.tmp to /etc/aliases.cdb: ");
|
||||||
|
|
||||||
|
_exit(0);
|
||||||
|
}
|
||||||
|
--- 331,338 ----
|
||||||
|
if (fsync(fd) == -1) writeerr();
|
||||||
|
if (close(fd) == -1) writeerr(); /* NFS stupidity */
|
||||||
|
|
||||||
|
! if (rename(fntmp.s,fncdb.s) == -1)
|
||||||
|
! strerr_die6sys(111,FATAL,"unable to move ",fntmp.s," to ",fncdb.s,": ");
|
||||||
|
|
||||||
|
_exit(0);
|
||||||
|
}
|
28
mail/qmail-contrib/files/extra-patch-striplocal
Normal file
28
mail/qmail-contrib/files/extra-patch-striplocal
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
*** fastforward.c.orig Thu Apr 23 20:35:48 1998
|
||||||
|
--- fastforward.c Thu Apr 23 20:37:05 1998
|
||||||
|
***************
|
||||||
|
*** 261,270 ****
|
||||||
|
if (gettarget(1,"?",addr))
|
||||||
|
if (!stralloc_copy(&sender,&data)) nomem();
|
||||||
|
if (!gettarget(1,":",addr))
|
||||||
|
! if (flagpassthrough)
|
||||||
|
! _exit(0);
|
||||||
|
! else
|
||||||
|
! strerr_die1x(100,"Sorry, no mailbox here by that name. (#5.1.1)");
|
||||||
|
dodata();
|
||||||
|
}
|
||||||
|
|
||||||
|
--- 261,273 ----
|
||||||
|
if (gettarget(1,"?",addr))
|
||||||
|
if (!stralloc_copy(&sender,&data)) nomem();
|
||||||
|
if (!gettarget(1,":",addr))
|
||||||
|
! if (strpbrk(addr,"-"))
|
||||||
|
! if (!str_copy(addr,strpbrk(addr,"-")+1)) nomem();
|
||||||
|
! if (!gettarget(1,":",addr))
|
||||||
|
! if (flagpassthrough)
|
||||||
|
! _exit(0);
|
||||||
|
! else
|
||||||
|
! strerr_die1x(100,"Sorry, no mailbox here by that name. (#5.1.1)");
|
||||||
|
dodata();
|
||||||
|
}
|
||||||
|
|
1
mail/qmail-contrib/pkg-comment
Normal file
1
mail/qmail-contrib/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Contributed programs for qmail.
|
6
mail/qmail-contrib/pkg-descr
Normal file
6
mail/qmail-contrib/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
These are a collection of contributed programs for qmail.
|
||||||
|
|
||||||
|
fastforward allows the use of a new method of storing aliases, in a
|
||||||
|
compact database.
|
||||||
|
|
||||||
|
dotforward allows old-style ".forward" files to work correctly.
|
10
mail/qmail-contrib/pkg-plist
Normal file
10
mail/qmail-contrib/pkg-plist
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
doc/fastforward/ALIASES
|
||||||
|
bin/dot-forward
|
||||||
|
bin/fastforward
|
||||||
|
bin/printforward
|
||||||
|
bin/setforward
|
||||||
|
bin/newaliases
|
||||||
|
bin/printmaillist
|
||||||
|
bin/setmaillist
|
||||||
|
bin/newinclude
|
||||||
|
@dirrm doc/fastforward
|
Loading…
Add table
Reference in a new issue