The "Noob Link" Technical Reference
Pantz.org Index About Homepage


 ____  _____ _   _ ____  __  __    _    ___ _     
/ ___|| ____| \ | |  _ \|  \/  |  / \  |_ _| |    
\___ \|  _| |  \| | | | | |\/| | / _ \  | || |    
 ___) | |___| |\  | |_| | |  | |/ ___ \ | || |___ 
|____/|_____|_| \_|____/|_|  |_/_/   \_\___|_____|


Making a backup mail server using sendmail.

1. Install sendmail (probally already installed by default). No special
settings needed. 

2. Now we need to generate a sendmail.cf file. THis is done thru m4. The file
m4 generates the .cf file from usually ends in .mc . I use these settings but
their are a ton more that can be used:

OSTYPE(`openbsd')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(local_procmail)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`use_cw_file')dnl

there should be an m4 directory or sendmail directory with info on m4. In the
OSTYPE above I have OpenBSD but you might have something different. You can
find a list on ostypes in the m4 dir. I found mine by doing a "find" on: cf.m4.
This told me exactly where the m4 dir was. Then up or down a few dirs from
there is the "ostypes" dir. Just find yours in that dir and put in the name in
OSTYPE above. Make sure you have procmail installed to use the file above and
dump the lines above into a file called sendmail.mc.

3. Now we use the m4 macro processor to gen the sendmail.cf file. You will need
to know the location of your cf.m4 file to do this. Do a find on this file if
you can't find it. Then execute the command:
m4 /location/of/your/cf.m4 sendmail.mc >sendmail.cf.

4. Now copy the generated sendmail.cf into the /etc/mail dir.

5. The other files you'll need in that dir are:
access,sendmail.cw,virtusertable.

6. put your domains in sendmail.cw (pantz.org) put that file in the /etc dir or
/etc/mail I'm not sure which.


7. On the backup mail server open up sendmail.cf (/etc/sendmail.cf on linux)
and find the line:

# who gets all local email traffic ($R has precedence for unqualified names)
DH


After the DH put the name of the primary mail server who should get the mail
like:

# who gets all local email traffic ($R has precedence for unqualified names)
DHprimary.mail.server

8. On the primary mail server edit the file access (the access database
/etc/mail/access in linux)
 
Add the line to allow the backup mail server to relay mail to it. Example:

backup.mail.server RELAY

9. To change queueing time try these files look for format "QUEUE=20m" or the
like. then restart sendmail.