Sample sendmail Configurations: client.mc
client.mc
A client/server mail configuration is most often used when you have a
cluster of machines which share all of their user information. Instead of
each user having a seperate mailbox on each machine, you want them to
have one mailbox for the entire cluster. You also don't want to have
incoming mail deliverable on all of the machines, because then you have
to deal with mailbox locking problems over NFS. So the best way to
do it is with a mailhub configuration, where all the client machines
forward local mail to the NFS server for delivery.
Here are the features of this configuration:
- NFS/mail server receives all incoming mail
- Client machines can send outbound mail directly
- All local addresses are rewritten to look like they come from the
server, so remote users' replies will go directly to the server
- Enforces some recommended security restrictions, such as only
allowing root to see the mail queue and restricting
message size to 10MB to prevent mail bombs
- Uses procmail as local MDA
- All machines use /etc/mail/access Access Control Database
Here's what you'll need to do to use the client.mc file:
- Use the standalone.mc file on the server, as if it were
a standalone machine.
- On the server, create a world-readable file called
/etc/mail/local-host-names. It should contain the
fully-qualified domain names of all of the client machines in it, one
per line.
- In the client.mc file, uncomment the appropriate
OSTYPE() macro for your platform. Also, change
YOUR_SERVERNAME_HERE to the fully-qualified domain
name of your server.
- Make any other necessary modifications before you generate the
.cf files.
- Optionally, create the /etc/mail/access Access Control
Database using makemap.
- Install procmail.
Make sure it's configured and installed as a local MDA (it may need to
be setuid).
- Create priority 0 MX DNS records for each client machine pointing
to the server. Remove any other MX records that may exist for any of
the client machines. Make sure there are no MX records for the server,
other than an optional record pointing to itself.
Mark D. Roth <roth@feep.net>