how to use sendmail in 1.14.2
Denys Vlasenko
vda.linux at googlemail.com
Sun Jul 5 19:46:57 UTC 2009
On Tuesday 23 June 2009 10:22, Vladimir Dronnikov wrote:
> > What I use before is
> > Sendmail -w 3 -U test -P 111111 -s "test" myserver test at myserver.com mailmessage -t somebody at somewhere.com
> >
> > Could you kindly help convert this into the latest format?
> >
>
> I suppose "mailmessage" is the file you send as attachment, right?
> Attachment processing (along with any additional headers, like
> subject) is now moved to "makemime" applet.
>
> So, try:
>
> $ makemime -a "Subject: test" mailmessage | sendmail -w3 -autest
> -ap111111 -S myserver -f test at myserver.com -t somebody at somewhere.com
Hmm. Considering this, makemime help is inadequate:
Usage: makemime [OPTIONS] [FILE]...
Create MIME-encoded message
Options:
-C Charset
-e Transfer encoding. Ignored. base64 is assumed
Other options are silently ignored.
I am changing it to this:
Usage: makemime [OPTIONS] [FILE]...
Create multipart MIME-encoded message from FILEs.
Options:
-o FILE Output. Default: stdout
-a HDR Add header. Examples:
"From: user at host.org", "Date: `date -R`"
-c CT Content type. Default: text/plain
-C CS Charset. Default: us-ascii
Other options are silently ignored
Then, sendmail help needs to be more clear what "rcpt" is
and where it takes the input from. Like this:
Usage: sendmail [OPTIONS] [RECIPIENT_EMAIL]...
Read email from stdin and send it
Standard options:
-t Read additional recipients from message body
-f sender Sender (required)
-o options Various options. -oi implied, others are ignored
Busybox specific options:
-w seconds Network timeout
-H 'PROG ARGS' Run connection helper
Examples:
-H 'exec openssl s_client -quiet -tls1 -starttls smtp
-connect smtp.gmail.com:25' <email.txt
[4<username_and_passwd.txt | -au<username> -ap<password>]
-H 'exec openssl s_client -quiet -tls1
-connect smtp.gmail.com:465' <email.txt
[4<username_and_passwd.txt | -au<username> -ap<password>]
-S server[:port] Server
-au<username> Username for AUTH LOGIN
-ap<password> Password for AUTH LOGIN
-am<method> Authentication method. Ignored. LOGIN is implied
Other options are silently ignored; -oi -t is implied
Use makemime applet to create message with attachments
It can be improved further. What is "sender" format? Is it an email (user at host)?
Can we specify "null sender" (IIRC RFC822 has something like that)? How?
--
vda
More information about the busybox
mailing list