Simple Mail Example

This is a simple mail server configuration for a host that does no hosting, but wants to control access and use of email.

divert(-1) ### Definitions for sendmail ###

divert(0)
VERSIONID(`@(#)little.biz.mc 8.10 (Berkeley)5/19/1998')

OSTYPE(`linux')


DOMAIN(`generic')


define(`confAUTO_REBUILD',`1m')


define(`confTO_CONNECT',`1m')


undefine (`UUCP_RELAY')
undefine (`BITNET_RELAY')


FEATURE (always_add_domain)


FEATURE(`smrsh',`/usr/sbin/smrsh')
FEATURE(`local_lmtp',`/usr/bin/mail.local')


We will redirect to addresses listed in the access database with a RELAY flag. Also, we will reject any mail addresses to address.REDIRECT wht 551 user not local; please try
.

FEATURE(redirect)


Which mailers are allowed to send send/receive mail.

MAILER(local)
MAILER(smtp)



The /etc/mail/aliases File

The aliases file can be used to set up mailing lists and to perform some of the functions that are performed by the virtusertable.

root: root,admin,smith
webmaster: admin,smith,wwwuser
shipping: mickj,janisj,georgeh
mgmt: petert,randyb,felixc,petern
acctng: dennyy,maryannef
johnl: john@stereo.com
production: :include:/etc/mail/lists/production



The /etc/mail/access File

The access file is used to limit access to the sendmail capabilities. In this case, there are some domains that we don't want to accept mail from as well as some specific users.


sleazy.com                    REJECT
202.36.4                      REJECT
sales@                        DISCARD
bob@usedcars.com              ERROR:550 I don't want to buy a car