Blaise Lab wrote:
> 
> Hello,
> 
> I tried the command :
> mnc host 25
> HELO
> MAIL FROM:[EMAIL PROTECTED]
> RCPT TO:[EMAIL PROTECTED]
> DATA
> blabla
> .
> QUIT
> 
> And it worked fine ! And now I would to make a script with these commands...
> I wrote that script but it doesn't work...
> 
> #!/bin/ash
> mnc 192.168.100.4 25
> HELO
> MAIL FROM:[EMAIL PROTECTED]
> RCPT TO:[EMAIL PROTECTED]
> DATA
> blabla
> 
> .
> QUIT
> 
> Thank you for your help...

Try piping it to the server:

#!/bin/sh
echo "mail from: [EMAIL PROTECTED] > /tmp/tmplogs
echo "rcpt to: [EMAIL PROTECTED] >> /tmp/tmplogs
echo "data" >> /tmp/tmplogs
cat /var/log/messages >> /tmp/tmplogs
echo "." >> /tmp/tmplogs
echo "quit" >> /tmp/tmplogs
cat /tmp/tmplogs | mnc host 25
rm -f /tmp/tmplogs

This works on EigerStein2B and Dachstein, with Dachstein replace the mnc
command with nc...don't know about /bin/ash you're using, try using
/bin/sh at the beginning of the script, instead. Just quick and dirty!
:)

-- 
Patrick Benson
Stockholm, Sweden

_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to