send email from command line
Neil Cherry
ncherry at linuxha.com
Wed Sep 24 18:02:54 UTC 2008
Karl Larsen wrote:
> Eric Maquiling wrote:
>> 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)
>>
>>
> Alas Hardy has Exim and your detailed help does not work. I wonder
> why people decide to fix sendmail and then just make a confused MESS
> more confusing!
Because email is not as simple as you think it is. Remember that
the email service dates back to the days before the WWW. Back then
it was not unusual to see rutgers.edu!ncherry at diane.uucp or even
worse a mixed bitnet address ( uucpnode!user%node.bitnet at node.internet )
While I doubt many are using the older addressing schemes they are
still supported and if you know what you're doing you can have a
lot of fund with sending mail (that's a sarcastic 'fun').
--
Linux Home Automation Neil Cherry ncherry at linuxha.com
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
Author of: Linux Smart Homes For Dummies
More information about the ubuntu-users
mailing list