how to use sendmail as a client

Lito Lampitoc ral at codewan.com.ph
Tue Sep 7 08:27:30 UTC 2004


thanks...

just knowing how to configure my sendmail to use a different mail server 
in my network will do,
a telnet to port 25 of my mail server (box2) works well, but sending 
mail via sendmail in my local machine (box1) has this message when I 
execute this command:

cat testfile | /usr/lib/sendmail -bm -t -v

ral at codewan.com.ph... Connecting to [127.0.0.1] via relay...
220 localhost.localdomain ESMTP Sendmail 8.12.10/8.12.10; Tue, 7 Sep 
2004 16:24:36 +0800
 >>> EHLO localhost.localdomain
250-localhost.localdomain Hello makati [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
 >>> MAIL From:<root at localhost.localdomain> SIZE=115 
AUTH=root at localhost.localdomain
250 2.1.0 <root at localhost.localdomain>... Sender ok
 >>> RCPT To:<ral at codewan.com.ph>
 >>> DATA
250 2.1.5 <ral at codewan.com.ph>... Recipient ok
354 Enter mail, end with "." on a line by itself
 >>> .
250 2.0.0 i878Oaoh031590 Message accepted for delivery
ral at codewan.com.ph... Sent (i878Oaoh031590 Message accepted for delivery)
Closing connection to [127.0.0.1]
 >>> QUIT
221 2.0.0 localhost.localdomain closing connection


I wonder why it is using 127.0.0.1 (localhost) as smtp to connect to, 
and how will I set it to a different smtp server?
I already modified the following line in my sendmail.mc:

define(`SMART_HOST',`cebu.codewan.com.ph')

where 'cebu' is my mail server (box2)..

If only I could change the default smtp server setting (127.0.0.1) then 
rest would'nt be a problem


Vipul Ramani wrote:

>Greetings....
>
>Can u please conformed this things.....!!!!!!
> 
>DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
>
>This tells sendmail to only look at the loopback device, and not the
>network interface for incoming mail.  Change 127.0.0.1 to your eth0 ip
>or comment it out by placing a dnl in front of it like this:
>
>dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
>
>There's also no problem in deleting it.  Anytime you edit sendmail.mc,
>you have to build a new sendmail.cf.  This is done with the following
>command:
>
>m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
>
>Now you need to tell sendmail who the local domains and hosts are. 
>Open /etc/mail/local-host-names and add the name of your localdomain. 
>In the future this will be the registered domains that are hosted by
>this server.  The next thing you need to do is to allow relaying for
>this domain.  To do that, open /etc/mail/access and add a line that
>looks like this:
>
>mydomain.com     RELAY
>
>You will see other lines aready there for localhost and 127.0.0.1 - do
>NOT delete those lines.  Now you need to create the database:
>
>makemap hash /etc/mail/access.db < /etc/mail/access
>
>
>
>
>
>Now just restart sendmail and mail should start coming in.
>On Thu, 26 Aug 2004 08:27:08 -0400, Reuben D. Budiardja
><techlist at voyager.phys.utk.edu> wrote:
>  
>
>>On Thursday 26 August 2004 06:47, Lito Lampitoc wrote:
>>    
>>
>>>I want it to be automated, for example, logwatch or tripwire by default
>>>sends e-mail  to  root user in box1 whenever there is unusual activity,
>>>what I want is, these e-mails or reports redirected to my admin account
>>>in box2.  How? and shall I need a running sendmail daemon here?
>>>      
>>>
>>The easies way, is to edit /etc/aliases on box1 and have the line:
>>
>>root: youremailaddress at box2.com
>>
>>then run (as root)
>>$> newaliases
>>
>>that way all the email (ie. logwatch report, tripwire, etc) sent to the root
>>on box1 will automatically be forwarded to youremailaddress at box2.com.
>>
>>And yes, AFAIK sendmail service has to run for that to work. By default
>>sendmail does not listen to the external interface (only local loopback). If
>>you're still not convinced that's secure enough, use tcpwrapper to refused
>>all connection to sendmail in /etc/host.deny, and/or block port 25 using
>>firewall.
>>
>>RDB
>>
>>--
>>Reuben D. Budiardja
>>Dept. Physics and Astronomy
>>University of Tennesse, Knoxville, TN
>>
>>-----BEGIN GEEK CODE BLOCK-----
>>Version: 3.12
>>GIT/M/MU/P/S d-(++) s: a-- C++(+++) UL++++ P-- L+++>++++ E- W+++
>>N+ o? K- w--- !O M- V? !PS !PE Y PGP- t+ 5 X R- tv+
>>b++>+++ DI D(+) G e++>++++ h+(*) r++ y->++++
>>------END GEEK CODE BLOCK------
>>
>>
>>
>>
>>--
>>redhat-list mailing list
>>unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
>>https://www.redhat.com/mailman/listinfo/redhat-list
>>
>>    
>>
>
>
>  
>





More information about the redhat-list mailing list