summaryrefslogtreecommitdiffstats
path: root/net-mail/qmail-usergen
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/qmail-usergen')
-rw-r--r--net-mail/qmail-usergen/Manifest3
-rwxr-xr-xnet-mail/qmail-usergen/files/qmail.sh29
-rw-r--r--net-mail/qmail-usergen/files/users/exclude14
-rw-r--r--net-mail/qmail-usergen/qmail-usergen-0.1.ebuild18
4 files changed, 64 insertions, 0 deletions
diff --git a/net-mail/qmail-usergen/Manifest b/net-mail/qmail-usergen/Manifest
new file mode 100644
index 0000000..b96860b
--- /dev/null
+++ b/net-mail/qmail-usergen/Manifest
@@ -0,0 +1,3 @@
+AUX qmail.sh 838 RMD160 d938fc6d08b015ac62abbf706bac9561ad9a6fd5 SHA1 1a738101126db488e8736dc790fe12caa579ff8c SHA256 92b9a6b9d244164246945da348489b47f903e656badd841376f03eaf72299a5d
+AUX users/exclude 90 RMD160 d100de545be02dfcc80e3ee58ebdea1fb050b4cb SHA1 05d94e4079e9b234338fa4a34007747e51de6d25 SHA256 8aadcc187e5cc9740df1904f1983de8863b6472c81e90c9a54eb04c21e61900c
+EBUILD qmail-usergen-0.1.ebuild 427 RMD160 18c9565e39149dba52cfe69b623c96187bb85957 SHA1 68bf40373e5fde0852d6a61086807d15ffcf65ee SHA256 8c0f0c5b1806c95a414cc13ddc60eedc7bb114a44db7ae0e15cd5e04425f8178
diff --git a/net-mail/qmail-usergen/files/qmail.sh b/net-mail/qmail-usergen/files/qmail.sh
new file mode 100755
index 0000000..e9f3490
--- /dev/null
+++ b/net-mail/qmail-usergen/files/qmail.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+QMAILHOME=/var/qmail
+
+touch $QMAILHOME/users/assign.passwd
+touch $QMAILHOME/users/assign
+
+# create assign.nopasswd file
+( cat $QMAILHOME/users/assign.passwd && cat $QMAILHOME/users/assign ) \
+ | sort | uniq -u > $QMAILHOME/users/assign.nopasswd
+
+# create the assign file from passwd entries (using getent)
+getent passwd | $QMAILHOME/bin/qmail-pw2u > $QMAILHOME/users/assign.passwd
+
+# merge assign.nopasswd and assign.passwd in assign
+( cat $QMAILHOME/users/assign.nopasswd && cat $QMAILHOME/users/assign.passwd) \
+ | sort -k 2 | uniq | grep -v "^.$" > $QMAILHOME/users/assign
+
+# Fix for vpopmail
+#( cat $QMAILHOME/users/assign.nopasswd && cat $QMAILHOME/users/assign.passwd \
+# | sort -k 2 | uniq ) | grep -v "^.$" > $QMAILHOME/users/assign
+
+
+echo "." >> $QMAILHOME/users/assign
+
+
+
+# make cdb file
+$QMAILHOME/bin/qmail-newu
diff --git a/net-mail/qmail-usergen/files/users/exclude b/net-mail/qmail-usergen/files/users/exclude
new file mode 100644
index 0000000..f4af044
--- /dev/null
+++ b/net-mail/qmail-usergen/files/users/exclude
@@ -0,0 +1,14 @@
+ldap
+xfs
+rpm
+apache
+postgres
+mysql
+named
+squid
+ftp
+portage
+vpopmail
+firebird
+snort
+jabber
diff --git a/net-mail/qmail-usergen/qmail-usergen-0.1.ebuild b/net-mail/qmail-usergen/qmail-usergen-0.1.ebuild
new file mode 100644
index 0000000..1f26a15
--- /dev/null
+++ b/net-mail/qmail-usergen/qmail-usergen-0.1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+inherit eutils
+
+DESCRIPTION="Script to generate user tables for qmail"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64"
+
+src_install() {
+ dodir /etc/cron.hourly
+ install -c -m 755 ${FILESDIR}/qmail.sh ${D}/etc/cron.hourly
+
+ dodir /var/qmail/users
+ install -c -m 644 ${FILESDIR}/users/* ${D}/var/qmail/users
+}