Mercurial > hgrepos > hgweb.cgi > s4
comparison s4-funcs.sh @ 988:e77d6258ad54 draft
Inhibit multiple To: headers.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 13 Oct 2022 07:49:22 +0859 |
parents | e71a86651d72 |
children | f0a62a22e33c |
comparison
equal
deleted
inserted
replaced
987:e71a86651d72 | 988:e77d6258ad54 |
---|---|
1342 # smail rcpts subj (file) | 1342 # smail rcpts subj (file) |
1343 # $SMAIL_TO <- Recipient value of To: header | 1343 # $SMAIL_TO <- Recipient value of To: header |
1344 # $MAIL_FROM <- From: header value | 1344 # $MAIL_FROM <- From: header value |
1345 from=`echo "${MAIL_FROM:-$admin}"|nkf -jM|tr : /|tr -d '\n'` | 1345 from=`echo "${MAIL_FROM:-$admin}"|nkf -jM|tr : /|tr -d '\n'` |
1346 rcpt=`echo $1|tr ' ' '\n'|sort -u|tr '\n' ' '` # uniq and strip newlines | 1346 rcpt=`echo $1|tr ' ' '\n'|sort -u|tr '\n' ' '` # uniq and strip newlines |
1347 rcptheader=`echo $1|tr ' ' '\n'|sort -u|sed '2,$s/^/To: /g'` | 1347 ## Gmail rejects below(Duplicated headers) |
1348 ##rcptheader=`echo $1|tr ' ' '\n'|sort -u|sed '2,$s/^/To: /g'` | |
1349 rcptheader="To: `echo $1|tr ' ' '\n'|sort -u|tr '\n' ','|sed 's/,$//'`" | |
1348 subj=`echo $2|nkf -jM|tr -d '\n'` | 1350 subj=`echo $2|nkf -jM|tr -d '\n'` |
1349 sender=${SENDER:-$admin} | 1351 sender=${SENDER:-$admin} |
1350 # Do not call m4 with directly passing text | 1352 # Do not call m4 with directly passing text |
1351 _r=$tmpd/rcpt | 1353 _r=$tmpd/rcpt |
1352 echo -n "${SMAIL_TO:-$rcptheader}" > $_r | 1354 echo -n "${SMAIL_TO:-$rcptheader}" > $_r |