Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The "sendmail" is preinstalled and I think it needn't configuration.

Am I right or wrong?

But I failed to send out the emails actually!

[root@jiaoyou ~]# cat mail2.txt
From: abc2@gmail.com
To: abc@gmail.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
Subject: Test HTML e-mail.

This is a MIME-encapsulated message

[root@jiaoyou ~]# sendmail -t -d <mail2.txt 
Version 8.14.3
 Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
                MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
                NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
                TCPWRAPPERS USERDB USE_LDAP_INIT
getla(): 0.00
setoption SevenBitInput (7)=False
setoption AliasWait (a)=10
setoption MinFreeBlocks (b)=100
setoption BlankSub (B)=.
setoption HoldExpensive (c)=False
setoption DeliveryMode (d)=i
setoption QueueFileMode (0xbe)=0660
setoption TempFileMode (F)=0600
setoption HelpFile (H)=/etc/mail/helpfile
setoption SendMimeErrors (j)=True
setoption ForwardPath (J)=
setoption ConnectionCacheSize (k)=2
setoption ConnectionCacheTimeout (K)=5m
setoption UseErrorsTo (l)=False
setoption LogLevel (L)=9
setoption CheckAliases (n)=False
setoption OldStyleHeaders (o)=True
setoption DaemonPortOptions (O)=Name=NoMTA, Addr=127.0.0.1, M=E
Daemon NoMTA flags: <NOETRN>
setoption UseMSP (0xcc)=True
setoption PrivacyOptions (p)=goaway,noetrn,restrictqrun
setoption QueueDirectory (Q)=/var/spool/clientmqueue
setoption Timeout (r).queuereturn=5d
setoption Timeout (r).queuewarn=4h
setoption SuperSafe (s)=True
setoption StatusFile (S)=/var/spool/clientmqueue/sm-client.st
setoption TimeZoneSpec (t)=
setoption SmtpGreetingMessage (0x90)= 0x81 j Sendmail  0x81 v/ 0x81 Z;  0x81 b
setoption UnixFromLine (0x91)=From  0x81 g  0x81 d
setoption OperatorChars (0x92)=.:%@!^/[]+
setoption DontInitGroups (0x93)=True
setoption RunAsUser (0x9d)=smmsp
setoption DontProbeInterfaces (0xa1)=True
setoption TrustedUser (0xa7)=smmsp
setoption PidFile (0x9f)=/var/run/sm-client.pid
drop_privileges(0): Real[UG]id=0:0, get[ug]id=0:0, gete[ug]id=0:51, RunAs[UG]id=51:51
getauthinfo: root@localhost

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = jiaoyou
  (canonical domain name) $j = jiaoyou
         (subdomain name) $m = <null>
              (node name) $k = jiaoyou
========================================================

assign_queueid: assigned id n7QFdKGA008587, e=0x7f32a15d1fa0
assign_queueid: assigned id n7QFdKGB008587, e=0x7f32a15d1fa0
getla(): 0.00
setsender()

--parseaddr(root)
rewrite: ruleset canonify           input: root
rewrite: ruleset Canonify2          input: root
rewrite: ruleset Canonify2        returns: root
rewrite: ruleset canonify         returns: root
rewrite: ruleset parse              input: root
rewrite: ruleset Parse0             input: root
map_lookup(dequote, root) => NOT FOUND (0)
rewrite: ruleset Parse0           returns: root
rewrite: ruleset Parse1             input: root
rewrite: ruleset Parse1           returns:  0x96  local  0x98  root
rewrite: ruleset parse            returns:  0x96  local  0x98  root
rewrite: ruleset 2                  input: root
rewrite: ruleset 2                returns: root
rewrite: ruleset EnvToL             input: root
rewrite: ruleset EnvToL           returns: root
rewrite: ruleset final              input: root
rewrite: ruleset final            returns: root
parseaddr-->0x7f32a15d1fc0=root:
        mailer 3 (local), host `'
        user `root', ruser `<null>'
        state=OK, next=0x0, alias 0x0, uid 0, gid 0
        flags=180<QPINGONFAILURE,QPINGONDELAY>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="(none)"
        rstatus="(none)"
        statdate=(none)
rewrite: ruleset canonify           input: root
rewrite: ruleset Canonify2          input: root
rewrite: ruleset Canonify2        returns: root
rewrite: ruleset canonify         returns: root
rewrite: ruleset 1                  input: root
rewrite: ruleset 1                returns: root
rewrite: ruleset final              input: root
rewrite: ruleset final            returns: root
EOH
----- collected header -----
Return-Path: < 0x81 g>
Received:(  0x81 ?sfrom  0x81 s  0x81 . 0x81 ?_( 0x81 ?s 0x81 |from  0x81 . 0x81 _)\n\t 0x81 . 0x81 ? 0xa5 (authenticated 0x81 ? 0xa6  bits= 0x81  0xa6  0x81 .)\n\t 0x81 .by  0x81 j ( 0x81 v/ 0x81 Z) 0x81 ?r with  0x81 r 0x81 . id  0x81 i 0x81 ? 0xa7 \n\t(version= 0x81  0xa7  cipher= 0x81  0xa8  bits= 0x81  0xa9  verify= 0x81  0xaa ) 0x81 . 0x81 ?u\n\tfor  0x81 u;  0x81 |;\n\t 0x81 . 0x81 b)  (from root@localhost)\n\tby jiaoyou (8.14.3/8.14.3/Submit) id n7QFdKGB008587;\n\tWed, 26 Aug 2009 11:39:20 -0400
Resent-Date:(  0x81 a)  Wed, 26 Aug 2009 11:39:20 -0400
Date:(  0x81 a)  Wed, 26 Aug 2009 11:39:20 -0400
Resent-From:(  0x81 ?x 0x81 x < 0x81 g> 0x81 | 0x81 g 0x81 .) crackaddr( root <root>)
crackaddr=>` root < 0x81 g>'
 root <root>
From:<NULL>
Full-Name:(  0x81 x)  root
Resent-Message-Id:( < 0x81 t. 0x81 i@ 0x81 j>)  <200908261539.n7QFdKGB008587@jiaoyou>
Message-Id:( < 0x81 t. 0x81 i@ 0x81 j>)  <200908261539.n7QFdKGB008587@jiaoyou>
From: abc2@gmail.com
To: abc@gmail.com
sendto:  abc@gmail.com
   ctladdr=[NULL]

--parseaddr(abc@gmail.com)
rewrite: ruleset canonify           input: shore . cloud @ gmail . com
rewrite: ruleset Canonify2          input: shore . cloud < @ gmail . com >
map_lookup(host, gmail.com) => host_map_lookup(gmail.com) => map_rewrite(gmail.com), av =
        gmail.com
map_rewrite => gmail.com.
FOUND gmail.com
gmail.com. (0)
rewrite: ruleset Canonify2        returns: shore . cloud < @ gmail . com . >
rewrite: ruleset canonify         returns: shore . cloud < @ gmail . com . >
rewrite: ruleset parse              input: shore . cloud < @ gmail . com . >
rewrite: ruleset Parse0             input: shore . cloud < @ gmail . com . >
rewrite: ruleset Parse0           returns: shore . cloud < @ gmail . com . >
rewrite: ruleset Parse1             input: shore . cloud < @ gmail . com . >
rewrite: ruleset MailerToTriple     input: < > shore . cloud < @ gmail . com . >
rewrite: ruleset MailerToTriple   returns: shore . cloud < @ gmail . com . >
rewrite: ruleset Parse1           returns:  0x96  esmtp  0x97  gmail . com .  0x98  shore . cloud < @ gmail . com . >
rewrite: ruleset parse            returns:  0x96  esmtp  0x97  gmail . com .  0x98  shore . cloud < @ gmail . com . >
rewrite: ruleset 2                  input: shore . cloud < @ gmail . com . >
rewrite: ruleset 2                returns: shore . cloud < @ gmail . com . >
rewrite: ruleset EnvToSMTP          input: shore . cloud < @ gmail . com . >
rewrite: ruleset PseudoToReal       input: shore . cloud < @ gmail . com . >
rewrite: ruleset PseudoToReal     returns: shore . cloud < @ gmail . com . >
rewrite: ruleset MasqSMTP           input: shore . cloud < @ gmail . com . >
rewrite: ruleset MasqSMTP         returns: shore . cloud < @ gmail . com . >
rewrite: ruleset EnvToSMTP        returns: shore . cloud < @ gmail . com . >
rewrite: ruleset final              input: shore . cloud < @ gmail . com . >
rewrite: ruleset final            returns: shore . cloud @ gmail . com
parseaddr-->0x7f32a16a4598=abc@gmail.com:
        mailer 5 (esmtp), host `gmail.com.'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x0, alias 0x0, uid 0, gid 0
        flags=180<QPINGONFAILURE,QPINGONDELAY>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="(none)"
        rstatus="(none)"
        statdate=(none)

recipient (0): 0x7f32a16a4598=abc@gmail.com:
        mailer 5 (esmtp), host `gmail.com.'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x0, alias 0x0, uid 0, gid 0
        flags=182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="(none)"
        rstatus="(none)"
        statdate=(none)
maplocaluser: 0x7f32a16a4598=abc@gmail.com:
        mailer 5 (esmtp), host `gmail.com.'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x0, alias 0x0, uid 0, gid 0
        flags=182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=(none)
rewrite: ruleset localaddr          input: shore . cloud @ gmail . com
rewrite: ruleset Local_localaddr    input: shore . cloud @ gmail . com
rewrite: ruleset ParseRecipient     input: shore . cloud @ gmail . com
rewrite: ruleset CanonAddr          input: shore . cloud @ gmail . com
rewrite: ruleset canonify           input: shore . cloud @ gmail . com
rewrite: ruleset Canonify2          input: shore . cloud < @ gmail . com >
map_lookup(host, gmail.com) => host_map_lookup(gmail.com) => CACHE gmail.com
map_rewrite(gmail.com), av =
        gmail.com
map_rewrite => gmail.com.
gmail.com. (0)
rewrite: ruleset Canonify2        returns: shore . cloud < @ gmail . com . >
rewrite: ruleset canonify         returns: shore . cloud < @ gmail . com . >
rewrite: ruleset Parse0             input: shore . cloud < @ gmail . com . >
rewrite: ruleset Parse0           returns: shore . cloud < @ gmail . com . >
rewrite: ruleset CanonAddr        returns: shore . cloud < @ gmail . com . >
rewrite: ruleset ParseRecipient   returns: shore . cloud < @ gmail . com >
rewrite: ruleset Local_localaddr  returns:  0x96  relay  0x97  [ 127 . 0 . 0 . 1 ]  0x98  shore . cloud < @ gmail . com >
rewrite: ruleset localaddr        returns:  0x96  relay  0x97  [ 127 . 0 . 0 . 1 ]  0x98  shore . cloud < @ gmail . com >
rewrite: ruleset 2                  input: shore . cloud < @ gmail . com >
rewrite: ruleset 2                returns: shore . cloud < @ gmail . com >
rewrite: ruleset MasqSMTP           input: shore . cloud < @ gmail . com >
rewrite: ruleset MasqSMTP         returns: shore . cloud < @ gmail . com >
rewrite: ruleset final              input: shore . cloud < @ gmail . com >
rewrite: ruleset final            returns: shore . cloud @ gmail . com

recipient (1): 0x7f32a16a46f8=abc@gmail.com:
        mailer 8 (relay), host `[127.0.0.1]'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x0, alias 0x7f32a16a4598, uid 0, gid 0
        flags=182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=(none)
MIME-Version: 1.0
Content-Type: multipart/alternative;
Subject: Test HTML e-mail.
----------------------------
From person = "root"
getla(): 0.00

===== SENDALL: mode i, id n7QFdKGB008587, e_from 0x7f32a15d1fc0=root:
        mailer 3 (local), host `'
        user `root', ruser `<null>'
        state=SENDER, next=0x0, alias 0x0, uid 0, gid 0
        flags=181<QGOODUID,QPINGONFAILURE,QPINGONDELAY>
        owner=(none), home="/root", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="(none)"
        rstatus="(none)"
        statdate=(none)
        e_flags = 4605041<OLDSTYLE,DELETE_BCC,GLOBALERRS,METOO,HAS_DF,IS_MIME,SPLIT>
sendqueue:
0x7f32a16a46f8=abc@gmail.com:
        mailer 8 (relay), host `[127.0.0.1]'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x7f32a16a4598, alias 0x7f32a16a4598, uid 0, gid 0
        flags=80000182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY,QRCPTOK>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=(none)
0x7f32a16a4598=abc@gmail.com:
        mailer 5 (esmtp), host `gmail.com.'
        user `abc@gmail.com', ruser `<null>'
        state=REPLACED, next=0x0, alias 0x0, uid 0, gid 0
        flags=80000182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY,QRCPTOK>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=(none)

>>>>> queueing /var/spool/clientmqueue/./qfn7QFdKGB008587 (new id) >>>>>
queueing 0x7f32a16a46f8=abc@gmail.com:
        mailer 8 (relay), host `[127.0.0.1]'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x7f32a16a4598, alias 0x7f32a16a4598, uid 0, gid 0
        flags=80000182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY,QRCPTOK>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=(none)
remotename(abc2@gmail.com)
remotename(abc@gmail.com)
<<<<< done queueing n7QFdKGB008587 <<<<<


--deliver, id=n7QFdKGB008587, mailer=relay, host=`[127.0.0.1]', first user=`abc@gmail.com'
remotename(root)
rewrite: ruleset canonify           input: root
rewrite: ruleset Canonify2          input: root
rewrite: ruleset Canonify2        returns: root
rewrite: ruleset canonify         returns: root
rewrite: ruleset 1                  input: root
rewrite: ruleset 1                returns: root
rewrite: ruleset EnvFromSMTP        input: root
rewrite: ruleset PseudoToReal       input: root
rewrite: ruleset PseudoToReal     returns: root
rewrite: ruleset MasqSMTP           input: root
rewrite: ruleset MasqSMTP         returns: root < @ *LOCAL* >
rewrite: ruleset MasqEnv            input: root < @ *LOCAL* >
rewrite: ruleset MasqEnv          returns: root < @ jiaoyou . >
rewrite: ruleset EnvFromSMTP      returns: root < @ jiaoyou . >
rewrite: ruleset final              input: root < @ jiaoyou . >
rewrite: ruleset final            returns: root @ jiaoyou
remotename => `root@jiaoyou'
hostsignature([127.0.0.1]) = [127.0.0.1]

send to 0x7f32a16a46f8=abc@gmail.com:
        mailer 8 (relay), host `[127.0.0.1]'
        user `abc@gmail.com', ruser `<null>'
        state=OK, next=0x7f32a16a4598, alias 0x7f32a16a4598, uid 0, gid 0
        flags=80000182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY,QRCPTOK>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=(none), status=(none)
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=(none)
checkcompat(to=abc@gmail.com, from=root)
openmailer: TCP [127.0.0.1]
makeconnection ([127.0.0.1] [127.0.0.1].25 (10))
makeconnection: fd=6
Connecting to [127.0.0.1]...
Connect failed (Connection refused by [127.0.0.1]); retrying with AF_INET....
makeconnection ([127.0.0.1] [127.0.0.1].25 (2))
makeconnection: fd=6
Connecting to [127.0.0.1]...
Connect failed (Connection refused by [127.0.0.1])
openmailer: makeconnection => stat=75, errno=111
openmailer: MCI@0x7f32a16926c8: flags=0,
        errno=111, herrno=0, exitstat=75, state=0, pid=0,
        maxsize=0, phase=initial connection, mailer=relay,
        status=4.4.1, rstatus=(null),
        host=[127.0.0.1], lastuse=Wed Aug 26 11:39:21 2009

dropenvelope 0x7f32a15d1fa0: id=n7QFdKGB008587, flags=4605043<OLDSTYLE,INQUEUE,DELETE_BCC,GLOBALERRS,METOO,HAS_DF,IS_MIME,SPLIT>

>>>>> queueing /var/spool/clientmqueue/./qfn7QFdKGB008587 >>>>>
queueing 0x7f32a16a46f8=abc@gmail.com:
        mailer 8 (relay), host `[127.0.0.1]'
        user `abc@gmail.com', ruser `<null>'
        state=QUEUEUP, next=0x7f32a16a4598, alias 0x7f32a16a4598, uid 0, gid 0
        flags=80000182<QPRIMARY,QPINGONFAILURE,QPINGONDELAY,QRCPTOK>
        owner=(none), home="(none)", fullname="(none)"
        orcpt="(none)", statmta=[127.0.0.1], status=4.4.1
        finalrcpt="RFC822; abc@gmail.com"
        rstatus="(none)"
        statdate=Wed Aug 26 11:39:21 2009

remotename(abc2@gmail.com)
remotename(abc@gmail.com)
<<<<< done queueing n7QFdKGB008587 <<<<<


====finis: stat 75 e_id=NOQUEUE e_flags=4405043<OLDSTYLE,INQUEUE,DELETE_BCC,GLOBALERRS,METOO,IS_MIME,SPLIT>
share|improve this question
1  
What a brilliant question. It's almost recursive. +1 to you. –  Joseph Kern Aug 26 '09 at 16:07

2 Answers 2

Short answer is "No, it doesn't need to be configured to send out emails."

Long answer is, "You're probably going to want to look it over and configure it if you want to send/receive emails. You're also going to want to look at your DNS, SPF records, reverse PTR records, etc if you want to have a GOOD functional mail server."

There's actually quite a decent amount of work to configuring a mail server PROPERLY.

If all you want to do is have a script send out the occasional email though... you're probably fine. (Unless YOUR mail server is aggressive on spam and checking to mail sure sending servers are REALLY mail servers... but I digress...)

Hope this helps.

share|improve this answer
    
It's not fine,I can't send out emails now,don't know why –  abcgreen Aug 26 '09 at 16:22
1  
I wouldn't send from "root" and the "127.0.0.1" doesn't look too good either. Looks like you're trying to send to Google and I can assure you, Google is NOT going to consider your server to be a legit mail server. So yes... you're probably going to have to do some configuration. –  KPWINC Aug 26 '09 at 16:44

Sendmail will only send mails outbound with its initial installation on many systems. If you wish to receive e-mail on the system from external services, you will need to reconfigure it.

share|improve this answer
    
But in my environment it sucks,the emails can't be sent out –  abcgreen Aug 26 '09 at 16:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.