Query on usage of busybox sendmail

sujith sankar sujithsankar2 at gmail.com
Sat Oct 17 15:52:20 UTC 2009


Hi Vladimir,

It worked when I used a file as input to sendmail.  The file contained
the following
___________________________
To: recepient at domain.com
<blank line>
my message
.
___________________________

The command that was used is
cat mail.txt | sendmail -S server -f sender at domain.com

Thanks a lot for guiding me towards it !!

Regards,
-Sujith

On Thu, Oct 15, 2009 at 5:47 PM, Vladimir Dronnikov <dronnikov at gmail.com> wrote:
>> sendmail is dumb, and should be fed with the whole message, i.e.
>> _headers_ and message body.
>>
>
> After establishing connection and successful HELO sendmail works as follows:
> 1) read input line
> 2) if line is empty (just \n alone) -> goto 5)
> 3) treat the line as a header: try to find recipients (To:, Cc:, Bcc:
> headers), or else just memorize the unknown header
> 4) goto 1)
> 5) append recipients specified on cmdline to those come from headers
> 6) dump accumulated headers, issue "DATA", dump the rest of input
>
> In your case there are no valid headers (the input line is just 'test
> message'), so sendmail just goes out of the loop straight to closing
> connection. I'm inclined to treat it as a bug.
>
> The simplest way to workaround is to imitate the headers, so try:
>
> # echo -e "\ntest message" | sendmail -S server -f reply-address recipient1 ...
>
> Please, confirm whether it works for you.
>
> I meanwhile will look what can be done to _not imitate headers_ for
> the simplest case we are inspecting.
>
> Regards,
> --
> Vladimir
>


More information about the busybox mailing list