summaryrefslogtreecommitdiff
path: root/mail/qmail-vida/files
diff options
context:
space:
mode:
Diffstat (limited to 'mail/qmail-vida/files')
-rw-r--r--mail/qmail-vida/files/PORT_NOTES125
-rw-r--r--mail/qmail-vida/files/PORT_NOTES_FreeBSD_40-RELEASE61
-rw-r--r--mail/qmail-vida/files/bootfiles.sed.in15
-rw-r--r--mail/qmail-vida/files/enable-qmail.in86
-rw-r--r--mail/qmail-vida/files/maildir8
-rw-r--r--mail/qmail-vida/files/maildir+vida.in19
-rw-r--r--mail/qmail-vida/files/mailer.conf.sample.in10
-rw-r--r--mail/qmail-vida/files/mkaliasdir109
-rw-r--r--mail/qmail-vida/files/patch-install.c37
-rw-r--r--mail/qmail-vida/files/patch-qmail-local.c11
-rw-r--r--mail/qmail-vida/files/pkg-install.in114
-rw-r--r--mail/qmail-vida/files/pkg-message-ldap.in35
-rw-r--r--mail/qmail-vida/files/pkg-message-smtp_auth+tls.in23
-rw-r--r--mail/qmail-vida/files/pkg-message-tls.in22
-rw-r--r--mail/qmail-vida/files/pkg-message.in11
15 files changed, 686 insertions, 0 deletions
diff --git a/mail/qmail-vida/files/PORT_NOTES b/mail/qmail-vida/files/PORT_NOTES
new file mode 100644
index 000000000000..07844f9cf5db
--- /dev/null
+++ b/mail/qmail-vida/files/PORT_NOTES
@@ -0,0 +1,125 @@
+This text was originally taken from the qmail INSTALL file that you
+will find in /var/qmail/doc/. In addition to INSTALL, there are many
+other potentially important qmail documents there.
+
+As with all ports, the ports maintainer (me!) makes NO WARRANTIES of
+any kind: expressed, implied, or other; about the reliability or
+security of this package. Any damage or problems derived from its
+usage or related to it are neither my responsibility nor the software
+author's. This package is provided AS IS.
+
+Although I am probably sounding cold and harsh, believe me: qmail is
+one of the most reliable and easy-to-use softwares around. However,
+this also is NOT a WARRANTY. It is just an opinion. :)
+
+The qmail port will normally install into /var/qmail/. If you changed
+this to /usr/local/, then please note that the docs have been
+installed into /usr/local/share/doc/qmail/ (as opposed to
+/usr/local/doc/).
+
+If you wish to rerun the automatic configuration utility, do:
+
+# cd /var/qmail/configure ; ./config
+
+If you are upgrading from a previous version of qmail, you should read
+/var/qmail/doc/UPGRADE and follow all the steps after #6.
+
+
+[from /var/qmail/doc/INSTALL]
+
+SAVE COPIES OF YOUR OUTGOING MAIL! Like any other piece of software (and
+information generally), the qmail system comes with NO WARRANTY. It's
+much more secure and reliable than sendmail, but that's not saying much.
+
+[pre-build instructions elided]
+
+To create /var/qmail and configure qmail (won't interfere with sendmail):
+
+[#1 - #3 elided]
+
+ 4. Read INSTALL.ctl and FAQ. Minimal survival command:
+ # ./config
+
+[The "minimal" command has already been performed.]
+
+ 5. Read INSTALL.alias. Minimal survival command:
+ # (cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root)
+ # chmod 644 ~alias/.qmail*
+
+[The "minimal" command has already been performed.]
+
+ 6. Read INSTALL.mbox and INSTALL.vsm.
+
+ 7. Read INSTALL.maildir.
+
+ 8. Copy /var/qmail/boot/home (or proc) to /var/qmail/rc.
+
+[When you do this, qmail will be started automatically the next time
+ you boot. This is because the command
+ ``ln -s /var/qmail/rc /usr/local/etc/rc.d'' has been executed. There
+ is a number of sample bootfiles provided. Not all of them will work.]
+
+To test qmail deliveries (won't interfere with sendmail):
+
+ 9. Enable deliveries of messages injected into qmail:
+ # csh -cf '/var/qmail/rc &'
+
+10. Read TEST.deliver.
+
+
+To upgrade from sendmail to qmail:
+
+11. Read SENDMAIL. This is what your users will want to know about the
+ switch from sendmail to qmail.
+
+12. Read REMOVE.sendmail. You must remove sendmail before installing
+ qmail.
+
+[Do not disable sendmail as instructed in REMOVE.sendmail step #1.
+ Instead, change the sendmail_enable line in /etc/rc.conf to read
+
+ sendmail_enable="NO"
+
+ If you are running a FreeBSD 4.0-RELEASE or later, read
+ PORT_NOTES_FreeBSD_40-RELEASE before executing step 12.
+ ]
+
+13. Read REMOVE.binmail.
+
+14. Add
+ csh -cf '/var/qmail/rc &'
+ to your boot scripts, so that the qmail daemons are restarted
+ whenever your system reboots. Make sure you include the &.
+
+[Do not do this. Unless you remove the symlink
+ /usr/local/etc/rc.d/qmail.sh, the script /var/qmail/rc will be run
+ everytime you boot. See also "local_startup" in /etc/rc.conf.]
+
+15. Make qmail's ``sendmail'' wrapper available to MUAs:
+ # ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
+ # ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
+ /usr/sbin might not exist on your system.
+
+16. Set up qmail-smtpd in /etc/inetd.conf (all on one line):
+ smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env
+ tcp-env /var/qmail/bin/qmail-smtpd
+
+[A freshly-updated /etc/inetd.conf will have a sample qmail entry that
+ you can simply uncomment.]
+
+17. Reboot. (Or kill -HUP your inetd and make sure the qmail daemons
+ are running.)
+
+18. Read TEST.receive.
+
+
+
+That's it! To report success:
+ % ( echo 'First M. Last'; cat /var/qmail/doc/SYSDEPS ) \
+ | mail djb-qst@cr.yp.to
+Replace First M. Last with your name.
+
+[Note that "cat `cat SYSDEPS`" has changed to "cat /var/qmail/doc/SYSDEPS"]
+
+If you have questions about qmail, join the qmail mailing list; see
+http://pobox.com/~djb/qmail.html.
diff --git a/mail/qmail-vida/files/PORT_NOTES_FreeBSD_40-RELEASE b/mail/qmail-vida/files/PORT_NOTES_FreeBSD_40-RELEASE
new file mode 100644
index 000000000000..25963439d603
--- /dev/null
+++ b/mail/qmail-vida/files/PORT_NOTES_FreeBSD_40-RELEASE
@@ -0,0 +1,61 @@
+In addition to PORT_NOTES_FreeBSD_40-RELEASE, there are many
+other potentially important qmail documents there such as PORT_NOTES
+and INSTALL.
+
+As with all ports, the ports maintainer (me!) makes NO WARRANTIES of
+any kind: expressed, implied, or other; about the reliability or
+security of this package. Any damage or problems derived from its
+usage or related to it are neither my responsibility nor the software
+author's. This package is provided AS IS.
+
+Although I am probably sounding cold and harsh, believe me: qmail is
+one of the most reliable and easy-to-use softwares around. However,
+this also is NOT a WARRANTY. It is just an opinion. :)
+
+The qmail port will normally install into /var/qmail/. If you changed
+this to /usr/local/, then please note that the docs have been
+installed into /usr/local/share/doc/qmail/ (as opposed to
+/usr/local/doc/).
+
+##
+### Document starts here
+##
+
+If you read PORT_NOTES, you may have noticed I mentioned step 12 should
+be changed for FreeBSD versions 4.0-Release and later.
+
+FreeBSD 4.0-Release and later come with a program named mailwrapper (8)
+which eases the replacement of sendmail. No binaries need to be touched,
+"chmod"ed, erased, deleted or, otherwise, modified.
+
+Whenever you call /usr/sbin/sendmail, /usr/bin/mail, or /usr/bin/newaliases;
+in fact, you are calling a symbolic link to mailwrapper. Mailwrapper
+then calls the appropriate binary according to its configuration file.
+
+An excerpt from the mailwrapper manual:
+
+"The mailwrapper program is designed to replace /usr/sbin/sendmail and to
+ invoke an appropriate MTA instead of sendmail(8) based on configuration
+ information placed in /etc/mail/mailer.conf. This permits the administra-
+ tor to configure which MTA is to be invoked on the system at run time."
+
+Configuration for mailwrapper is kept in /etc/mail/mailer.conf.
+
+Here follows my personal /etc/mail/mailer.conf
+
+sendmail /var/qmail/bin/sendmail
+send-mail /var/qmail/bin/sendmail
+mailq /var/qmail/bin/qmail-qread
+newaliases /var/qmail/bin/newaliases
+
+There is a sample mailer.conf in this directory, please install
+over the /etc/mail/mailer.conf to unfold qmail as your default MTA.
+Please donīt forget to backup /etc/mail/mailer.conf before doing
+so. Better safe then sorry.
+
+So, whenever you call sendmail, in fact, you are using the appropriate
+"qmail-clones".
+
+You should notice, though, that the programs do not behave exactly as
+their sendmail counterparts. Therefore, reading the appropriate
+/var/qmail/doc files and man pages is highly advisable.
diff --git a/mail/qmail-vida/files/bootfiles.sed.in b/mail/qmail-vida/files/bootfiles.sed.in
new file mode 100644
index 000000000000..d2b10a7122b7
--- /dev/null
+++ b/mail/qmail-vida/files/bootfiles.sed.in
@@ -0,0 +1,15 @@
+s!QMAIL/!%%PREFIX%%/!
+s!^\(exec\)!case "\$1" in\
+start)\
+\ \1!
+s!\(qmail\)$!\1\&\
+\ exit 0\
+\ ;;\
+stop)\
+\ exec killall qmail-send\
+\ ;;\
+*)\
+\ %%ECHO_CMD%% "Usage: `basename \$0` {start|stop}" >\&2\
+\ exit 64\
+\ ;;\
+esac!
diff --git a/mail/qmail-vida/files/enable-qmail.in b/mail/qmail-vida/files/enable-qmail.in
new file mode 100644
index 000000000000..a864dd93c97e
--- /dev/null
+++ b/mail/qmail-vida/files/enable-qmail.in
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+disable_sendmail() {
+ echo "===> I hope you know what you are doing:"
+ echo "===> You just told your system to not"
+ echo "===> automaticaly start sendmail on your"
+ echo "===> next startup."
+ echo "===> (i.e., added sendmail_enable=\"NONE\" to rc.conf)"
+
+ if [ -f ${RC_CONF_FILE} ]; then
+ echo sendmail_enable=\"NONE\" >> ${RC_CONF_FILE}
+ fi
+}
+
+enable_qmail() {
+ if [ -f ${MAILER_CONF_FILE} ]; then
+ cp ${MAILER_CONF_FILE} ${MAILER_CONF_FILE}.bak && \
+ cp %%DOCSDIR%%/mailer.conf.sample ${MAILER_CONF_FILE}
+ else
+ echo "===> ERROR: YOU DO NOT HAVE A VALID ${MAILER_CONF_FILE}"
+ echo "===> FIX this and try again"
+ echo "===> or, run \"$0 --force\" if you are sure"
+ echo "===> you want this port replacing some binaries"
+ echo "===> IF THIS FEELS UNEASY, read %%DOCSDIR%%/REMOVE.sendmail and do it manually"
+ echo ""
+ echo "=======> VERY IMPORTANT <======="
+ echo "===> One side issue is that if you do replace them,"
+ echo "===> you really should consider ADDING \"NO_SENDMAIL=true\""
+ echo "===> to your /etc/make.conf if you do \"make world\"."
+ echo "===> Otherwise, \"make world\" will \"fix\" your sendmail"
+ echo "===> installation breaking your qmail one."
+ echo "===> Read the FreeBSD Handbook section on \"make world\""
+ echo "===> if you do not know what I am talking about."
+ echo "===> Check http://www.FreeBSD.org/ for the most"
+ echo "===> updated copy of the Handbook."
+ fi
+ echo "===> Do not forget to choose an appropriate qmail startup"
+ echo "===> script. Go through %%PREFIX%%/boot, choose one"
+ echo "===> and copy the chosen script as %%PREFIX%%/rc"
+ echo "===> For example, \"cp %%PREFIX%%/boot/proc+df %%PREFIX%%/rc\""
+}
+
+# taken from mail/postfix idea
+force_enable_qmail() {
+ echo "===> Replacing sendmail"
+ if [ -e ${SENDMAIL} ]; then
+ mv -f ${SENDMAIL} ${SENDMAIL}.OFF && \
+ chmod 0 ${SENDMAIL}.OFF
+ fi
+ if [ -e %%PREFIX%%/bin/sendmail ]; then
+ ln -sf %%PREFIX%%/bin/sendmail ${SENDMAIL}
+ fi
+
+ echo "===> Replacing mailq"
+ if [ -e ${MAILQ} ]; then
+ mv -f ${MAILQ} ${MAILQ}.OFF && \
+ chmod 0 ${MAILQ}.OFF
+ fi
+ if [ -e %%PREFIX%%/bin/qmail-qread ]; then
+ ln -sf %%PREFIX%%/bin/qmail-qread ${MAILQ}
+ fi
+
+ echo "===> Replacing newaliases"
+ if [ -e ${NEWALIASES} ]; then
+ mv -f ${NEWALIASES} ${NEWALIASES}.OFF && \
+ chmod 0 ${NEWALIASES}.OFF
+ fi
+ if [ -e %%PREFIX%%/bin/newaliases ]; then
+ ln -sf %%PREFIX%%/bin/newaliases ${NEWALIASES}
+ fi
+}
+
+# main
+RC_CONF_FILE=/etc/rc.conf
+MAILER_CONF_FILE=/etc/mail/mailer.conf
+SENDMAIL=/usr/sbin/sendmail
+MAILQ=/usr/bin/mailq
+NEWALIASES=/usr/bin/newaliases
+
+disable_sendmail
+
+if [ "$1" = "--force" ]; then
+ force_enable_qmail
+else
+ enable_qmail
+fi
diff --git a/mail/qmail-vida/files/maildir b/mail/qmail-vida/files/maildir
new file mode 100644
index 000000000000..a11543bcdf7a
--- /dev/null
+++ b/mail/qmail-vida/files/maildir
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Using splogger to send the log through syslog.
+# Using qmail-local to deliver messages to Maildir format by default
+
+exec env - PATH="QMAIL/bin:$PATH" \
+qmail-start ./Maildir/ \
+splogger qmail
diff --git a/mail/qmail-vida/files/maildir+vida.in b/mail/qmail-vida/files/maildir+vida.in
new file mode 100644
index 000000000000..caedd26c9989
--- /dev/null
+++ b/mail/qmail-vida/files/maildir+vida.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# Using splogger to send the log through syslog.
+# Using qmail-local to deliver messages to Maildir format by default
+# Using tcpserver and checkpassword
+
+exec env - PATH="%%PREFIX%%/bin:$PATH" \
+qmail-start ./Maildir/ \
+splogger qmail &
+
+exec env - PATH="%%PREFIX%%/bin:$PATH" \
+tcpserver -vHR -x %%TCPSERVERDB%% -c 40 0 \
+smtp qmail-smtpup $HOST checkpassword qmail-smtpd 2>&1 | \
+%%PREFIX%%/bin/splogger smtpd 4 &
+
+exec env - PATH="%%PREFIX%%/bin:$PATH" \
+tcpserver -vHR -x %%TCPSERVERDB%% 0 \
+pop3 qmail-popup $HOST checkpassword qmail-pop3d Maildir 2>&1 | \
+%%PREFIX%%/bin/splogger pop3d 4 &
diff --git a/mail/qmail-vida/files/mailer.conf.sample.in b/mail/qmail-vida/files/mailer.conf.sample.in
new file mode 100644
index 000000000000..08a3ceb57ce7
--- /dev/null
+++ b/mail/qmail-vida/files/mailer.conf.sample.in
@@ -0,0 +1,10 @@
+# Configuration for mailwrapper is kept in /etc/mail/mailer.conf.
+# Replace that file with this one to enable qmail under a sendmail
+# disguise. Very useful.
+
+sendmail %%PREFIX%%/bin/sendmail
+send-mail %%PREFIX%%/bin/sendmail
+mailq %%PREFIX%%/bin/qmail-qread
+newaliases %%PREFIX%%/bin/newaliases
+hoststat %%PREFIX%%/bin/qmail-tcpto
+purgestat %%PREFIX%%/bin/qmail-tcpok
diff --git a/mail/qmail-vida/files/mkaliasdir b/mail/qmail-vida/files/mkaliasdir
new file mode 100644
index 000000000000..fab410af6370
--- /dev/null
+++ b/mail/qmail-vida/files/mkaliasdir
@@ -0,0 +1,109 @@
+#!/usr/bin/perl
+#
+# Script to populate a Qmail ~alias directory with entries from
+# an [SZ]mail{er} or sendmail-like aliases file
+#
+# $FreeBSD: /tmp/pcvs/ports/mail/qmail-vida/files/Attic/mkaliasdir,v 1.1 2005-08-30 14:44:26 garga Exp $
+#
+# Dan Cross <tenser@spitfire.ecsel.psu.edu>
+#
+
+require 'getopts.pl';
+
+$ALIASES = "/etc/aliases";
+
+die "$0 must be run as root!\n" if ($< != 0);
+
+do Getopts('vf:');
+
+$verbose = 0 unless ($verbose = $opt_v);
+$aliases = $ALIASES unless ($aliases = $opt_f);
+
+if (($aliasdir = (getpwnam("qalias"))[7]) eq "")
+{
+ die "User qalias does not exist, bailing!\n";
+}
+
+if (($qmaildir = (getpwnam("qmaild"))[7]) eq "")
+{
+ die "User qmaild does not exist, bailing!\n";
+}
+
+$ME = "$qmaildir/control/me";
+
+die "Error opening $ME: $!\n" unless open(ME, "$ME");
+chop($me = <ME>);
+close (ME);
+
+die "Error opening $aliases: $!\n" unless open(ALIASES, "$aliases");
+
+while (<ALIASES>)
+{
+ chop;
+
+ $mode = ">";
+
+ s/#.*$//;
+
+ ($target, $data) = split(/:/, $_, 2);
+
+ $data =~ s/^\s+//;
+ $data =~ s/\s+$//;
+
+ next if (/^$/);
+
+ if ($data =~ /^$/)
+ {
+ while (chop($data = <ALIASES>))
+ {
+ $data =~ s/^\s+//;
+ $data =~ s/\s+$//;
+
+ last if ($data !~ /^$/);
+ }
+ }
+
+ $f = "$aliasdir/.qmail-$target";
+
+ @data = split(/\,/, $data);
+ $datum = $data[0];
+
+ if ($datum =~ /^:include:/i)
+ {
+ $datum =~ s/^:include://i;
+ $verbose && print "Symlinking $f to $datum...\n";
+ symlink($datum, $f);
+ shift(@data);
+ $f = $datum;
+ $mode = ">>";
+ }
+
+ open(ALIAS, "$mode$f") || die "Error creating $f: $!\n";
+
+ $verbose && print "Creating $f...\n";
+
+ foreach $datum (@data)
+ {
+ $datum =~ s/"$// if ($datum =~ s/^"// ||
+ $datum =~ s/^\|[ \t]*"/|/);
+
+ if ($datum =~ /^[|\/]/)
+ {
+ print ALIAS $datum, "\n";
+ }
+ else
+ {
+ $datum = "&" . $datum;
+ $datum .= "\@$me" unless ($datum =~ /\@/);
+ print ALIAS "$datum\n";
+ }
+
+ $verbose && print "\tPopulating $f with $datum...\n";
+ }
+
+ close(ALIAS);
+}
+
+close(ALIASES);
+
+exit 0;
diff --git a/mail/qmail-vida/files/patch-install.c b/mail/qmail-vida/files/patch-install.c
new file mode 100644
index 000000000000..97780f9f61fd
--- /dev/null
+++ b/mail/qmail-vida/files/patch-install.c
@@ -0,0 +1,37 @@
+--- install.c.orig Mon Jun 15 07:53:16 1998
++++ install.c Fri May 6 09:30:15 2005
+@@ -10,6 +10,7 @@
+ #define FATAL "install: fatal: "
+
+ int fdsourcedir = -1;
++noc; /* hack for bin package install -- see port pkg/INSTALL */
+
+ void h(home,uid,gid,mode)
+ char *home;
+@@ -75,6 +76,7 @@
+ int gid;
+ int mode;
+ {
++ if (!noc) {
+ int fdin;
+ int fdout;
+
+@@ -115,6 +117,7 @@
+ strerr_die6sys(111,FATAL,"unable to chown .../",subdir,"/",file,": ");
+ if (chmod(file,mode) == -1)
+ strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": ");
++ }
+ }
+
+ void z(home,file,len,uid,gid,mode)
+@@ -152,8 +155,9 @@
+ strerr_die6sys(111,FATAL,"unable to chmod ",home,"/",file,": ");
+ }
+
+-void main()
++void main(argc, argv)
+ {
++ noc=--argc;
+ fdsourcedir = open_read(".");
+ if (fdsourcedir == -1)
+ strerr_die2sys(111,FATAL,"unable to open current directory: ");
diff --git a/mail/qmail-vida/files/patch-qmail-local.c b/mail/qmail-vida/files/patch-qmail-local.c
new file mode 100644
index 000000000000..ee0709db5b8f
--- /dev/null
+++ b/mail/qmail-vida/files/patch-qmail-local.c
@@ -0,0 +1,11 @@
+--- qmail-local.c.orig Sun Nov 23 18:30:43 2003
++++ qmail-local.c Sun Nov 23 18:31:31 2003
+@@ -645,7 +645,7 @@
+ {
+ cmds.s[j] = 0;
+ k = j;
+- while ((k > i) && (cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t'))
++ while ((k > i) && ((cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t')))
+ cmds.s[--k] = 0;
+ switch(cmds.s[i])
+ {
diff --git a/mail/qmail-vida/files/pkg-install.in b/mail/qmail-vida/files/pkg-install.in
new file mode 100644
index 000000000000..e7c09c48855c
--- /dev/null
+++ b/mail/qmail-vida/files/pkg-install.in
@@ -0,0 +1,114 @@
+#!/bin/csh -f
+#
+# $FreeBSD: /tmp/pcvs/ports/mail/qmail-vida/files/Attic/pkg-install.in,v 1.1 2005-08-30 14:44:26 garga Exp $
+#
+
+# Author : Marcos Tischer Vallim
+# E-Mail : tischer@gmail.com
+# Date : Tue Mar 22 00:40:45 BRT 2005
+
+set path = ( /bin /sbin /usr/bin /usr/sbin )
+
+if ($uid != 0) then
+ echo "It is necessary to add missing qmail users/groups at";
+ echo "this stage. Please either add them manually or retry";
+ echo "as root.";
+ exit 1;
+endif
+
+if (! -x `which pw`) then
+ echo "This system looks like a pre-2.2 version of FreeBSD. We see that it";
+ echo "is missing the "pw" utility. We need this utility. Please get and";
+ echo "install it, and try again. You can get the source from:";
+ echo "";
+ echo " ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/usr.sbin/pw.tar.gz";
+ echo "";
+ echo "No pw";
+ exit 1;
+endif
+
+switch ($argv[2])
+
+case "PRE-INSTALL":
+ set groups = (vida qmail qnofiles);
+ set gids = (83 82 81);
+ set users = (alias qmaild qmaill qmailp qmailq qmailr qmails qmailu authdb);
+ set users_g = (qnofiles qnofiles qnofiles qnofiles qmail qmail qmail vida vida);
+ set uids = (81 82 83 84 85 86 87 90 91);
+
+
+ set k = 1;
+ foreach group ($groups)
+ pw groupshow $group >& /dev/null;
+
+ if ($status) then
+ pw groupadd $group -g $gids[$k];
+
+ if ($status) then
+ echo "Failed to add group '$group' as gid '$gids[$k]'";
+ exit 1;
+ endif
+ endif
+
+ set chkgid = (`pw groupshow $group | sed -e "s,:, ,g"`);
+ if ($chkgid[3] != $gids[$k]) then
+ echo "Group '$group' should have gid '$gids[$k]'";
+ exit 1;
+ endif
+
+ @ k++;
+ end
+
+ set k = 1;
+ foreach user ($users)
+ pw usershow $user >& /dev/null;
+
+ if ($status) then
+ if ($user == "alias") then
+ set home = ${PKG_PREFIX}/alias;
+ else
+ set home = ${PKG_PREFIX};
+ endif
+
+ pw useradd $user -g $users_g[$k] -d $home -s /nonexistent -u $uids[$k];
+
+ if ($status) then
+ echo "Failed to add user '$user' as uid '$uids[$k]'";
+ exit 1;
+ endif
+ endif
+
+ set chkuid = (`pw usershow $user | sed -e "s,:, ,g"`);
+ if ($chkuid[3] != $uids[$k]) then
+ echo "User '$user' should have uid '$uids[$k]'";
+ exit 1;
+ endif
+
+ @ k++;
+ end
+
+ breaksw;
+
+case "POST-INSTALL":
+ ${PKG_PREFIX}/configure/install x;
+
+ if ( ! `filetest -e ${PKG_PREFIX}/control/me` ) then
+ cd ${PKG_PREFIX}/configure && ./config;
+ endif
+
+ %%RCDLINK%%ln -s ${PKG_PREFIX}/rc %%LOCALBASE%%/etc/rc.d/qmail.sh;
+
+ touch ${PKG_PREFIX}/alias/.qmail-{postmaster,root,mailer-daemon};
+
+ if ($status) then
+ echo "Failed to create files :";
+ echo " ${PKG_PREFIX}/alias/.qmail-postmaster";
+ echo " ${PKG_PREFIX}/alias/.qmail-root";
+ echo " ${PKG_PREFIX}/alias/.qmail-mailer-daemon";
+ exit 1;
+ endif
+
+ breaksw;
+endsw
+
+exit 0;
diff --git a/mail/qmail-vida/files/pkg-message-ldap.in b/mail/qmail-vida/files/pkg-message-ldap.in
new file mode 100644
index 000000000000..56272ff24640
--- /dev/null
+++ b/mail/qmail-vida/files/pkg-message-ldap.in
@@ -0,0 +1,35 @@
+ ATTENTION:
+
+Please make sure that you read %%PREFIX%%/doc/PORT_NOTES.
+It contains important information about testing and configuring
+qmail, and finally replacing sendmail with qmail.
+
+You should also add %%PREFIX%%/man to your MANPATH (see manpath(1)
+or login.conf(5)).
+
+Do not forget to read %%PREFIX%%/doc/QLDAPINSTALL. After all,
+this is NOT our old stock qmail. And, %%PREFIX%%/doc/ANTISPAM
+for some antispam control measures.
+
+The qmail.schema file was copied to %%DOCSDIR%%. Remember
+to copy it to ldap's schema directory
+
+You can enable qmail as your default mailer executing:
+> %%PREFIX%%/scripts/enable-qmail
+
+=====><=====
+
+If you've built this port with TLS support (WITH_TLS=yes)
+
+==> You will need to provide a working certificate in %%PREFIX%%/control/cert.pem :
+
+# makes a self-signed certificate
+3) do "make certificate"
+
+# makes a certificate request
+4) do "make certificate-req"
+
+=====><=====
+
+Now, you need to use it. Check a little FreeBSD specific how-to at
+http://freebsd.cg.nu/postfixqmail-ldap.html
diff --git a/mail/qmail-vida/files/pkg-message-smtp_auth+tls.in b/mail/qmail-vida/files/pkg-message-smtp_auth+tls.in
new file mode 100644
index 000000000000..b833bab4dd99
--- /dev/null
+++ b/mail/qmail-vida/files/pkg-message-smtp_auth+tls.in
@@ -0,0 +1,23 @@
+ ATTENTION:
+
+Please make sure that you read %%PREFIX%%/doc/PORT_NOTES.
+It contains important information about testing and configuring
+qmail, and finally replacing sendmail with qmail.
+
+You should also add %%PREFIX%%/man to your MANPATH (see manpath(1)
+or login.conf(5)).
+
+Do not forget to read both %%PREFIX%%/doc/SMTP_AUTH+TLS.readme AND
+%%PREFIX%%/doc/README.auth. After all, this is NOT our old stock
+qmail.
+
+You can enable qmail as your default mailer executing:
+> %%PREFIX%%/scripts/enable-qmail
+
+==> As you need to provide a working certificate in %%PREFIX%%/control/cert.pem :
+
+# makes a self-signed certificate
+3) do "make certificate"
+
+# makes a certificate request
+4) do "make certificate-req"
diff --git a/mail/qmail-vida/files/pkg-message-tls.in b/mail/qmail-vida/files/pkg-message-tls.in
new file mode 100644
index 000000000000..a13b66738e46
--- /dev/null
+++ b/mail/qmail-vida/files/pkg-message-tls.in
@@ -0,0 +1,22 @@
+ ATTENTION:
+
+Please make sure that you read %%PREFIX%%/doc/PORT_NOTES.
+It contains important information about testing and configuring
+qmail, and finally replacing sendmail with qmail.
+
+You should also add %%PREFIX%%/man to your MANPATH (see manpath(1)
+or login.conf(5)).
+
+Do not forget to read %%PREFIX%%/doc/TLS.readme. After all,
+this is NOT our old stock qmail.
+
+You can enable qmail as your default mailer executing:
+> %%PREFIX%%/scripts/enable-qmail
+
+==> As you need to provide a working certificate in %%PREFIX%%/control/cert.pem :
+
+# makes a self-signed certificate
+3) do "make certificate"
+
+# makes a certificate request
+4) do "make certificate-req"
diff --git a/mail/qmail-vida/files/pkg-message.in b/mail/qmail-vida/files/pkg-message.in
new file mode 100644
index 000000000000..f3736f9b333e
--- /dev/null
+++ b/mail/qmail-vida/files/pkg-message.in
@@ -0,0 +1,11 @@
+ ATTENTION:
+
+Please make sure that you read %%PREFIX%%/doc/PORT_NOTES.
+It contains important information about testing and configuring
+qmail, and finally replacing sendmail with qmail.
+
+You should also add %%PREFIX%%/man to your MANPATH (see manpath(1)
+or login.conf(5)).
+
+You can enable qmail as your default mailer executing:
+> %%PREFIX%%/scripts/enable-qmail