FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 11-28-2011, 02:35 PM
sunhux G
 
Default MUA / SMTP client / script to send email via a mail relay server

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.

I have the following Perl script which I wanted to use to mail (& attach
files) out to the outside but alas the Perl script below gave an error
that "Mime-Lite module is not available" on this server when I use it:
http://www.logix.cz/michal/devel/smtp-cli/

The tool above has a --host (or --server) option which would have enabled
me to point to the Postfix server to enable email to be sent out from this
RHES 4.6 box via the Postfix box.

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

b) is there another script (that uses say "telnet postfix_IP 25" & EHLO)
to do this function. Let me know the full url

c) where can I download this Mime-Lite rpm ?


Thanks

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-28-2011, 03:17 PM
David Bear
 
Default MUA / SMTP client / script to send email via a mail relay server

http://search.cpan.org/~rjbs/MIME-Lite-3.028/lib/MIME/Lite.pm

have you ever used cpan before?

On Mon, Nov 28, 2011 at 8:35 AM, sunhux G <sunhux@gmail.com> wrote:

> 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.
>
> I have the following Perl script which I wanted to use to mail (& attach
> files) out to the outside but alas the Perl script below gave an error
> that "Mime-Lite module is not available" on this server when I use it:
> http://www.logix.cz/michal/devel/smtp-cli/
>
> The tool above has a --host (or --server) option which would have enabled
> me to point to the Postfix server to enable email to be sent out from this
> RHES 4.6 box via the Postfix box.
>
> 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
>
> b) is there another script (that uses say "telnet postfix_IP 25" & EHLO)
> to do this function. Let me know the full url
>
> c) where can I download this Mime-Lite rpm ?
>
>
> Thanks
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
David Bear
College of Public Programs at ASU
602-496-0424
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-28-2011, 03:24 PM
Daniel Carrillo
 
Default MUA / SMTP client / script to send email via a mail relay server

2011/11/28 sunhux G <sunhux@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@yourdomain.com>'
echo 'RCPT TO: <someone@theirdomain.com>'
echo 'DATA'
echo -e 'To:someone@theirdomain.com
MIME-Version: 1.0
(mime-construct 1.9)
Content-Type:
application/octet-stream
Content-Transfer-Encoding: base64

'
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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-29-2011, 02:09 AM
sunhux G
 
Default MUA / SMTP client / script to send email via a mail relay server

Need to clarify on Daniel's script :
Understand Daniel has tested it but I got an issue with RCPT TO:


I login directly to the Postfix server & test it:
# telnet localhost 25
220 smtp.yy.zz ESMTP
helo me
250 servernm.yy.zz
MAIL FROM: <fromsms1@yy.zz>
250 Ok
RCPT TO: <mail@yy.zz>
550 <mail@yy.zz>: Recipient address rejected: User unknown in relay
recipient table
RCPT TO: <postfix@yy.zz>
550 <postfix@yy.zz>: Recipient address rejected: User unknown in relay
recipient table
DATA
554 Error: no valid recipients

How do I obtain a valid RCPT TO: address?


On Tue, Nov 29, 2011 at 12:24 AM, Daniel Carrillo
<daniel.carrillo@gmail.com> wrote:
>
> {
> * *echo 'helo me'
> * *echo 'MAIL FROM:<you@yourdomain.com>'
> * *echo 'RCPT TO: <someone@theirdomain.com>'
> * *echo 'DATA'
> * *echo -e 'To:someone@theirdomain.com
MIME-Version: 1.0
> (mime-construct 1.9)
Content-Type:
> application/octet-stream
Content-Transfer-Encoding: base64

'
> * *cat myattachment.bin | openssl base64
> * *echo '.'
> } | nc mail.20minutos.es 25
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-29-2011, 07:53 AM
Daniel Carrillo
 
Default MUA / SMTP client / script to send email via a mail relay server

2011/11/29 sunhux G <sunhux@gmail.com>:
> Need to clarify on Daniel's script :
> Understand Daniel has tested it but I got an issue with RCPT TO:
>
>
> I login directly to the Postfix server & test it:
> # telnet localhost 25
> 220 smtp.yy.zz ESMTP
> helo me
> 250 servernm.yy.zz
> MAIL FROM: <fromsms1@yy.zz>
> 250 Ok
> RCPT TO: <mail@yy.zz>
> 550 <mail@yy.zz>: Recipient address rejected: User unknown in relay
> recipient table

MTA is rejecting that user.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 11-29-2011, 02:32 PM
sunhux G
 
Default MUA / SMTP client / script to send email via a mail relay server

If I login directly to that Postfix server using that Unix id mail@yy.zz ,
I was able to use mutt to send out an email (& the email arrives at
the destination address which is my corporate email address).

I've tried using root login to that Postfix server & it could send mails
successfully using mutt as well but when root is used for 'RCPT TO: ',
it was rejected too.

What can I do next?

On Tue, Nov 29, 2011 at 4:53 PM, Daniel Carrillo
<daniel.carrillo@gmail.com> wrote:
> 2011/11/29 sunhux G <sunhux@gmail.com>:
>> Need to clarify on Daniel's script :
>> Understand Daniel has tested it but I got an issue with RCPT TO:
>>
>>
>> I login directly to the Postfix server & test it:
>> # telnet localhost 25
>> 220 smtp.yy.zz ESMTP
>> helo me
>> 250 servernm.yy.zz
>> MAIL FROM: <fromsms1@yy.zz>
>> 250 Ok
>> RCPT TO: <mail@yy.zz>
>> 550 <mail@yy.zz>: Recipient address rejected: User unknown in relay
>> recipient table
>
> MTA is rejecting that user.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 12-02-2011, 01:12 AM
"Cassius V. de Magalhaes"
 
Default MUA / SMTP client / script to send email via a mail relay server

2011/11/29 sunhux G <sunhux@gmail.com>

> If I login directly to that Postfix server using that Unix id mail@yy.zz ,
> I was able to use mutt to send out an email (& the email arrives at
> the destination address which is my corporate email address).
>
> I've tried using root login to that Postfix server & it could send mails
> successfully using mutt as well but when root is used for 'RCPT TO: ',
> it was rejected too.
>
> What can I do next?
>
> On Tue, Nov 29, 2011 at 4:53 PM, Daniel Carrillo
> <daniel.carrillo@gmail.com> wrote:
> > 2011/11/29 sunhux G <sunhux@gmail.com>:
> >> Need to clarify on Daniel's script :
> >> Understand Daniel has tested it but I got an issue with RCPT TO:
> >>
> >>
> >> I login directly to the Postfix server & test it:
> >> # telnet localhost 25
> >> 220 smtp.yy.zz ESMTP
> >> helo me
> >> 250 servernm.yy.zz
> >> MAIL FROM: <fromsms1@yy.zz>
> >> 250 Ok
> >> RCPT TO: <mail@yy.zz>
> >> 550 <mail@yy.zz>: Recipient address rejected: User unknown in relay
> >> recipient table
> >
> > MTA is rejecting that user.
>
>
Hello,

Two solutions:
1) The relay should permit outgoing e-mail from internal LAN (IP's)
(without authentication), but subject to spam by users;
2) If using LDAP or Database on the SMTP/IMAP/POP3 server for authenticate
users, then use this same LDAP or Database on the relay.

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

Thread Tools




All times are GMT. The time now is 08:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org