No subject


Thu Jan 12 21:14:02 GMT 2006


(or any other unsupported mail server), which points the reader to Q16 of the of the Installation FAQ, I gather that this is not out of the ordinary and that it indeed can be done. In fact, I observed that there are some instructions on how to do it. However, as a home linux user, I did not quite understand all that was being explained. So I went looking for more information to hopefully help me out. After a few days of digging around, I uncovered the following information.

>From the Web site:
http://www.tropicseas.net/reference/sysadmin/html/v09/i02/a6.htm
I read the article "A Linux Email Server" by Marcel Gagné. In this article he talks about "Setting up Sendmail". (see below for excerpts) 
My question are, would a configuration like that discussed in Marcel's article:
1. work with MailScanner. 
2. fit my scenario for my home linux network?  

>From the article:
"Depending on how your account is set up with your ISP, the domain name of your server may be something like dhch3-ip1.theirdomain.com , which is not the
best name for setting up the email gateway. For a return address, user "fred" would wind up as fred at dhcp3-ip.theirdomain.com, when sending mail from the
local system. You can have the Sendmail program put in your domain name by making the one modification that I recommend in the Sendmail configuration file.
I mentioned that this email server is not going to be connected to the Internet, but if you make this easy change now, you won't need to do it later.

Using your editor, open /etc/sendmail.cf and look for the lines shown in Listing 1. Notice the part that talks about my official domain name. The line that
reads Dj$w.Foo.COM has been copied and rewritten with the domain name to define the "Dj" macro. A macro in Sendmail parlance is very much like an environment
variable in your Bourne, Korn, or C shell. The Dj macro references your canonical hostname. For this article, I'll call the domain mycompany.com.

That is the only change needed in the /etc/sendmail.cf file. The next file to modify is /etc/sendmail.cw. This file contains a list of all the domains and
systems for which the server will accept mail. For instance, if you edit the file with your editor, and add the domain name (mycompany.com) and the localhost
name (localhost), you end up with this simple file:

# sendmail.cw - include all aliases for your machine here.
mailserv
mailserv.mycompany.com
mycompany.com
localhost

This tells the Sendmail daemon to accept mail messages addressed to either user at localhost, or user at mycompany.com, or any of the aliases you have set up.
Next, you need to edit /etc/mail/relay-domains.

One of the great annoyances of modern email is SPAM (those unwanted bits of advertising that seem to rain down in your email box). Particularly galling
are the spammers who use other people's email servers to route their mail traffic. Fortunately, the modern incarnations of Sendmail make it difficult for
spammers to use your machine as a relay. In fact, unless otherwise specified, Sendmail will refuse to deliver messages from unfamiliar machines or domains.
That is where the relay-domains file comes into play. Edit the file and add the following:

localhost
127.
mycompany.com
192.168.1.

This should cover all hosts in your small, networked office, including any need you have for using Sendmail to relay messages on the server. Be sure to
include the dot at the end of your localhost domain address (127.) and at the end of your private network and domain (192.168.1.)."

AND 

"That's all you really need to do with Sendmail and IMAP in order to send and receive mail on this small network.

To DNS or Not to DNS

For Sendmail to route mail properly, it must be able to resolve domain names to IP addresses. An email server operating on the Internet uses DNS servers
for name resolution.

Simply put, a DNS, or Domain Name Server, takes a system's IP address and converts it to a more "human" name (like mailserv.mycompany.com). It will also
convert that name back to its numeric IP address. On the server, mailserv.mycompany.com would become 192.168.1.100, or vice-versa. This requires the setup
of "zone" files and domain tables and can be quite complex. For the small network here, it is easier to list host-to-name-to-IP-address mappings in the
/etc/hosts file:

127.0.0.1       localhost
192.168.1.100   mailserv.mycompany.com   mailserv   mycompany.com
192.168.1.31    john
192.168.1.32    myrtle
192.168.1.33    bonnie
192.168.1.34    gilbert
192.168.1.35    elvis
192.168.1.36    tux

Usually, the standard Linux install fires up with a DNS already present. This is a simple version called a "caching nameserver". For this example, you need
to get rid of it or it will try to use the DNS to resolve the address of the local machine. The mail client will usually time out waiting for the system
to return with a failed DNS lookup, which is not a good idea. The easiest way is to rename the /etc/resolv.conf file:

# mv /etc/resolv.conf /etc/resolv.conf.orig

Next, stop the DNS by shutting down the named daemon:

# /etc/rc.d/init.d/named stop

To make sure named does not restart on boot, use this command:

# chkconfig --del named

Of course, if your network has been set up for a while and you have a fully configured DNS, you should simply continue using it."

For the full article:
http://www.tropicseas.net/reference/sysadmin/html/v09/i02/a6.htm


Thanks!


Steve Dawes
PH:  (403) 268-5527. 
Mailto:  sdawes at calgary.ca 



NOTICE::
This communication is intended ONLY for the use of the person or entity named above and may contain information that is confidential or legally privileged. If you are not the intended recipient named above or a person responsible for delivering messages or communications to the intended recipient, YOU ARE HEREBY NOTIFIED that any use, distribution, or copying of this communication or any of the information contained in it is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone and then destroy or delete this communication, or return it to us by mail if requested by us. The City of Calgary thanks you for your attention and cooperation.




More information about the MailScanner mailing list