From 61620db0f917bc5ad79f17d928b80d739747fcf5 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 8 Jan 2015 20:53:08 -0400 Subject: log to syslog. Closes: #6307 --- pkg/leap_mx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/leap_mx b/pkg/leap_mx index da8a3c8..c08adb0 100644 --- a/pkg/leap_mx +++ b/pkg/leap_mx @@ -21,7 +21,8 @@ case "$1" in --pidfile=$pidfile \ --rundir=$rundir \ --python=$file \ - --logfile=$logfile + --logfile=$logfile \ + --syslog echo "." ;; -- cgit v1.2.3 From deeaa37a64b842ae6a6f05b8748c536df72468ba Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 12 Jan 2015 11:58:52 -0500 Subject: add --prefix argument to get distinguishable syslog messages --- pkg/leap_mx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/leap_mx b/pkg/leap_mx index c08adb0..a5c7438 100644 --- a/pkg/leap_mx +++ b/pkg/leap_mx @@ -22,7 +22,7 @@ case "$1" in --rundir=$rundir \ --python=$file \ --logfile=$logfile \ - --syslog + --syslog --prefix=leap-mx echo "." ;; -- cgit v1.2.3 From 937227d7c84de2cafe968525e6f889ddf102062f Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 12 Jan 2015 12:40:44 -0500 Subject: sync initscript with debian version --- pkg/leap_mx | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'pkg') diff --git a/pkg/leap_mx b/pkg/leap_mx index a5c7438..60dddc4 100644 --- a/pkg/leap_mx +++ b/pkg/leap_mx @@ -1,14 +1,25 @@ #!/bin/sh +### BEGIN INIT INFO +# Provides: leap-mx +# Required-Start: $network $named $remote_fs $syslog $time +# Required-Stop: $network $named $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start leap-mx daemon at boot time +# Description: transparently-encrypting remailer +### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin - -pidfile=/var/run/leap_mx.pid \ -rundir=/var/lib/leap_mx/ \ -file=/usr/local/bin/mx.tac \ -logfile=/var/log/leap_mx.log +PIDFILE=/var/run/leap_mx.pid +RUNDIR=/var/lib/leap_mx/ +FILE=/usr/share/app/leap_mx.tac +LOGFILE=/var/log/leap_mx.log +TWISTD_PATH=/usr/bin/twistd [ -r /etc/default/leap_mx ] && . /etc/default/leap_mx +. /lib/lsb/init-functions + test -r $file || exit 0 test -r /etc/leap/ || exit 0 @@ -17,11 +28,11 @@ case "$1" in start) echo -n "Starting leap_mx: twistd" HOME="/var/lib/leap_mx/" \ - start-stop-daemon --start --quiet --exec /usr/local/bin/twistd -- \ - --pidfile=$pidfile \ - --rundir=$rundir \ - --python=$file \ - --logfile=$logfile \ + start-stop-daemon --start --quiet --exec $TWISTD_PATH -- \ + --pidfile=$PIDFILE \ + --rundir=$RUNDIR \ + --python=$FILE \ + --logfile=$LOGFILE \ --syslog --prefix=leap-mx echo "." ;; @@ -29,7 +40,7 @@ case "$1" in stop) echo -n "Stopping leap_mx: twistd" start-stop-daemon --stop --quiet \ - --pidfile $pidfile + --pidfile $PIDFILE echo "." ;; @@ -42,8 +53,12 @@ case "$1" in $0 restart ;; + status) + status_of_proc -p $PIDFILE $TWISTD_PATH leap_mx && exit 0 || exit $? + ;; + *) - echo "Usage: /etc/init.d/leap_mx {start|stop|restart|force-reload}" >&2 + echo "Usage: /etc/init.d/leap_mx {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac -- cgit v1.2.3 From 057de70291aee0eaedb8f8318dd1132e960e7e97 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 15 Apr 2015 13:57:05 -0300 Subject: [bug] change default bounce message sender address This commit changes the bounce message sender address to be MAILER-DAEMON@domain, instead of bounce@domain. Related: #6858. --- pkg/mx.tac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/mx.tac b/pkg/mx.tac index 75d2405..48b9ef9 100755 --- a/pkg/mx.tac +++ b/pkg/mx.tac @@ -46,7 +46,7 @@ password = config.get("couchdb", "password") server = config.get("couchdb", "server") port = config.get("couchdb", "port") -bounce_from = "bounce" +bounce_from = "MAILER-DAEMON" bounce_subject = "Delivery failure" try: -- cgit v1.2.3 From 3353e2bccb2625ae06472721cfbb8cf53144a255 Mon Sep 17 00:00:00 2001 From: drebs Date: Wed, 15 Apr 2015 14:49:56 -0300 Subject: [bug] implement message bouncing according to RFCs If we do not adhere to the standads, we may have a lot of problems when bouncing a message. This commit implements a bounce message according to: * RFC 6522 - The Multipart/Report Media Type for the Reporting of Mail System Administrative Messages * RFC 3834 - Do not bounce for unknown or invalid addresses. * RFC 3464 - An Extensible Message Format for Delivery Status Notification. Closes: #6858. --- pkg/mx.tac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/mx.tac b/pkg/mx.tac index 48b9ef9..7da59cf 100755 --- a/pkg/mx.tac +++ b/pkg/mx.tac @@ -46,8 +46,8 @@ password = config.get("couchdb", "password") server = config.get("couchdb", "server") port = config.get("couchdb", "port") -bounce_from = "MAILER-DAEMON" -bounce_subject = "Delivery failure" +bounce_from = "Mail Delivery Subsystem " +bounce_subject = "Undelivered Mail Returned to Sender" try: bounce_from = config.get("bounce", "from") -- cgit v1.2.3