Shibby FW 117 - Help Broken sendmail s_client

Discussion in 'Tomato Firmware' started by Sean Rhodes, Apr 29, 2014.

  1. Sean Rhodes

    Sean Rhodes Networkin' Nut Member

    Since updating to Shibby's latest version and installing entware, sendmail doesn't seem to work either.

    I just installed "tomato-E4200USB-NVRAM60K-1.28.RT-N5x-MIPSR2-117-Mega-VPN" and installed entware, but now my following script doesn't seem to work, but it's fine if I switch USB's and run optware instead.
    FROMNAME="Tomato Router"
    echo "Subject: Wan Connection Notification" >>/tmp/mail.txt
    echo "From: \"$FROMNAME\"<$SENDER>" >>/tmp/mail.txt
    echo "Date: `date -R`" >>/tmp/mail.txt
    echo "" >>/tmp/mail.txt
    echo "I just got connected to the internet." >>/tmp/mail.txt
    echo "" >>/tmp/mail.txt
    echo "My WAN IP is: `nvram get wan_ipaddr`" >>/tmp/mail.txt
    echo "Uptime is: `uptime | cut -d ',' -f1 | sed 's/^.\{12\}//g'`" >>/tmp/mail.txt
    echo "" >>/tmp/mail.txt
    echo "Access Restrictions In Effect: " >>/tmp/mail.txt
    echo "`nvram  show | egrep "^(rrule|rdev|rres)"`" >>/tmp/mail.txt
    echo "---- " >>/tmp/mail.txt
    echo "" >>/tmp/mail.txt
    echo "Your friendly router." >>/tmp/mail.txt
    echo "" >>/tmp/mail.txt
    cat /tmp/mail.txt | sendmail -H"exec openssl s_client -quiet \
    -CAfile "$CERT" \
    -connect "$SERVER:$PORT" -tls1 -starttls smtp" \
    -f"$SENDER" \
    rm /tmp/mail.txt
    Here is the error I get when I run my script:
    root@Tomato:/opt/scripts# sh
    openssl:Error: 's_client' is an invalid command.
    Standard commands
    enc            req            rsa            x509          
    Cipher commands (see the `enc' command for more details)
    aes-128-cbc    aes-128-ecb    aes-192-cbc    aes-192-ecb    aes-256-cbc   
    aes-256-ecb    bf-cbc         bf-ecb        
    sendmail: NOOP failed
    Can someone please advise?
  2. shibby20

    shibby20 Network Guru Member

    just read changelog

  3. Sean Rhodes

    Sean Rhodes Networkin' Nut Member

    Thanks Shibby, are there work arounds since I believe gmail has to have s_client?
  4. jerrm

    jerrm Network Guru Member

    Only workaround is to install entware or optware and use a full version of openssl, or another mail client (msmtp).
  5. Sean Rhodes

    Sean Rhodes Networkin' Nut Member

    Thanks Jerrm, I was looking at msmtp on the wlg500-repo, so I think I will give that a go.

    Just curious on the rationale of pulling things out of the builds, I understand to save some space, but it seems to me that it causes so many (unintended?) repercussions on other parts.
  6. jerrm

    jerrm Network Guru Member

    There was a pretty significant size savings when both version and speed were removed as some base "app support" code got to be removed completely. For the 4Mb builds this was a big deal. I find it regrettable for the 8MB+ builds.

    I'm of the opinion the 4MB builds should be on their own branch and only receive critical security updates, but that is extra work, and I'm not the one doing it. I will respectfully defer to the developers.

    I do hope once ARM is stable, it can be added to the new platform.
    darkknight93 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice