s4

changeset 988:e77d6258ad54

Inhibit multiple To: headers.
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 13 Oct 2022 07:49:22 +0859
parents e71a86651d72
children 964a99fe2fb1
files s4-funcs.sh
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Sun Jul 31 15:26:18 2022 +0900
     1.2 +++ b/s4-funcs.sh	Thu Oct 13 07:49:22 2022 +0859
     1.3 @@ -1344,7 +1344,9 @@
     1.4    # $MAIL_FROM <- From: header value
     1.5    from=`echo "${MAIL_FROM:-$admin}"|nkf -jM|tr : /|tr -d '\n'`
     1.6    rcpt=`echo $1|tr ' ' '\n'|sort -u|tr '\n' ' '` # uniq and strip newlines
     1.7 -  rcptheader=`echo $1|tr ' ' '\n'|sort -u|sed '2,$s/^/To: /g'`
     1.8 +  ## Gmail rejects below(Duplicated headers)
     1.9 +  ##rcptheader=`echo $1|tr ' ' '\n'|sort -u|sed '2,$s/^/To: /g'`
    1.10 +  rcptheader="To: `echo $1|tr ' ' '\n'|sort -u|tr '\n' ','|sed 's/,$//'`"
    1.11    subj=`echo $2|nkf -jM|tr -d '\n'`
    1.12    sender=${SENDER:-$admin}
    1.13    # Do not call m4 with directly passing text