Sendmail configuration:

Julian Field mailscanner at ecs.soton.ac.uk
Wed Nov 20 18:48:22 GMT 2002


I don't quite see why you need to run MailScanner on a different box from 
your mail server, if you are using sendmail or Exim on the mail server. It 
just adds extra complication and really doesn't gain you very much.

You need to set up your mail server to accept mail from your "MailScanner" 
box, and you need to set up your MailScanner box so that it receives mail 
from the outside world and relays it onto the mail server for you.

You should do *all* of that before you think about installing MailScanner 
itself.
Test it.
Make sure it all works.

Only once you are happy that the mail is going to and from the right 
places, with all the right addresses and headers, should you install 
MailScanner on the box that faces the outside world.

MailScanner does not get involved with the SMTP service, nor the delivery 
or addressing of any email that passes through it.

So installing MailScanner won't affect the path that mail takes through 
your systems, which is why you should get them all working first.

You might want to ask this list if there is someone who could privately 
help you set up your mail system the way you want it, but otherwise that is 
OT (off-topic) for this list. Get back to us when you install MailScanner 
itself. I'm not being rude or anything, I hope you won't take offence, none 
is intended. But I do like to keep this list reasonably "on topic" and 
general mail setup information discussions aren't really relevant to 
MailScanner itself.

Jules.

At 17:19 20/11/2002, you wrote:
>New to MailScanner, I have a few questions about configuring sendmail to 
>work the way that I would like it too.  However, before I ask the 
>questions, I would like to let you know that I think that I have done my 
>homework first.
>To outline what I have done so far before posting my questions is:
>1. Read the on-line installation documentation.
>2. read through the on-line FAQs.
>3. Did a number of searches on the list archives for answers to my questions.
>4. Went to and read the information available at www.sendmail.org .
>5. Searched the internet in general for what I was looking for.
>So, now it is to the list that I am turning to see if I have found the 
>right answers, and further more, to share what I found in hopes that it 
>will one day help someone else.
>
>Scenario:
>I would like to have MailScanner running on one computer with the mail 
>server located on a second box.
> From the link, Deploying MailScanner with Microsoft Exchange Server or 
> Postfix
>(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.

--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ




More information about the MailScanner mailing list