summaryrefslogtreecommitdiff
path: root/sendmailadvanced
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-04 19:15:29 +0200
committerErich Eckner <git@eckner.net>2016-04-04 19:17:10 +0200
commit60f09a0e0478df7998248fec5b3e99a524f07d40 (patch)
tree3cb7d16095deaa1d310f507f079996b7ae981896 /sendmailadvanced
parenteb2364b08b86c28c8ed7afee6ba2c6a0d8824465 (diff)
downloadarchlinuxewe-60f09a0e0478df7998248fec5b3e99a524f07d40.tar.xz
aufgeräumt
Diffstat (limited to 'sendmailadvanced')
-rw-r--r--sendmailadvanced/sendmailadvanced49
-rw-r--r--sendmailadvanced/sendmailadvanced.conf38
2 files changed, 0 insertions, 87 deletions
diff --git a/sendmailadvanced/sendmailadvanced b/sendmailadvanced/sendmailadvanced
deleted file mode 100644
index 7b5e7fe54..000000000
--- a/sendmailadvanced/sendmailadvanced
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-MAILER="cantfind"
-
-for executable in sendmail msmtp
-do
- for prefix in /usr/bin /usr/sbin /bin /sbin
- do
- [ "${MAILER}" == "cantfind" ] && [ -x ${prefix}/${executable} ] && MAILER="${prefix}/${executable}"
- done
-done
-
-if [ "${MAILER}" == "cantfind" ]
-then
- >&2 echo "ERROR: Can't find suitable mailer."
- exit 1
-fi
-
-(
- . /etc/sendmailadvanced.conf
-
- tos=""
- while read s
- do
- echo "${s}"
- if [ "${s:0:3}" == "To:" ] || [ "${s:0:3}" == "Cc:" ]
- then
- tos="${tos} ${s:4}"
- fi
- if [ "${s:0:8}" == "Subject:" ]
- then
- break
- fi
- done
- hashcash -b ${hashcash_bits} -Xm ${tos}
- while read s
- do
- echo "${s}"
- if [ "${s}" == "" ]
- then
- break
- fi
- done
- (
- body_header_hook $@
- cat
- body_footer_hook $@
- ) | gpg -e -a -s -r ${gpg_recipient}
-) | ${MAILER} -t
diff --git a/sendmailadvanced/sendmailadvanced.conf b/sendmailadvanced/sendmailadvanced.conf
deleted file mode 100644
index 7b37bfcda..000000000
--- a/sendmailadvanced/sendmailadvanced.conf
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# configuration for sendmailadvanced
-
-# default recipient to encrypt to
-gpg_recipient="me@example.com"
-
-# stamp value
-hashcash_bits=22
-
-# things to put into head of (body of) email
-body_header_hook()
-{
- true
-}
-
-# things to put into foot of email
-body_footer_hook()
-{
- while [ $# -gt 0 ]
- do
- if [ "$1" == "-t" ]
- then
- true
- elif [ "$(whoami)" == "root" ] && [ "$1" == "-wb" ]
- then
- echo "----------------------- Last Backups Begin -------------------------"
- echo
- lastBackups
- echo
- echo "------------------------ Last Backups End --------------------------"
- echo
- else
- echo "Unknown option: '$1'"
- fi
- shift
- done
-}