MUA / SMTP client / script to send email via a mail relay server
Daniel Carrillo
daniel.carrillo at gmail.com
Mon Nov 28 16:24:39 UTC 2011
2011/11/28 sunhux G <sunhux at gmail.com>:
> I have a Linux RHES 4.5 box that's on the same subnet as my Postfix
> box. For security reasons, I'm not allowed to ftp/scp/sftp files between
> this box & the Postfix server.
> It will take weeks for Change Managemt to approve installing Mime-Lite
> module, so I'll need help on the following :
>
> a) is there an MUA (mailx, mutt, sendmail) that would enable me to
> perform this same function of pointing to the Postfix server & attach
> a file to be mailed out? Kindly provide the full syntax/example
Surely yes.
> b) is there another script (that uses say "telnet postfix_IP 25" & EHLO)
> to do this function. Let me know the full url
I'm pretty sure that you could do the same with perl/python/php, but
something like this should work:
{
echo 'helo me'
echo 'MAIL FROM:<you at yourdomain.com>'
echo 'RCPT TO: <someone at theirdomain.com>'
echo 'DATA'
echo -e 'To:someone at theirdomain.com\nMIME-Version: 1.0
(mime-construct 1.9)\nContent-Type:
application/octet-stream\nContent-Transfer-Encoding: base64\n\n'
cat myattachment.bin | openssl base64
echo '.'
} | nc mail.20minutos.es 25
I tested it and it works, the attachment has no name, but you could
improve the script to be polite.
BTW, what about CPAN ?
More information about the redhat-list
mailing list