pantz.org banner
Setting up a backup Sendmail server
Posted on 11-26-2003 03:33:00 UTC | Updated on 11-26-2003 03:33:00 UTC
Section: /software/sendmail/ | Permanent Link

Some quick notes on setting up a Sendmail backup server. This one is done using OpenBSD. It's not really a detailed setup. More like notes of what I can remember doing.

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 used the settings below. There 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 following 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 (Ex: example.org) put that file in the /etc dir or /etc/mail I can't remember 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)

9. Add the following line to allow the backup mail server to relay mail to it. Example:

 
backup.mail.server RELAY

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

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

encryption

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

gpg

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

spotify

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemd

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib