send email from command line
Eric Maquiling
emaquili at gmail.com
Tue Sep 23 22:55:32 UTC 2008
On Tue, Sep 23, 2008 at 04:46:14PM -0600, Karl Larsen wrote:
[...]
>it should send that, but I think it is trying to get sendmail to send it
>and mine is not set up. There should be a way to set the SMTP to be the
>one we pay for. Does anyone do this or know how? I have these files:
[...]
:/ Confused
You want to send mail outside of your company to an outside email? In PINE,
you can define your SMTP relay.
If you want to send mail via the CL, (mail prez at whitehouse.gov < mytaxes), then
you need to set up relay in /etc/sendmail.cf
Lots of documentation on how to edit sendmil.mc but if you want quick and dirty
test it go to the /etc/mail/sendmail.cf:
Line # 116 (in my Ubuntu distro)
or it'll say: # "Smart" relay host (may be null)
Add
DSthesmptrelay_of_your_ISP_PROVIDER
restart sendmail
This is what mine looks like:
# "Smart" relay host (may be null)
DSsmtp.west.cox.net
The do 'mail -s "test" someonereal at gmail.com < /etc/profile'
and then
tail -f /var/log/mail.log
Should look like this:
Sep 23 15:38:05 ubuntu-1 sm-mta[18506]: m8NMc59p018504:
to=<someonereal at gmail.com>,
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120702,
relay=smtp.west.cox.net. [68.6.19.4], dsn=2.0.0, stat=Sent
(JNfm1a00H0qDha004NfnpV mail accepted for delivery)
--
em
More information about the ubuntu-users
mailing list