Re: MUA / SMTP client / script to send email via a mail relay server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/11/28 sunhux G <sunhux@xxxxxxxxx>:
> 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@xxxxxxxxxxxxxx>'
    echo 'RCPT TO: <someone@xxxxxxxxxxxxxxx>'
    echo 'DATA'
    echo -e 'To:someone@xxxxxxxxxxxxxxx\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 ?

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux