Commit b62d22a2 authored by Michael Mason's avatar Michael Mason

Merge branch 'master' of git://git.alpinelinux.org/aports

parents b964c905 8242328d
--- asterisk-1.4.0/Makefile.orig 2006-12-24 03:07:19.000000000 +0000
+++ asterisk-1.4.0/Makefile 2006-12-24 03:07:57.000000000 +0000
@@ -109,7 +109,7 @@
ASTSBINDIR=$(sbindir)
ASTSPOOLDIR=$(localstatedir)/spool/asterisk
ASTLOGDIR=$(localstatedir)/log/asterisk
- ASTVARRUNDIR=$(localstatedir)/run
+ ASTVARRUNDIR=$(localstatedir)/run/asterisk
ASTMANDIR=$(mandir)
ifeq ($(OSARCH),FreeBSD)
ASTVARLIBDIR=$(prefix)/share/asterisk
......@@ -2,7 +2,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
pkgver=1.6.0.9
pkgrel=1
pkgrel=2
pkgdesc="Asterisk: A Module Open Source PBX System"
url="http://www.asterisk.org/"
license="GPL"
......@@ -17,6 +17,7 @@ source="http://downloads.digium.com/pub/asterisk/releases/$pkgname-$pkgver.tar.g
100-uclibc-daemon.patch
101-caps-uclibc.patch
102-gsm-pic.patch
103-rundir.patch
asterisk.pre-install
asterisk.post-install
asterisk.initd
......@@ -87,7 +88,8 @@ md5sums="9142461a5ae047a5493bcb610963bc42 asterisk-1.6.0.9.tar.gz
b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch
929f740db7043b4553544ebcc7315c91 101-caps-uclibc.patch
97b39fd9777a2521d4f9f095482b7ac2 102-gsm-pic.patch
5008f51c737ec91f5047519bc9f25b85 103-rundir.patch
b4a97cb1ec3cc3f71a10ce8c067ab430 asterisk.pre-install
62ecffc90b6714b85f377d1fac73c58b asterisk.post-install
bbcd152417bb7c838b25cb6007db91da asterisk.initd
9748fc0fb3cf43b18a68584bdc20cb6c asterisk.initd
ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd"
......@@ -6,7 +6,7 @@ is_running() {
if [ -z "$(pidof asterisk)" ]; then
return 1
else
PID="$(cat /var/run/asterisk/asterisk.pid)"
PID="$(cat /var/run/asterisk/asterisk.pid 2>/dev/null)"
for x in $(pidof asterisk); do
if [ "${x}" = "${PID}" ]; then
return 0
......
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fetchmail
pkgver=6.3.9
pkgrel=1
pkgrel=2
pkgdesc="A remote-mail retrieval and forwarding utility"
url="http://fetchmail.berlios.de/"
license="GPL"
......@@ -24,13 +24,14 @@ build() {
--disable-nls
make || return 1
make DESTDIR="$pkgdir" install
install -Dm755 $srcdir/fetchmail.initrd "$pkgdir"/etc/init.d/fetchmail
install -d "$pkgdir"/var/lib/fetchmail
install -Dm755 "$srcdir"/fetchmail.initd "$pkgdir"/etc/init.d/fetchmail
install -d "$pkgdir"/var/lib/fetchmail "$pkgdir"/var/run/fetchmail
}
fetchmailconf() {
depends="python"
pkgdesc="A GUI for generating fetchmail configuration files"
install=
mkdir -p "$subpkgdir"/usr/bin
cd "$pkgdir"
mv usr/bin/fetchmailconf "$subpkgdir"/usr/bin/
......@@ -39,5 +40,5 @@ fetchmailconf() {
md5sums="72c20ad2b9629f1a109668b05a84d823 fetchmail-6.3.9.tar.bz2
5a2fc8e8b3115fe2b9bf23503fb8f0a4 fetchmail.pre-install
e27237ed73ad183ddd06dfd5e3dd0da7 fetchmail.post-install
4b451d102e92926b6b6c1774f4260310 fetchmail.post-install
9a64c2b77d1a03a1eb8648a32d46b2c5 fetchmail.initd"
#!/bin/sh
chown fetchmail:fetchmail /var/lib/fetchmail
chown fetchmail:fetchmail /var/*/fetchmail
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cyrus-sasl
pkgver=2.1.23
pkgrel=0
pkgdesc="Cyrus Simple Authentication Service Layer (SASL)"
url="http://cyrusimap.web.cmu.edu/downloads.html#sasl"
license="custom"
subpackages="$pkgname-dev $pkgname-doc libsasl"
depends="db openssl uclibc libsasl"
makedepends="db-dev openssl-dev"
#install=libsasl.install
source="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$pkgname-$pkgver.tar.gz
saslauthd.initd
cyrus-sasl-2.1.19-checkpw.c.patch
db-4.7.patch"
build ()
{
cd "$srcdir"/cyrus-sasl-$pkgver
for i in ../*.patch; do
msg "Applying $i..."
patch -p0 -i $i || return 1
done
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-anon \
--disable-cram \
--disable-digest \
--disable-gssapi \
--enable-login \
--disable-otp \
--enable-plain \
--with-devrandom=/dev/urandom \
--mandir=/usr/share/man
make -j1 || return 1
make -j1 DESTDIR="$pkgdir" install || return 1
install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
install -Dm755 ../saslauthd.initd "$pkgdir"/etc/init.d/saslauthd
}
libsasl() {
depends="uclibc db"
pkgdesc="Cyrus Simple Authentication and Security Layer (SASL) library"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
md5sums="2eb0e48106f0e9cd8001e654f267ecbc cyrus-sasl-2.1.23.tar.gz
9045c1b9c79a6ae0727b31e602d098ad saslauthd.initd
e27ddff076342e7a3041c4759817d04b cyrus-sasl-2.1.19-checkpw.c.patch
71a3b7454f4d7cc2966b347bdf03f2fc db-4.7.patch"
diff -ur ../cyrus-sasl-2.1.19.orig/lib/Makefile.in ./lib/Makefile.in
--- ../cyrus-sasl-2.1.19.orig/lib/Makefile.in 2004-07-02 21:40:15.000000000 +0200
+++ ./lib/Makefile.in 2004-09-07 13:21:22.746680576 +0200
@@ -120,7 +120,7 @@
JAVA_TRUE = @JAVA_TRUE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+LIBS = -lcrypt @LIBS@
LIBTOOL = @LIBTOOL@
LIB_CRYPT = @LIB_CRYPT@
LIB_DES = @LIB_DES@
diff -ur ../cyrus-sasl-2.1.19.orig/lib/checkpw.c ./lib/checkpw.c
--- ../cyrus-sasl-2.1.19.orig/lib/checkpw.c 2004-03-17 14:58:13.000000000 +0100
+++ ./lib/checkpw.c 2004-09-07 13:21:12.645916147 +0200
@@ -94,6 +94,23 @@
# endif
#endif
+/******************************
+ * crypt(3) patch start *
+ ******************************/
+char *crypt(const char *key, const char *salt);
+
+/* cleartext password formats */
+#define PASSWORD_FORMAT_CLEARTEXT 1
+#define PASSWORD_FORMAT_CRYPT 2
+#define PASSWORD_FORMAT_CRYPTTRAD 3
+#define PASSWORD_SALT_BUF_LEN 22
+
+/* weeds out crypt(3) password's salt */
+int _sasl_get_salt (char *dest, char *src, int format);
+
+/******************************
+ * crypt(3) patch stop *
+ ******************************/
/* we store the following secret to check plaintext passwords:
*
@@ -143,7 +160,51 @@
"*cmusaslsecretPLAIN",
NULL };
struct propval auxprop_values[3];
-
+
+ /******************************
+ * crypt(3) patch start *
+ * for password format check *
+ ******************************/
+ sasl_getopt_t *getopt;
+ void *context;
+ const char *p = NULL;
+ /**
+ * MD5: 12 char salt
+ * BLOWFISH: 16 char salt
+ */
+ char salt[PASSWORD_SALT_BUF_LEN];
+ int password_format;
+
+ /* get password format from auxprop configuration */
+ if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
+ getopt(context, NULL, "password_format", &p, NULL);
+ }
+
+ /* set password format */
+ if (p) {
+ /*
+ memset(pass_format_str, '\0', PASSWORD_FORMAT_STR_LEN);
+ strncpy(pass_format_str, p, (PASSWORD_FORMAT_STR_LEN - 1));
+ */
+ /* modern, modular crypt(3) */
+ if (strncmp(p, "crypt", 11) == 0)
+ password_format = PASSWORD_FORMAT_CRYPT;
+ /* traditional crypt(3) */
+ else if (strncmp(p, "crypt_trad", 11) == 0)
+ password_format = PASSWORD_FORMAT_CRYPTTRAD;
+ /* cleartext password */
+ else
+ password_format = PASSWORD_FORMAT_CLEARTEXT;
+ } else {
+ /* cleartext password */
+ password_format = PASSWORD_FORMAT_CLEARTEXT;
+ }
+
+ /******************************
+ * crypt(3) patch stop *
+ * for password format check *
+ ******************************/
+
if (!conn || !userstr)
return SASL_BADPARAM;
@@ -180,14 +241,31 @@
goto done;
}
- /* At the point this has been called, the username has been canonified
- * and we've done the auxprop lookup. This should be easy. */
- if(auxprop_values[0].name
- && auxprop_values[0].values
- && auxprop_values[0].values[0]
- && !strcmp(auxprop_values[0].values[0], passwd)) {
- /* We have a plaintext version and it matched! */
- return SASL_OK;
+
+ /******************************
+ * crypt(3) patch start *
+ ******************************/
+
+ /* get salt */
+ _sasl_get_salt(salt, (char *) auxprop_values[0].values[0], password_format);
+
+ /* crypt(3)-ed password? */
+ if (password_format != PASSWORD_FORMAT_CLEARTEXT) {
+ /* compare password */
+ if (auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] && strcmp(crypt(passwd, salt), auxprop_values[0].values[0]) == 0)
+ return SASL_OK;
+ else
+ ret = SASL_BADAUTH;
+ }
+ else if (password_format == PASSWORD_FORMAT_CLEARTEXT) {
+ /* compare passwords */
+ if (auxprop_values[0].name && auxprop_values[0].values && auxprop_values[0].values[0] && strcmp(auxprop_values[0].values[0], passwd) == 0)
+ return SASL_OK;
+ else
+ ret = SASL_BADAUTH;
+ /******************************
+ * crypt(3) patch stop *
+ ******************************/
} else if(auxprop_values[1].name
&& auxprop_values[1].values
&& auxprop_values[1].values[0]) {
@@ -975,3 +1053,37 @@
#endif
{ NULL, NULL }
};
+
+/* weeds out crypt(3) password's salt */
+int _sasl_get_salt (char *dest, char *src, int format) {
+ int num; /* how many characters is salt long? */
+ switch (format) {
+ case PASSWORD_FORMAT_CRYPT:
+ /* md5 crypt */
+ if (src[1] == '1')
+ num = 12;
+ /* blowfish crypt */
+ else if (src[1] == '2')
+ num = (src[1] == '2' && src[2] == 'a') ? 17 : 16;
+ /* traditional crypt */
+ else
+ num = 2;
+ break;
+
+ case PASSWORD_FORMAT_CRYPTTRAD:
+ num = 2;
+ break;
+
+ default:
+ return 1;
+ }
+
+ /* destroy destination */
+ memset(dest, '\0', (num + 1));
+
+ /* copy salt to destination */
+ strncpy(dest, src, num);
+
+ return 1;
+}
+
--- configure 2006-05-18 21:30:13.000000000 +0200
+++ configure.new 2007-09-29 00:22:42.000000000 +0200
@@ -5125,7 +5125,7 @@
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.7 db4.7 db47 db-4.54 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
@@ -5882,7 +5882,7 @@
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.7 db4.7 db47 db-4.54 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd2.rc6,v 1.7 2007/04/07 13:03:55 chtekk Exp $
depend() {
need net
}
start() {
ebegin "Starting saslauthd"
start-stop-daemon --start --quiet --exec /usr/sbin/saslauthd \
-- ${SASLAUTHD_OPTS}
eend $?
}
stop() {
ebegin "Stopping saslauthd"
start-stop-daemon --stop --quiet --pidfile /var/lib/sasl2/saslauthd.pid
eend $?
}
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postfix
pkgver=2.6.1
pkgrel=0
pkgdesc="Secure and fast drop-in replacement for Sendmail (MTA)"
url="http://www.postfix.org/"
license="IPL-1"
depends="db pcre openssl libsasl"
makedepends="db-dev pcre-dev openssl-dev postgresql-dev mysql-dev openldap-dev cyrus-sasl-dev"
install="$pkgname.pre-install $pkgname.post-install"
subpackages="$pkgname-doc $pkgname-ldap $pkgname-mysql $pkgname-pcre
$pkgname-pgsql"
source="ftp://ftp.porcupine.org/mirrors/$pkgname-release/official/$pkgname-$pkgver.tar.gz
$pkgname.initd
$install
postfix-2.6.1-dynamicmaps.patch
dynamicmaps.cf
postfix-ldap.post-install
postfix-mysql.post-install
postfix-pcre.post-install
postfix-pgsql.post-install
"
# the dynamic maps patch is taken from mandriva
# http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/postfix/current/SOURCES
build () {
cd "$srcdir/$pkgname-$pkgver"
for i in ../*.patch; do
msg "Applying $i..."
patch -p1 < $i || return 1
done
cp ../dynamicmaps.cf conf/
sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \
-e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/postfix/aliases|" \
src/util/sys_defs.h || return 1
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || return 1
# needed for dynamic maps.
local ccargs="-DHAS_DLOPEN -DHAS_SHL_LOAD"
local auxlibs="$LDFLAGS -lpthread -lcrypt"
ccargs="$ccargs -DDEF_DAEMON_DIR=\\\"/usr/lib/postfix\\\""
# pcre
ccargs="$ccargs -DHAS_PCRE"
#auxlibs="$auxlibs -lpcre"
# ssl
ccargs="$ccargs -DUSE_TLS"
auxlibs="$auxlibs -lssl -lcrypto"
## dovecot-sasl
#ccargs="$ccargs -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\""
# cyrus sasl
ccargs="$ccargs -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl"
auxlibs="$auxlibs -lsasl2"
# postgresql
ccargs="$ccargs -DHAS_PGSQL -I$(pg_config --includedir)"
#auxlibs="$auxlibs -lpq -L$(pg_config --libdir)"
# mysql
ccargs="$ccargs -DHAS_MYSQL $(mysql_config --include)"
#auxlibs="$auxlibs -lmysqlclient -lm -lz"
# compile
make DEBUG="" \
OPT="$CFLAGS" \
CCARGS="$ccargs" \
AUXLIBS="$auxlibs" \
makefiles || return 1
make OPT="$CFLAGS" || return 1
for i in lib/*.a; do
j=${i#lib/lib}
ln -s ${i#lib/} lib/libpostfix-${j%.a}.so.1
done
# install to pkgdir
LD_LIBRARY_PATH=$PWD/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} make \
non-interactive-package \
install_root="$pkgdir" \
config_directory=/usr/share/doc/$pkgname/defaults \
readme_directory=/usr/share/doc/$pkgname/readme \
manpage_directory=/usr/share/man \
|| return 1
install -d "$pkgdir"/usr/lib
for i in lib/*.a; do
j=${i#lib/lib}
install $i "$pkgdir"/usr/lib/libpostfix-${j%.a}.so.1 || return 1
done
# fix permissions
for i in postdrop postqueue; do
chgrp postdrop "$pkgdir"/usr/sbin/$i
chmod g+s "$pkgdir"/usr/sbin/$i
done
mkdir -p "$pkgdir"/etc/postfix
mv "$pkgdir"/usr/share/doc/$pkgname/defaults/*.cf \
"$pkgdir"/usr/share/doc/$pkgname/defaults/aliases \
"$pkgdir"/usr/share/doc/$pkgname/defaults/canonical \
"$pkgdir"/usr/share/doc/$pkgname/defaults/generic \
"$pkgdir"/usr/share/doc/$pkgname/defaults/header_checks \
"$pkgdir"/usr/share/doc/$pkgname/defaults/relocated \
"$pkgdir"/usr/share/doc/$pkgname/defaults/transport \
"$pkgdir"/usr/share/doc/$pkgname/defaults/virtual \
"$pkgdir"/etc/postfix/ || return 1
install -d -o postfix -g postfix "$pkgdir"/var/spool/postfix
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
}
_mv_dict() {
local m=$1
shift
pkgdesc="$m map support for postfix"
depends="postfix uclibc $@"
install="postfix-${m}.post-install"
mkdir -p "$subpkgdir"/usr/lib/postfix
mv "$pkgdir"/usr/lib/postfix/dict_${m}.so \
"$subpkgdir"/usr/lib/postfix/
}
ldap() { _mv_dict ldap libldap; }
mysql() { _mv_dict mysql libmysqlclient;}
pcre() { _mv_dict pcre pcre; }
pgsql() { _mv_dict pgsql libpq; }
md5sums="737bbc245da9c72c174893397f70ae86 postfix-2.6.1.tar.gz
8416354d402f3be288fa98b60af86240 postfix.initd
2bfc3864183694e5484ac073bb0cb7ef postfix.pre-install
0064d45c2c8a46c374b55c4abc46cfb2 postfix.post-install
b8812dbf2d076c79cf948ee017e81b39 postfix-2.6.1-dynamicmaps.patch
0efff9b4bb493ad2ff0b9915cb244d14 dynamicmaps.cf
2ebe51a882eb9d6d7866583eb6af3969 postfix-ldap.post-install
2ebe51a882eb9d6d7866583eb6af3969 postfix-mysql.post-install
2ebe51a882eb9d6d7866583eb6af3969 postfix-pcre.post-install
2ebe51a882eb9d6d7866583eb6af3969 postfix-pgsql.post-install"
# Postfix dynamic maps configuration file.
#
# The first match found is the one that is used. Wildcards are not
# supported.
#
#type location of .so file name of open function
#==== ============================= =====================
#ldap /usr/lib/postfix/dict_ldap.so dict_ldap_open
#mysql /usr/lib/postfix/dict_mysql.so dict_mysql_open
#pcre /usr/lib/postfix/dict_pcre.so dict_pcre_open
#pgsq /usr/lib/postfix/dict_pgsql.so dict_pgsql_open
# apk tools will manage the lines below
## AUTO BEGIN ##
## AUTO END ##
This diff is collapsed.
#!/bin/sh
# update the dynamicmaps.cf
conf=/etc/postfix/dynamicmaps.cf
sed -i -e '/\#\# AUTO BEGIN/,/\#\# AUTO END/d' $conf
(
echo '## AUTO BEGIN ##'
if cd /usr/lib/postfix/; then
for i in *.so; do
m=${i#dict_}
m=${m%.so}
echo -e "$m\t/usr/lib/postfix/$i\tdict_${m}_open"
done
fi
echo '## AUTO END ##'
) >> $conf
#!/bin/sh
# update the dynamicmaps.cf
conf=/etc/postfix/dynamicmaps.cf
sed -i -e '/\#\# AUTO BEGIN/,/\#\# AUTO END/d' $conf
(
echo '## AUTO BEGIN ##'
if cd /usr/lib/postfix/; then
for i in *.so; do
m=${i#dict_}
m=${m%.so}
echo -e "$m\t/usr/lib/postfix/$i\tdict_${m}_open"
done
fi
echo '## AUTO END ##'
) >> $conf
#!/bin/sh
# update the dynamicmaps.cf
conf=/etc/postfix/dynamicmaps.cf
sed -i -e '/\#\# AUTO BEGIN/,/\#\# AUTO END/d' $conf
(
echo '## AUTO BEGIN ##'
if cd /usr/lib/postfix/; then
for i in *.so; do
m=${i#dict_}
m=${m%.so}
echo -e "$m\t/usr/lib/postfix/$i\tdict_${m}_open"
done
fi
echo '## AUTO END ##'
) >> $conf
#!/bin/sh
# update the dynamicmaps.cf
conf=/etc/postfix/dynamicmaps.cf
sed -i -e '/\#\# AUTO BEGIN/,/\#\# AUTO END/d' $conf
(
echo '## AUTO BEGIN ##'
if cd /usr/lib/postfix/; then
for i in *.so; do
m=${i#dict_}
m=${m%.so}
echo -e "$m\t/usr/lib/postfix/$i\tdict_${m}_open"
done
fi
echo '## AUTO END ##'
) >> $conf
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.5,v 1.3 2008/08/18 14:18:40 falco Exp $
# If you plan to simultaneously use several Postfix instances, don't forget
# to specify your alternate_config_directories variable in your main main.cf file.
# Then make a symlink from /etc/init.d/postfix to /etc/init.d/postfix.alt,
# prepare your new /etc/postfix.alt environment, and at least change these working paths:
# queue_directory = /var/spool/postfix.alt
# data_directory = /var/lib/postfix.alt
CONF_DIR="/etc/postfix"
CONF_OPT="${SVCNAME##*.}"
if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then
CONF_DIR="${CONF_DIR}.${CONF_OPT}"
fi
opts="${opts} reload"
depend() {
use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd
if [ "${SVCNAME}" = "postfix" ]; then
provide mta
fi
}
start() {
ebegin "Starting postfix (${CONF_DIR})"
if [ ! -d ${CONF_DIR} ]; then
eend 1 "${CONF_DIR} does not exist"
return 1
fi
/usr/sbin/postfix -c ${CONF_DIR} start >/dev/null 2>&1
eend $?
}
stop() {
ebegin "Stopping postfix (${CONF_DIR})"
/usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1
eend $?
}
reload() {
ebegin "Reloading postfix (${CONF_DIR})"
/usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1
eend $?
}
#!/bin/sh
chown postfix /var/spool/postfix/* /var/lib/postfix
chgrp postdrop /var/spool/postfix/maildrop /var/spool/postfix/public
exit 0
#!/bin/sh
addgroup postfix 2>/dev/null
addgroup postdrop 2>/dev/null
adduser postfix -h /var/spool/postfix -G postfix,mail 2>/dev/null
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment