diff options
author | rhatto <rhatto> | 2005-08-06 14:05:35 +0000 |
---|---|---|
committer | rhatto <rhatto> | 2005-08-06 14:05:35 +0000 |
commit | 2dd5990b8d52a37059cc0c10b7155d6f46bd5595 (patch) | |
tree | 0c2cbc4b52e7a95ed20af13504d9e2aa46a7479b | |
parent | 780de1e372fe0a38869fe1057a6441f9b0ebb08e (diff) | |
download | firma-2dd5990b8d52a37059cc0c10b7155d6f46bd5595.tar.gz firma-2dd5990b8d52a37059cc0c10b7155d6f46bd5595.tar.bz2 |
substituido uso do nail por um smtp/wrapper no estilo do sendmail
-rwxr-xr-x | firma | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -6,7 +6,8 @@ # list configuration is passed thru the config file, # where you put PARAMETER=value (whithout spaces) # -# MAIL= path for mail program +# MAIL= path for smtp/wrapper binary (sendmail-like) +# MAIL_ARGS= smtp options (-oem -oi -t) # GPG= path for gnupg binary # LISTNAME= list email # LISTADMIN= list administrator email addresses (space separated) @@ -42,7 +43,6 @@ function version { echo "for more details." } - function check_config { # check configuration file parameters if [ ! -f $GPG -o ! -x $GPG ]; then @@ -136,6 +136,10 @@ function message_list { # $1: subscriber email # sorry no identation :P echo "$PASSWD +From: $LISTNAME +To: $1 +Subject: none + Message from: $FROM Subject: $SUBJECT $DATE @@ -143,13 +147,17 @@ $DATE $(get_gpg_stderr | grep -F 'gpg: Signature made') $(get_gpg_stderr | grep -F 'gpg: Good signature from') -$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL -r $LISTNAME $1 +$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL $MAIL_ARGS } function message_list_error { # compose and send an error message # sorry no identation :P echo "$PASSWD +From: $LISTNAME +To: $1 +Subject: none + Message from: $FROM Subject: [BAD SIGNATURE] $SUBJECT $DATE @@ -157,7 +165,7 @@ $DATE $(get_gpg_stderr | grep -F 'gpg: Signature made') $(get_gpg_stderr | grep -F 'gpg: BAD signature from') -$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL -r $LISTNAME $1 +$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL $MAIL_ARGS } function message_list_return { @@ -165,6 +173,10 @@ function message_list_return { # $1: sender email (usually $FROMADD) # sorry no identation :P echo " +From: $LISTNAME +To: $1 +Subject: none + Message from: $FROM Subject: [RETURNED MAIL] $SUBJECT $DATE @@ -175,7 +187,7 @@ $DATE you have any questions. ] -- - firma v$VERSION" | $MAIL -r $LISTNAME $1 + firma v$VERSION" | $MAIL $MAIL_ARGS } function process_message { |