If you dont like using telnet to test a remote or local smtp server , swaks is a neat little tool to do the job for you.
its also available ( suprise suprise … ) in the freebsd ports : /usr/ports/mail/swaks.
found it first here
1. Allow only specific ip address :
order allow,deny
deny from all
allow from 192.168.1.1
allow from 192.168.1.2
2. Block specific ip address :
order deny,allow
allow from all
deny from 192.168.1.1
deny from 192.168.1.2
you can substitute ip for :
subnet -> deny from 192.168.1.0/24
subnet wild cards -> deny from 192.168.*.*
domain -> deny from domain\.com
you can also combine ip’s on one line:
deny from 192.168.1.1 192.168.2.1
I have recently built a DRBD + Linux HA NFS cluster , part of the structure was to create a drbd disk resource and mount it on /var/lib/nfs. This allows to switch nfs over to the secondary node without getting “stale nfs handle” errors. Heartbeat was having a hardtime doing a clean umount of the file system and ended up rebooting the machine.
Apr 20 06:47:07 fs Filesystem[9823]: [9887]: INFO: No processes on /var/lib/nfs were signalled
Apr 20 06:47:08 fs Filesystem[9823]: [9890]: ERROR: Couldn’t unmount /var/lib/nfs; trying cleanup with SIGKILL
After some poking around the systems It looked like nfs was not showtdown cleanly. looking into the rc script i changed the signal from 2 to 9
From :
stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -2
echo
To :
stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -9
echo
and now, all is well
Apr 20 06:52:49 fs Filesystem[8696]: [8754]: INFO: unmounted /var/lib/nfs successfully
searching the web shows this is a somewhat known issue