MikeL's FreeBSD howto - add new domain

This is basically a checklist of how to add a new domain. The intent is not to cover everything in detail, merely to point you to each of the tasks that must be performed.
(last update 02-Mar-2005)

Note: Although you can dork with sendmail.cf as I've described below, you're probably better off using m4. Poke around the web, http://www.sendmail.org/ is a good place to start for info. Start with the sample /etc/freebsd.mc. (You'll find other sample .mc files in your /usr/share/sendmail/cf and /usr/src/contrib/sendmail/cf dirs.)
First time only First time and all additional times: Once done By the way, I recommend making a set of scripts to do this, eg. 'sendmail-restart', 'named-restart', and most importantly 'apache-restart'. See my apache hints page (link above) for reasons. Notes:
Sample generic.hosts:
(IP addresses and non-Vintners.Net domains are faked)
;
; generic.hosts - created 13-Jul-2003
; use this for all "generic" customer domains.
;

$TTL 43200

@		IN	SOA	ns2.vintners.net. hostmaster.vintners.net.  (
				200312190	; Serial yyyymmddx
				21600	; Refresh	6hrs
				900	; Retry		15min
				3600000	; Expire
				43200 )	; Minimum
;
		IN	NS	ns2.vintners.net.
		IN	NS	ns1.example.com.
		IN	MX	10 mail.vintners.net.
		IN	MX	20 ns1.example.com.

		IN	A	0.0.0.4

ftp		IN	A	0.0.0.4
www		IN	A	0.0.0.4
smtp		IN	A	0.0.0.4
pop3		IN	A	0.0.0.4
mail		IN	A	0.0.0.4
imap		IN	A	0.0.0.4
brix		IN	A	0.0.0.4
oechsle		IN	A	0.0.0.5
ns2		IN	A	0.0.0.4
ns1		IN	A	0.0.0.5

Copyright © 1995-2024 Mike Lempriere (running on host bayanus)