specify SMTP relay server in mutt

James Jones jrjones at alaska.edu
Wed Jul 16 15:22:16 UTC 2014


It been about 20 years since I have used it but you may want to look at
expect.  It is a scripting tool that I used in a project to pull off
statistics from cisco equipment and store in a file years ago.  It may
solve your problem.

jim


On Tue, Jul 15, 2014 at 6:00 PM, Sunhux G <sunhux at gmail.com> wrote:

> Thanks Fred.
>
> Sendmail was listed by our audit as a non-secure
> service.  Must sendmail be started or is there any
> other alternative to send email?
>
> Think in Windows environment, blat & sendemail
> doesn't require an equivalent service to work so
> if there is some other ways of sending email, will
> be great, say using telnet:
>
> (does anyone has a script that could read in the
>  content of a text file, ie line 1-3 below & then
>  perform the steps below) :
>
> # telnet SMTP_Relay_IP 25
> HELO
> 501 Syntax: HELO hostname
> HELO smtp.mypostfixdomain.com
> 250 hostname.mypostfixdomain.com
> MAIL FROM:<sender_id at external_domain.com.sg>
> 250 2.1.0 Ok
> HELO smtp.mypostfixdomain.com
> 250 hostname.mypostfixdomain.com
> MAIL FROM:<sender_id at external_domain.com.sg>
> 250 2.1.0 Ok
> RCPT TO:<recipient_id at mypostfixdomain.com>
> 250 2.1.5 Ok
>
> RCPT TO:<root at mypostfixdomain.com>
> 250 2.1.5 Ok
> DATA
> 354 End data with <CR><LF>.<CR><LF>
> line 1
> line 2
> line 3
> *.*
> 250 2.0.0 Ok: queued as BAF8A200034
>
>
> On Wed, Jul 16, 2014 at 12:58 AM, Fred Smith <
> fredex at fcshome.stoneham.ma.us>
> wrote:
>
> > On Wed, Jul 16, 2014 at 12:35:19AM +0800, Sunhux G wrote:
> > > I have got the firewall rule permitted from our RHEL 5.x &
> > > RHEL 6.x servers to our SMTP relay server (it's running
> > > RHEL 5.8).
> > >
> > > In the past, I recall I have a server that I could just issue
> > > mutt command below & it will send email out via that
> > > relay server :
> > > mutt -s "Test mail" -a /tmp/file.tar.gz abcde at nixcraft.co.in <
> > > /tmp/mailmessage.txt
> > >
> > >
> > > Now all my servers (at another site) can't send email out.
> > > Did I need to set something at this site's server or is
> > > there any way that I could specify the SMTP relay server
> > > in the mutt command?  In Windows, blat & sendemail
> > > allows me to specify the SMTP relay server.
> >
> > Assuming you've got sendmail installed, and are using the default
> > sendmail.cf,
> > become root, then:
> >
> > cd /etc/mail
> > vi sendmail.cf
> >
> > search for a line beginning with "DS", with a comment above it reading:
> >         "Smart" relay host (may be null)
> > and change the line that reads just "DS" to read "DSyoursmarthost.foo"
> > or whatever the FQDN is of your smart relay host. there is NOT a space
> > between the "DS" and the FQDN.
> >
> > you'll probably need to restart the sendmail service afterward.
> >
> > --
> > ---- Fred Smith -- fredex at fcshome.stoneham.ma.us
> > -----------------------------
> >                Show me your ways, O LORD, teach me your paths;
> >                      Guide me in your truth and teach me,
> >                          for you are God my Savior,
> >                     And my hope is in you all day long.
> > -------------------------- Psalm 25:4-5 (NIV)
> > --------------------------------
> >
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



-- 
James R. Jones
Manager of Campus Operations
UAF-BBC
PO Box 1070
Dillingham, AK 99576
907-842-8312



More information about the redhat-list mailing list