LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Send mail configuration issues. (https://www.linuxquestions.org/questions/red-hat-31/send-mail-configuration-issues-886988/)

J_U_D_E 06-17-2011 11:17 PM

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.

mesiol 06-18-2011 01:44 AM

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.

J_U_D_E 06-18-2011 11:35 PM

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?

catkin 06-19-2011 01:07 AM

Quote:

Originally Posted by J_U_D_E (Post 4389734)
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


J_U_D_E 06-23-2011 11:34 PM

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.

mesiol 06-25-2011 04:36 AM

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


All times are GMT -5. The time now is 02:04 AM.