From: short <> Date: Tue, 10 Jul 2001 18:26:56 +0000 (+0000) Subject: RFC822 sendmail communication, +err FROM address, "version 1.1" X-Git-Tag: rh71~70 X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=2c3808916eabc9022d77392f15e9dc420c9a5e01 RFC822 sendmail communication, +err FROM address, "version 1.1" --- diff --git a/bin/smsnf b/bin/smsnf index f872edb..28123f8 100755 --- a/bin/smsnf +++ b/bin/smsnf @@ -1,7 +1,7 @@ #!/bin/sh -#num=431329 -#addr="http://sms.paegas.cz/wwwsms/index.phtml" -maxlen=310 #316 +maxlen=200 +mailfrom=short+err@ucw.cz +rcptto=jan.kratochvil@sms.paegas.cz t=/tmp/smsnf.$$ head -qc 4k >$t @@ -19,8 +19,13 @@ tail +$hd $t|sed -n \ |sed 's/^ *\([^ ].*\)/\1/'|sed 's/\(.*[^ ]\) *$/\1/') \ |head -c $maxlen >$t.2 -#(echo -n "num=$num&text=" -#urlencode <$t.2 -#echo -e "\n---")|lynx -post_data $addr >/dev/null #>>~/Mail/smsn.out -(echo -e "From: @.\n";cat $t.2)|/usr/sbin/sendmail jan.kratochvil@sms.paegas.cz +(echo -n "EHLO ";hostname -f;echo "\ +ONEX +MAIL FROM: $mailfrom +RCPT TO: $rcptto +DATA +From: @. +To: $rcptto +X-SMSNF-Notice: Generated by SMSNF, contact Jan Kratochvil when problems occur. +";grep -v '^\.$' <$t.2;echo -e "\n.")|/usr/sbin/sendmail -bs &>/dev/null rm -f $t $t.2