Package list metche / be2f27d
Merge branch 'feature/2976-alternatives-to-mutt' intrigeri 11 years ago
2 changed file(s) with 29 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
101101 See the SECURITY section of metche(8).
102102 You might also be interested in Schleuder (http://schleuder.nadir.org/).
103103
104 10. Why am I receiving metche reports as attachments with
105 Content-Type: application/octet-stream?
106
107 You are probably using heirloom-mailx as /usr/bin/mail. That program's
108 charset conversion features depend on the current locale. You may
109 either switch to bsd-mailx or set the LOCALE variable in metche.conf to
110 something better suited than "C" to the charset(s) used in the Changelog
111 and other monitored files.
7070 fi
7171 }
7272
73 add_header() {
74 local subject="$1"
75 echo "Subject: $subject"
76 echo "To: $EMAIL_ADDRESS"
77 echo
78 cat
79 }
80
81 _mail() {
82 local subject="$1"
83 if which mutt > /dev/null ; then
84 LC_ALL="$LOCALE" mutt -s "$subject" "$EMAIL_ADDRESS"
85 elif which mail > /dev/null ; then
86 LC_ALL="$LOCALE" mail -s "$subject" "$EMAIL_ADDRESS"
87 elif [ -x /usr/sbin/sendmail ]; then
88 LC_ALL="$LOCALE" add_header "$subject"|/usr/sbin/sendmail "$EMAIL_ADDRESS"
89 fi
90 }
91
7392 email() {
7493 debug "* email $@ to $EMAIL_ADDRESS"
7594 local subject="`current_system` - $_MAIL_SUBJECT : $1"
7695 if [ $ENCRYPT_EMAIL = "yes" ]; then
7796 LC_ALL="$LOCALE" gpg --batch --armor --encrypt \
7897 --recipient "$EMAIL_ADDRESS" |
79 LC_ALL="$LOCALE" mutt -s "$subject" "$EMAIL_ADDRESS"
98 LC_ALL="$LOCALE" _mail "$subject"
8099 else
81 LC_ALL="$LOCALE" mutt -s "$subject" "$EMAIL_ADDRESS"
100 LC_ALL="$LOCALE" _mail "$subject"
82101 fi
83102 }
84103