summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandino Araico Sanchez <sandino@sandino.net>2021-01-27 15:28:27 +0200
committerJoonas Niilola <juippis@gentoo.org>2021-01-27 15:29:18 +0200
commitfe99916a6310adad8cca2e1494681af0a476646b (patch)
tree8024d7f8026afcaa83ac79f53fb5387d4b3bb850 /net-mail/dbmail/files
parentapp-emulation/libcacard: EAPI 7 (diff)
downloadgentoo-fe99916a6310adad8cca2e1494681af0a476646b.tar.gz
gentoo-fe99916a6310adad8cca2e1494681af0a476646b.tar.bz2
gentoo-fe99916a6310adad8cca2e1494681af0a476646b.zip
net-mail/dbmail: version bump to 3.2.5
Signed-off-by: Sandino Araico Sanchez <sandino@sandino.net> Closes: https://bugs.gentoo.org/728060 Closes: https://github.com/gentoo/gentoo/pull/16994 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-mail/dbmail/files')
-rw-r--r--net-mail/dbmail/files/README.gentoo41
-rw-r--r--net-mail/dbmail/files/dbmail-imapd.initd74
-rw-r--r--net-mail/dbmail/files/dbmail-lmtpd.initd74
-rw-r--r--net-mail/dbmail/files/dbmail-pop3d.initd74
-rw-r--r--net-mail/dbmail/files/dbmail-timsieved.initd71
5 files changed, 149 insertions, 185 deletions
diff --git a/net-mail/dbmail/files/README.gentoo b/net-mail/dbmail/files/README.gentoo
new file mode 100644
index 000000000000..b7e052261a91
--- /dev/null
+++ b/net-mail/dbmail/files/README.gentoo
@@ -0,0 +1,41 @@
+Please read the INSTALL file in /usr/share/doc/${PF}/
+for remaining instructions on setting up dbmail users and
+for finishing configuration to connect to your MTA and
+to connect to your db.
+
+DBMail requires either SQLite, PostgreSQL or MySQL.
+Database schemes can be found in /usr/share/doc/${PF}/
+You will also want to follow the installation instructions
+on setting up the maintenance program to delete old messages.
+Don't forget to edit /etc/dbmail/dbmail.conf as well.
+
+For regular maintenance, add this to crontab:
+0 3 * * * /usr/bin/dbmail-util -cpdy >/dev/null 2>&1
+
+Please make sure to run etc-update.
+If you get an error message about plugins not found
+please add the library_directory configuration switch to
+dbmail.conf and set it to the correct path
+(usually /usr/lib/dbmail or /usr/lib64/dbmail on amd64)
+A sample can be found in dbmail.conf.dist after etc-update.
+
+We are now using the init script from upstream.
+Please edit /etc/conf.d/dbmail to set which services to start
+and delete /etc/init.d/dbmail-* when you are done. (don't
+forget to rc-update del dbmail-* first)
+
+Changed pid directory to /run/dbmail (see
+http://www.dbmail.org/mantis/view.php?id=949 for details)
+
+The database config has changed to support libzdb db URI
+Please check the documentation (or Bug #479664)
+
+The database schema has changed since 3.0.x make sure
+to run the migration script
+
+Please be aware, that the single init-script for all services
+has been replaced with seperate init scripts for the individual services.
+Make sure to add dbmail-(imapd|lmtpd|pop3d|timsieved) using rc-update
+and remove dbmail if you want to take advantage of this change.
+
+
diff --git a/net-mail/dbmail/files/dbmail-imapd.initd b/net-mail/dbmail/files/dbmail-imapd.initd
index f2e16dff1706..c2925f9ecb0e 100644
--- a/net-mail/dbmail/files/dbmail-imapd.initd
+++ b/net-mail/dbmail/files/dbmail-imapd.initd
@@ -1,11 +1,5 @@
-#!/sbin/openrc-run
+#!/sbin/runscript
#
-# chkconfig: - 91 35
-# description: Starts and stops dbmail-impad
-#
-
-
-PROGRAM=dbmail-imapd
BIN_DIR=/usr/sbin
PID_DIR=/run/dbmail
@@ -18,51 +12,37 @@ CONFIG=/etc/dbmail/dbmail.conf
#extra_started_commands="reload"
depend() {
- need net
- # This won't cause a hard failure if neither is installed, however.
- use mysql
- use pgsql
- after mta
+ need net
+ use mysql
+ use pgsql
+ after mta
}
-initService() {
- # Avoid using root's TMPDIR
- unset TMPDIR
-
- # Check that config file exists.
- if [ ! -e $CONFIG ]; then
- eerror "Config file not found ($CONFIG)"
- eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
- return 1
- fi
-
- checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
-
- RETVAL=0
+checkconfig() {
+ if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
}
+
start() {
- initService
- ebegin "Starting DBMail IMAP daemon ($PROGRAM)"
- start-stop-daemon --start --quiet \
- --pidfile $PID_DIR/$PROGRAM.$PID \
- --exec $BIN_DIR/$PROGRAM \
- --name $PROGRAM \
- -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
- eend $?
-}
+ checkconfig && \
+ ebegin "Starting DBMail IMAP daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-imapd \
+ --name dbmail-imapd \
+ -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
+ eend $?
+}
stop() {
- ebegin "Stopping DBMail IMAP daemon ($PROGRAM)"
- start-stop-daemon --stop --quiet --retry 15 \
- --pidfile $PID_DIR/$PROGRAM.$PID
- eend $?
-}
+ ebegin "Stopping DBMail IMAP daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
-## not in 3.1.x yet
-#reload() {#
-# ebegin "Reloading DBMail IMAP daemon ($PROGRAM)"
-# start-stop-daemon --quiet --signal HUP \
-# --pidfile $PID_DIR/$PROGRAM.$PID
-# eend $?
-#}
diff --git a/net-mail/dbmail/files/dbmail-lmtpd.initd b/net-mail/dbmail/files/dbmail-lmtpd.initd
index 7062098fb7b7..083d0e6b8a8c 100644
--- a/net-mail/dbmail/files/dbmail-lmtpd.initd
+++ b/net-mail/dbmail/files/dbmail-lmtpd.initd
@@ -1,11 +1,5 @@
-#!/sbin/openrc-run
+#!/sbin/runscript
#
-# chkconfig: - 91 35
-# description: Starts and stops dbmail-lmtpd
-#
-
-
-PROGRAM=dbmail-lmtpd
BIN_DIR=/usr/sbin
PID_DIR=/run/dbmail
@@ -18,51 +12,37 @@ CONFIG=/etc/dbmail/dbmail.conf
#extra_started_commands="reload"
depend() {
- need net
- # This won't cause a hard failure if neither is installed, however.
- use mysql
- use pgsql
- after mta
+ need net
+ use mysql
+ use pgsql
+ after mta
}
-initService() {
- # Avoid using root's TMPDIR
- unset TMPDIR
-
- # Check that config file exists.
- if [ ! -e $CONFIG ]; then
- eerror "Config file not found ($CONFIG)"
- eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
- return 1
- fi
-
- checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
-
- RETVAL=0
+checkconfig() {
+ if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
}
+
start() {
- initService
- ebegin "Starting DBMail LMTP daemon ($PROGRAM)"
- start-stop-daemon --start --quiet \
- --pidfile $PID_DIR/$PROGRAM.$PID \
- --exec $BIN_DIR/$PROGRAM \
- --name $PROGRAM \
- -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
- eend $?
-}
+ checkconfig && \
+ ebegin "Starting DBMail LMTP daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-lmtpd \
+ --name dbmail-lmtpd \
+ -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
+ eend $?
+}
stop() {
- ebegin "Stopping DBMail LMTP daemon ($PROGRAM)"
- start-stop-daemon --stop --quiet --retry 15 \
- --pidfile $PID_DIR/$PROGRAM.$PID
- eend $?
-}
+ ebegin "Stopping DBMail LMTP daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
-## not in 3.1.x yet
-#reload() {#
-# ebegin "Reloading DBMail LMTP daemon ($PROGRAM)"
-# start-stop-daemon --quiet --signal HUP \
-# --pidfile $PID_DIR/$PROGRAM.$PID
-# eend $?
-#}
diff --git a/net-mail/dbmail/files/dbmail-pop3d.initd b/net-mail/dbmail/files/dbmail-pop3d.initd
index 156c030be37b..16c4d371f2ec 100644
--- a/net-mail/dbmail/files/dbmail-pop3d.initd
+++ b/net-mail/dbmail/files/dbmail-pop3d.initd
@@ -1,11 +1,5 @@
-#!/sbin/openrc-run
+#!/sbin/runscript
#
-# chkconfig: - 91 35
-# description: Starts and stops dbmail-pop3d
-#
-
-
-PROGRAM=dbmail-pop3d
BIN_DIR=/usr/sbin
PID_DIR=/run/dbmail
@@ -18,51 +12,37 @@ CONFIG=/etc/dbmail/dbmail.conf
#extra_started_commands="reload"
depend() {
- need net
- # This won't cause a hard failure if neither is installed, however.
- use mysql
- use pgsql
- after mta
+ need net
+ use mysql
+ use pgsql
+ after mta
}
-initService() {
- # Avoid using root's TMPDIR
- unset TMPDIR
-
- # Check that config file exists.
- if [ ! -e $CONFIG ]; then
- eerror "Config file not found ($CONFIG)"
- eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
- return 1
- fi
-
- checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
-
- RETVAL=0
+checkconfig() {
+ if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
}
+
start() {
- initService
- ebegin "Starting DBMail POP3 daemon ($PROGRAM)"
- start-stop-daemon --start --quiet \
- --pidfile $PID_DIR/$PROGRAM.$PID \
- --exec $BIN_DIR/$PROGRAM \
- --name $PROGRAM \
- -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
- eend $?
-}
+ checkconfig && \
+ ebegin "Starting DBMail POP3 daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-pop3d \
+ --name dbmail-pop3d \
+ -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
+ eend $?
+}
stop() {
- ebegin "Stopping DBMail POP3 daemon ($PROGRAM)"
- start-stop-daemon --stop --quiet --retry 15 \
- --pidfile $PID_DIR/$PROGRAM.$PID
- eend $?
-}
+ ebegin "Stopping DBMail POP3 daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
-## not in 3.1.x yet
-#reload() {#
-# ebegin "Reloading DBMail POP3 daemon ($PROGRAM)"
-# start-stop-daemon --quiet --signal HUP \
-# --pidfile $PID_DIR/$PROGRAM.$PID
-# eend $?
-#}
diff --git a/net-mail/dbmail/files/dbmail-timsieved.initd b/net-mail/dbmail/files/dbmail-timsieved.initd
index c5402bdf876e..657bfd586663 100644
--- a/net-mail/dbmail/files/dbmail-timsieved.initd
+++ b/net-mail/dbmail/files/dbmail-timsieved.initd
@@ -1,10 +1,9 @@
-#!/sbin/openrc-run
+#!/sbin/runscript
#
# chkconfig: - 91 35
# description: Starts and stops dbmail-timsieved
#
-
PROGRAM=dbmail-timsieved
BIN_DIR=/usr/sbin
@@ -14,55 +13,39 @@ PID=pid
# Where is the dbmail.conf file located?
CONFIG=/etc/dbmail/dbmail.conf
-## not in 3.1.x yet
-#extra_started_commands="reload"
+PIDFILE="/run/dbmail-timsieved.pid"
depend() {
- need net
- # This won't cause a hard failure if neither is installed, however.
- use mysql
- use pgsql
- after mta
+ need net
+ use mysql
+ use pgsql
+ after mta
}
-initService() {
- # Avoid using root's TMPDIR
- unset TMPDIR
-
- # Check that config file exists.
- if [ ! -e $CONFIG ]; then
- eerror "Config file not found ($CONFIG)"
- eerror "An example config can be found in /etc/dbmail/dbmail.conf.dist"
- return 1
- fi
-
- checkpath -d $PID_DIR -m 750 -o dbmail:dbmail
-
- RETVAL=0
+checkconfig() {
+ if [ ! -e "/etc/dbmail/dbmail.conf" ]; then
+ eerror "You need to create apropriate config"
+ eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist"
+ return 1
+ fi
+ # Avoid using root's TMPDIR
+ unset TMPDIR
}
+
start() {
- initService
- ebegin "Starting DBMail SIEVE daemon ($PROGRAM)"
- start-stop-daemon --start --quiet \
- --pidfile $PID_DIR/$PROGRAM.$PID \
- --exec $BIN_DIR/$PROGRAM \
- --name $PROGRAM \
- -- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
- eend $?
-}
+ checkconfig && \
+ ebegin "Starting DBMail SIEVE daemon"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dbmail-timsieved \
+ -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1
+ eend $?
+}
stop() {
- ebegin "Stopping DBMail SIEVE daemon ($PROGRAM)"
- start-stop-daemon --stop --quiet --retry 15 \
- --pidfile $PID_DIR/$PROGRAM.$PID
- eend $?
-}
+ ebegin "Stopping DBMail SIEVE daemon"
+ start-stop-daemon --stop --quiet --retry 5 \
+ --pidfile ${PIDFILE}
+ eend $?
+}
-## not in 3.1.x yet
-#reload() {#
-# ebegin "Reloading DBMail SIEVE daemon ($PROGRAM)"
-# start-stop-daemon --quiet --signal HUP \
-# --pidfile $PID_DIR/$PROGRAM.$PID
-# eend $?
-#}