View previous topic :: View next topic |
Author |
Message |
wizy Tux's lil' helper
Joined: 26 May 2002 Posts: 133
|
Posted: Wed Jun 19, 2002 3:04 pm Post subject: Script: relay for qmail |
|
|
Another very very simple little script, but still helpfull.
This script takes an ip as an argument (or not). If you dont specify an ip it just rebuilds your /etc/tcp.smtp.cdb from the current /etc/tcp.smtp
If you do specify an ip, it adds that ip to the /etc/tcp.smtp file with relay access then rebuilds the /etc/tcp.smtp.cdb database.
I just named this relay and use it when adding friends or people I trust with relay access through my qmail smtp server.
Code: |
# Add a relay enabled ip to the tcp.smtp.cbd database
# 6/19/02
if [ "$1" != "" ]; then
echo "$1:allow,RELAYCLIENT=\"\"" >> /etc/tcp.smtp
fi
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
|
Usage is very simple (here are some examples):
to rebuild the database based on the current file just:
relay
To add the ip 127.0.0.1 as a relay enabled ip and then rebuild:
relay 127.0.0.1
To add the whole 192.168.0 class of ips:
relay 192.168.0.
(notice the trailing . it doesnt require *) |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|