LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-17-2011, 11:17 PM   #1
J_U_D_E
LQ Newbie
 
Registered: Jan 2008
Posts: 29

Rep: Reputation: 0
Send mail configuration issues.


Please i will appreciate if someone can give me a detail explanation of configuring sendmail on redhat 4 and 5. I want to write some scripts and save it on my Linux box.I want my linux box to send me an email based on the scripts. Example when my backup is successful, disk getting filled I have some documentations i got on the internet but not so clear.
 
Old 06-18-2011, 01:44 AM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
brief explanation can be found at Sendmail website.

If you are using Redhat you have commercial support. If you do not pay for Redhat support you better go to use CentOS. Both Redhat and Centos have plenty of documentation. Google also provides a lot of howto's in configuring sendmail.

After you have read all the documentation and tried to configure sendmail, come back with your specific question.
 
Old 06-18-2011, 11:35 PM   #3
J_U_D_E
LQ Newbie
 
Registered: Jan 2008
Posts: 29

Original Poster
Rep: Reputation: 0
Still on sendmail

Yes i know that there are documentations and i have read them but will need some help on someone that has done a successful installation. There are some fundamentals that has to be taken into consideration. Example include which email to use. I was contemplating sending the mail to my email at my webhosting company. But the ping my domain name, it gives me an IP address. And when i ping the IP address it does not match to the domain. It seems i must have a dedicated/static IP from my web hosting. It seems DNS is crucial for this. Do i use a gmail or yahoo?
 
0 members found this post helpful.
Old 06-19-2011, 01:07 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by J_U_D_E View Post
Yes i know that there are documentations and i have read them but will need some help on someone that has done a successful installation. There are some fundamentals that has to be taken into consideration. Example include which email to use. I was contemplating sending the mail to my email at my webhosting company. But the ping my domain name, it gives me an IP address. And when i ping the IP address it does not match to the domain. It seems i must have a dedicated/static IP from my web hosting. It seems DNS is crucial for this. Do i use a gmail or yahoo?
Here is a sendmail etc. setup done on my personal Slackware 13.1 computer which sends mail to my personal mail via an ISP's SMTP server. On receipt the mail is displayed as from root@CW8 (CW8 is my personal computer's hostname). The external IP address is dynamic. I do have my own domain name which is not resolvable to the external IP address. Much depends on the policies of the ISP providing the SMTP server you send mail to. Mine is LuxSci who provide an excellent premium price service (I have no connection with LuxSci except as a customer)

/etc/mail/aliases (root:root 644):
Code:
root@CW8:~# cat /etc/mail/aliases
[snip]
#@ Local additions start here
root:root.CW8@<my domain name hidden>
/etc/mail/authinfo (root:root 400):
Code:
root@CW8:~# cat /etc/mail/authinfo
AuthInfo: "U:<SMTPT server logon name hidden>" "P:<SMTPT server logon password hidden>" "M:PLAIN"
/root/.forward (root:root 644)
Code:
<my personal email address hidden>
root's entry in /etc/passwd (required to generate the displayed From address):
Code:
root:x:0:0:root@CW8:/root:/bin/bash
Here is the procedure used to generate sendmail configuration files from the autinfo and aliases files above:
Code:
root@CW8:/etc/mail# chmod 400 authinfo 
root@CW8:/etc/mail# makemap hash authinfo < authinfo 
root@CW8:/etc/mail# newaliases 
/etc/mail/aliases: 16 aliases, longest 22 bytes, 188 bytes total
Here is the procedure used to generate the sendmail configuration file:
Code:
root@CW8:/etc/mail# bu sendmail.cf  <== bu is my own script for making backups
root@CW8:/etc/mail# cd /usr/share/sendmail/cf/cf 
root@CW8:/usr/share/sendmail/cf/cf# cp -p sendmail-slackware.mc sendmail-slackware.CW8.v1.mc 
root@CW8:/usr/share/sendmail/cf/cf# vi sendmail-slackware.CW8.v1.mc
[edited as show by following diff output] 
root@CW8:/usr/share/sendmail/cf/cf# diff sendmail-slackware.mc sendmail-slackware.CW8.v1.mc 
11a12 
> dnl#@ Local changes identified by comment introducer dnl#@ 
13c14,15 
< VERSIONID(`default setup for Slackware Linux')dnl 
--- 
> dnl#@VERSIONID(`default setup for Slackware Linux')dnl 
> VERSIONID(`CW8 version 1')dnl 
19a22,23 
> dnl#@ Local addition 
> define(`SMART_HOST',`<my ISP's SMTP server's DNS name hidden>') 
37c41,47 
< EXPOSED_USER(`root')dnl 
--- 
> dnl#@ Local additional FEATURES 
> FEATURE(authinfo) 
> FEATURE(delay_checks)dnl 
> FEATURE(masquerade_envelope)dnl 
> FEATURE(allmasquerade)dnl 
> FEATURE(masquerade_entire_domain)dnl 
> dnl#@EXPOSED_USER(`root')dnl 
42a53,55 
> dnl#@ Local additions 
> MASQUERADE_AS(`<my personal domain name hidden>')dnl 
> DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') 
root@CW8:/usr/share/sendmail/cf/cf# sh Build sendmail-slackware.CW8.v1.mc
root@CW8:/usr/share/sendmail/cf/cf# cp sendmail-slackware.CW8.v1.cf /etc/mail/sendmail.cf
 
Old 06-23-2011, 11:34 PM   #5
J_U_D_E
LQ Newbie
 
Registered: Jan 2008
Posts: 29

Original Poster
Rep: Reputation: 0
Please i need to know how this is done in Redhat linux 5. I am interested in configuring for outgoing mails. Can o use gmail, yahoo? Because i do not know if my ISP will allow me to use their SMTP server for the out going mail. How can i configure the /etc/mail/sendmail.mc for outgoing mails through an external mail server.
 
0 members found this post helpful.
Old 06-25-2011, 04:36 AM   #6
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
i think what you are looking for is a smartrelay. Search google for smartrelay will provide you documentation.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server configuration issues ibousman Linux - Server 9 12-04-2010 04:42 AM
send mail configuration amjath9 Linux - Server 0 07-27-2009 06:20 AM
send mail Configuration finsh Linux - Server 1 08-19-2006 12:57 PM
Mail Server Issues; Can't Send E-mail (using sendmail) Vegetarian Smoker Linux - Software 1 06-18-2006 02:16 PM
Send mail configuration problem saravanan1979 Linux - Networking 3 05-17-2002 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration