Quote:
Originally Posted by J_U_D_E
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