----- Original Message ----- 
From: "Kristian Kielhofner" <[EMAIL PROTECTED]>
Sent: Thursday, July 27, 2006 11:08 PM

> Mark Phillips wrote:
>> And what about VM to email?
>
> Mark,
>
> I sitll have not been able to fix msmtp.  ssmtp looks to be COMPLETELY
> abandoned and I don't feel comfortable using it.  Is anyone able to take
> a look at fixing msmtp?

FWIW, a while ago I managed to send out voicemails on OpenWRT by combining 
YABSMC (Yet Another Broken SMTP Mail Client), mini_sendmail v1.3.5, and a 
bash / ash script crafted by myself to work around the bugs of the former. 
The sources for mini_sendmail 1.3.5 can be found e.g. at 
http://bent.latency.net/bent/darcs/mini_sendmail-1.3.5/ , and I'm attaching 
my wrapper script below, just in case it may be useful to someone (at least 
as a stopgap solution).

Cheers --

Enzo

#!/bin/sh
# this script tries to fix two bugs in mini_sendmail 1.3.5:
# 1. The broken parsing of recipient addresses when "-t" is used
# 2. The habit of appending the hostname to the envelope sender if none is 
specified
# It also add the specified mail relay, so that this script may be named
# /usr/sbin/sendmail and used like the "real thing".
#
SMTPRELAY=192.168.0.128
BROKENMAILER=/usr/sbin/mini_sendmail
#
# ---- NO CONFIGURABLE PARAMETERS BELOW THIS LINE ----
#
IFS=' ' # only space in IFS
# save the message from stdin to a temp file, and its headers only to 
another
TEMPH=/tmp/xxxTMP.$$.h
TEMPM=/tmp/xxxTMP.$$.m
HEADERS=true
while read LINE; do {
 if [ -z "$LINE" ]; then HEADERS=false; fi
 if $HEADERS ; then
  echo "$LINE" >>$TEMPH
 fi
 echo "$LINE" >>$TEMPM
} done

# Now scan the positional parameters rotating them left...
HAS_T=false
HAS_F=false
for ARG in $@ ; do
 shift
 OPT=$(echo $ARG|cut -c 1-2)
 if [ _$OPT = '_-f' ] ; then
   HAS_F=true
   # if there is no '@', append one
   if [ $(expr "$ARG" : '[EMAIL PROTECTED]@') = "0" ] ; then
     ARG=${ARG}\@
   fi
 elif [ "_$ARG" = '_-t' ] ; then
   # there is a '-t' parameter, zap it but remember to emulate it later
   ARG=""
   HAS_T=true
 fi
 # re-append the scanned param to the end of the list
 set -- $@ "$ARG"
 #echo "reappending $ARG - new list: $@"
done

if $HAS_T ; then
 # extract recipients from headers
 set -- $@ $(egrep '(^To:|^Cc:|^Bcc:)' $TEMPH|tr '[,<> ]' '\n' \
 |grep '@'|tr '\n' ' ')
fi

if ! $HAS_F ; then
 # add a synthetic "-fuser@" to pre-empt the broken mailer
 set -- "-f${LOGNAME}@" $@
fi

$BROKENMAILER -s$SMTPRELAY  $@ <$TEMPM
rm $TEMPH $TEMPM


_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to