NSLU2-Linux
view · edit · print · history

If you want to send mail from the nslu2 containing a message, you can do it by using the smtpclient program. By piping in the message, give it the options of sender address, subject, and recipient and it will send the message:

echo "Hello, this is my message" | smtpclient -v -s "My Subject" -f root@mynslu2.mydomain.org mymail@recipientdomain.com

The -v shows you what it does. The -P option, point it to the (relaying) mailserver, doesn't work on this build. So it contacts the mailserver of the recipientdomain.com directly, if it can.

To mail a directory listing, just do:

ls -laR | smtpclient -v -s "My Subject" -f root@mynslu2.mydomain.org mymail@recipientdomain.com

The --help option gives more stuff:

Usage: smtp [options] recipients ...

Message Header Options:

  -s, --subject=STR      subject line of message
  -f, --from=ADDR        address of the sender
  -r, --reply-to=ADDR    address of the sender for replies
  -e, --errors-to=ADDR   address to send delivery errors to
  -c, --carbon-copy=ADDR address to send copy of message to

Processing Options:

  -S, --smtp-host=HOST   host where MTA can be contacted via SMTP
  -P, --smtp-port=NUM    port where MTA can be contacted via SMTP
  -M, --mime-encode      use MIME-style translation to quoted-printable
  -L, --use-syslog       log errors to syslog facility instead of stderr

Giving Feedback:

  -v, --verbose          enable verbose logging messages
  -V, --version          display version string
  -h, --help             display this page

But as I said not all options work in this build.

view · edit · print · history · Last edited by peecock41.
Originally by peecock41.
Page last modified on April 14, 2005, at 10:26 PM