To setup up a network mailhost, you need to direct the mail from arriving at all the workstations. In other words, you want to hijack all mail for *.smallminingco.com
and divert it to one machine, your mailhost.
The network users on their workstations will most likely pick up their mail over POP or telnet.
A user account with the SAME USERNAME should exist on both machines. Please use adduser
to do this as required. If you set the shell to /nonexistent
the user will not be allowed to login.
The mailhost that you will be using must be designated the Mail eXchange for each workstation. This must be arranged in DNS (ie BIND, named). Please refer to a Networking book for in-depth information.
You basically need to add these lines in your DNS server.
pc24.smallminingco.com A xxx.xxx.xxx.xxx ; Workstation ip MX 10 smtp.smallminingco.com ; Your mailhost
You cannot do this yourself unless you are running a DNS server. If you do not want to run a DNS server, get somebody else like your Internet Provider to do it.
This will redirect mail for the workstation to the Mail eXchange host. It does not matter what machine the A record points to, the mail will be sent to the MX host.
This feature is used to implement Virtual E-Mail Hosting.
Example
I have a customer with domain foo.bar and I want all mail for foo.bar to be sent to my machine smtp.smalliap.com. You must make an entry in your DNS server like:
foo.bar MX 10 smtp.smalliap.com ; your mailhostThe A record is not needed if you only want E-Mail for the domain. IE: Don't expect
ping foo.bar
to work unless an Address record for foo.bar
exists as well.
On the mailhost that actually accepts mail for final delivery to a mailbox, sendmail must be told what hosts it will be accepting mail for.
Add pc24.smallminingco.com to /etc/sendmail.cw (if you are using FEATURE(use_cw_file)), or add a "Cw myhost.smalliap.com" line to /etc/sendmail.cf
If you plan on doing anything serious with sendmail
you should install the sendmail source. The source has plenty of documentation with it. You will find information on getting sendmail
source from
the UUCP information.