1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Compiling mail progs for Tomato

Discussion in 'Tomato Firmware' started by mstombs, Nov 14, 2007.

  1. mstombs

    mstombs Network Guru Member

    Hi,

    I have been looking at small send mail progs to use from scripts Tomato (/var or /jffs initiially). The smtp protocol is so simple it can be done with command line telnet, but not on the router with a bash script only I have tried!

    I can build and run versions of smtpclient and mini_sendmail, but haven't got either to send mail yet - issue to do with handling hostname of mail server. Plus these don't seem to handle usernames/password protected servers etc.

    I can send mail from the router with a 100k build of msmpt, but haven't got the tls/ssl bit to work yet (needed for gmail), and this prog doesn't seem to handle attachments directly.

    I came across a small mail program smtpstoat http://www.drydeadfish.co.uk/junk/smtpstoat/index.php
    that has username/passwords - not secure - but handles attachments nicely.

    Code:
    use: smtpstoat [-options]
    
    Where options include:
    
      --help                                   print out this message
      --version                                print out the build
      --config                                 print out config file requirements
     -w <working directory>                    working directory
     -t "<to address>[, <to addressN>]"        To address list
     -f <from address>                         From address
     -s "<subject text>"                       Subject text
     -S <SMTP server>                          name/IP address of SMTP server
     -P <SMTP port>                            SMTP port (default 25)
     -c <configuration file>                   configuration file
     -r <raw message file>                     raw e-mail file
     -m "<message text>"                       message body text
     -M <message file>                         text file for message body
     -h <domain>                               helo domain (default localhost)
     -A <username:pass>                        SMTP auth user/pass
     -a <attachment> [<attachmentN>]           attachments to send
     -v                                        enable verbose mode
    This configures/ builds and runs fine on my linux PC - but I haven't made much progress in building for the router because it is written in cpp not c.

    Everything else on the router seems to be c, so does this mean no chance to build a small binary? Can anyone point me to a cpp build script that works with the Linksys/ Broadcom/ Tomato toolchain? I've seen OpenWrt examples - but not easy to see how to convert for use!
     

Share This Page