how to use sendmail as a client

Lito Lampitoc ral at codewan.com.ph
Thu Aug 26 10:47:46 UTC 2004


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?

Thanks.

Ben Yau wrote:

>If you want this to be automated in someway, you will have to run it as a
>daemon so there is something listening to send mail.  Is your question how
>to set up sendmail as a daemon ONLY to send reports?  Or is your question
>how do you send the reports without running a daemon?
>
>I put something like this in some of my scripts
>
>cat report.txt | /usr/lib/sendmail -f fromaddress at domain.com -v
>toaddress at domain.com
>
>For easier reading, include a Subject and To header as the first two lines
>of report.txt... e.g.:
>
># cat report.txt
>Subject: subject line
>To: toaddress at domain.com
>
>Startreport
>blah blha
>yaddayadda
>endreport
>#
>
>Is that what you're looking for?  You will still need a working sendmail.cf
>file even though you are not running it as a daemon.
>
>Ben Yau
>
>=================================
>310.235.2500 x232
>Card Commerce International, Inc.
>http://www.cardcommerce.com
>=================================
>
>
>  
>
>>-----Original Message-----
>>From: redhat-list-bounces at redhat.com
>>[mailto:redhat-list-bounces at redhat.com]On Behalf Of Lito Lampitoc
>>Sent: Sunday, August 22, 2004 10:34 PM
>>To: General Red Hat Linux discussion list
>>Subject: Re: how to use sendmail as a client
>>
>>
>>When sending e-mail to root it says,
>>to=root, ctladdr=root (0/0), delay=00:00:30, xdelay=00:00:00,
>>mailer=relay, pri=30339, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0,
>>stat=Deferred: Connection refused by [127.0.0.1]
>>
>>Also, as much  as possible, I don't want to run the sendmail daemon as
>>it is insecure, all I want to do is use sendmail to send e-mail to my
>>admin(root) account in my other box for whatever activities it detected.
>>
>>Anish Mathew wrote:
>>
>>    
>>
>>>>Lito Lampitoc <ral at codewan.com.ph> wrote:
>>>>
>>>>
>>>>        
>>>>
>>>
>>>      
>>>
>>>>>Hi,
>>>>>
>>>>>How do I setup sendmail on one of my box to send e-mail to my >>admin
>>>>>account in my mail server?
>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>I guess u need to add this line to ur sendmail.mc file
>>>
>>>define(`SMART_HOST',`your mail server`)
>>>
>>>after that recreate sendmail.cf file using m4 macro
>>>
>>>m4 < /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
>>>
>>>restart sendmail daemon after that ur sendmail will be a client
>>>      
>>>
>>forwarding mail to your main server.. if this is what ur looking for..
>>    
>>
>>>hope that would help
>>>
>>>Anish
>>>
>>>
>>>
>>>---------------------------------
>>>ALL-NEW Yahoo! Messenger - all new features - even more fun!
>>>
>>>
>>>      
>>>
>>--
>>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