From d2ce9d0893421cb35c62edad84bbadd1bf917d9e Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 20 May 2008 23:19:02 -0400 Subject: Added a simple sendmail-ish script to send to the ML Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 cron-jobs/devlist-mailer (limited to 'cron-jobs/devlist-mailer') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer new file mode 100755 index 0000000..b9a27e3 --- /dev/null +++ b/cron-jobs/devlist-mailer @@ -0,0 +1,16 @@ +#!/bin/bash +#Dummy helper to send email to arch-dev +# It does nothing if no output + +#LIST="arch-dev-public@archlinux.org" +LIST="aaronmgriffin@gmail.com" +FROM="cron@archlinux.org" + +stdin="$(cat)" +#echo used to strip whitespace for checking for actual data +if [ -n "$(echo $stdin)" ]; then + echo "Subject: Repository Maintenance $(date +"%d-%m-%Y %H:%M") + From: cron@archlinux.org + + $stdin" | /usr/sbin/sendmail -F$FROM "$LIST" +fi -- cgit v1.2.3-2-g168b From 3d287cbad91a35158444b49840ebfc3f86e6e59a Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 18 Jun 2008 18:07:08 -0400 Subject: Correct the devlist mailer script to send real emails Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cron-jobs/devlist-mailer') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index b9a27e3..094d60d 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -2,15 +2,16 @@ #Dummy helper to send email to arch-dev # It does nothing if no output -#LIST="arch-dev-public@archlinux.org" -LIST="aaronmgriffin@gmail.com" -FROM="cron@archlinux.org" +LIST="arch-dev-public@archlinux.org" +#LIST="aaronmgriffin@gmail.com" +FROM="repomaint" stdin="$(cat)" #echo used to strip whitespace for checking for actual data if [ -n "$(echo $stdin)" ]; then - echo "Subject: Repository Maintenance $(date +"%d-%m-%Y %H:%M") - From: cron@archlinux.org - $stdin" | /usr/sbin/sendmail -F$FROM "$LIST" +echo "Subject: Repository Maintenance $(date +"%d-%m-%Y %H:%M") + +$stdin" | /usr/sbin/sendmail -F$FROM "$LIST" + fi -- cgit v1.2.3-2-g168b From 547b245147b7d44930df46f553067864339f9c43 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 20 Jun 2008 15:19:52 -0400 Subject: Corrections to the devlist-mailer script * Add configurable subject * Add To: and From: headers Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'cron-jobs/devlist-mailer') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index 094d60d..b24d530 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -4,13 +4,20 @@ LIST="arch-dev-public@archlinux.org" #LIST="aaronmgriffin@gmail.com" -FROM="repomaint" +FROM="repomaint@archlinux.org" + +SUBJECT="Repository Maintenance $(date +"%d-%m-%Y %H:%M")" +if [ $# -eq 1 ]; then + SUBJECT="$1" +fi stdin="$(cat)" #echo used to strip whitespace for checking for actual data if [ -n "$(echo $stdin)" ]; then -echo "Subject: Repository Maintenance $(date +"%d-%m-%Y %H:%M") +echo "Subject: $SUBJECT +To: $LIST +From: $FROM $stdin" | /usr/sbin/sendmail -F$FROM "$LIST" -- cgit v1.2.3-2-g168b From 81efd3d8cd39d07930b18dcd8f904153500bfbf3 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 29 Dec 2008 13:30:00 -0800 Subject: Allow devlist-mailer to send to alternate addresses Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cron-jobs/devlist-mailer') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index b24d530..671cbbb 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -7,8 +7,12 @@ LIST="arch-dev-public@archlinux.org" FROM="repomaint@archlinux.org" SUBJECT="Repository Maintenance $(date +"%d-%m-%Y %H:%M")" -if [ $# -eq 1 ]; then - SUBJECT="$1" +if [ $# -ge 1 ]; then + SUBJECT="$1 $(date +"%d-%m-%Y %H:%M")" +fi + +if [ $# -ge 2 ]; then + LIST="$2" fi stdin="$(cat)" -- cgit v1.2.3-2-g168b From 5f64e9993a494040b0280ed0f1daa38f68f9c46b Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 14 Jan 2009 13:31:11 -0800 Subject: Remove HH:MM from devlist-mailer subject lines This was extraneous info. Not needed as higher granularity can be gleaned from the mail's date Signed-off-by: Aaron Griffin --- cron-jobs/devlist-mailer | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cron-jobs/devlist-mailer') diff --git a/cron-jobs/devlist-mailer b/cron-jobs/devlist-mailer index 671cbbb..ca2e46b 100755 --- a/cron-jobs/devlist-mailer +++ b/cron-jobs/devlist-mailer @@ -6,9 +6,9 @@ LIST="arch-dev-public@archlinux.org" #LIST="aaronmgriffin@gmail.com" FROM="repomaint@archlinux.org" -SUBJECT="Repository Maintenance $(date +"%d-%m-%Y %H:%M")" +SUBJECT="Repository Maintenance $(date +"%d-%m-%Y")" if [ $# -ge 1 ]; then - SUBJECT="$1 $(date +"%d-%m-%Y %H:%M")" + SUBJECT="$1 $(date +"%d-%m-%Y")" fi if [ $# -ge 2 ]; then -- cgit v1.2.3-2-g168b