From: rhatto Date: Sat, 6 Aug 2005 14:05:35 +0000 (+0000) Subject: substituido uso do nail por um smtp/wrapper no estilo do sendmail X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=2dd5990b8d52a37059cc0c10b7155d6f46bd5595;p=firma.git substituido uso do nail por um smtp/wrapper no estilo do sendmail --- diff --git a/firma b/firma index 5588c47..2688eea 100755 --- a/firma +++ b/firma @@ -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 {