sending mail on ubuntu through sendmail

Stephen S. Disbrow info at disbrows.us
Wed Oct 20 03:46:04 UTC 2010


    ----- Original Message ----- 
From: "Christopher Chan" <christopher.chan at bradbury.edu.hk>
To: <ubuntu-users at lists.ubuntu.com>
Sent: Tuesday, October 19, 2010 8:17 PM
Subject: Re: sending mail on ubuntu through sendmail


> On Wednesday, October 20, 2010 09:09 AM, Stephen S. Disbrow wrote:
>> Hi,
>> how do I configure sendmail so that I can use sendmail to actually send
>> mail.
>> my ubuntu 10.10 host's static IP is 192.168.1.20, and it's on a router
>> connected to a cable modem. I think my cable company will only allow
>> smtp mail to go through one of there servers smtp.charter.net. How do I
>> configure my machine to allow programs to send mail via the sendmail
>> deamon to the outside internet world?I know I'm supposed to modify items
>> in sendmail.mc and than do a make in /etc/mail , and restart sendmail
>> via init.d, but I'm not sure what I should be modifying
>> Steve D. (hopelessly lost.)
>>
>
> Just edit /etc/mail/sendmail.cf and append the smtp.charter.net to the
> DS on the line that starts with DS.
>
> eg:
> From
>
> # "Smart" relay host (may be null)
> DS
>
> To
> # "Smart" relay host (may be null)
> DSsmtp.charter.net
>
> Or
> # "Smart" relay host (may be null)
> DS192.168.1.1
>
> Oh yeah...you have a nice internal static ip but I suspect it is really
> an internal dynamic ip from your router so do not use 192.168.1.1...it
> is just an example.
>
> -- 

I added this line to /etc/mail/sendmail.mc
define(`SMART_HOST', smtp.charter.net)dnl

I cd'd to /etc/mail
did a make, and it added the following line to sendmail.cf
DSsmtp.charter.net

I then did an /etc/init.d/sendmail reload
echo "test" | sendmail steve at disbrows.us

The mail still didn't work. The /var/log file /mail.log is as follows

Oct 19 21:57:49 gatekeeper sm-mta[1035]: starting daemon (8.14.3): 
SMTP+queueing at 00:10:00
Oct 19 21:57:50 gatekeeper sm-mta[1071]: o9K2vohS001071: 
from=<root at localhost.localdomain>, size=306, class=0, nrcpts=1, 
msgid=<201010200232.o9K2WMFO003225 at gatekeeper>, proto=ESMTP, daemon=MTA-v4, 
relay=gatekeeper [127.0.0.1]
Oct 19 21:57:51 gatekeeper sm-msp-queue[1050]: o9K2WMFO003225: 
to=steve at disbrows.us, ctladdr=root (0/0), delay=00:25:29, xdelay=00:00:01, 
mailer=relay, pri=210005, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, 
stat=Sent (o9K2vohS001071 Message accepted for delivery)
Oct 19 21:58:03 gatekeeper sm-mta[1123]: o9K2vohS001071: 
to=<steve at disbrows.us>, ctladdr=<root at localhost.localdomain> (0/0), 
delay=00:00:13, xdelay=00:00:12, mailer=relay, pri=120306, 
relay=smtp.charter.net. [209.225.8.224], dsn=5.6.0, stat=Data format error
Oct 19 21:58:03 gatekeeper sm-mta[1123]: o9K2vohS001071: o9K2w3hS001123: 
DSN: Data format error
Oct 19 21:58:03 gatekeeper sm-mta[1123]: o9K2w3hS001123: 
to=<root at localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, 
mailer=local, pri=30000, dsn=2.0.0, stat=Sent

Below is my /etc/hosts files if that matters.
127.0.0.1       gatekeeper      localhost.localdomain   localhost
::1     gatekeeper      localhost6.localdomain6 localhost6
192.168.1.20    gatekeeper

steve D.






More information about the ubuntu-users mailing list