domains.to.scan.conf scripts

Lewis Bergman lbergman at abi.tconline.net
Tue Oct 15 20:46:36 IST 2002


Yesterday I made some changes to my mail server that was going to involve a
bit of work on my domains.to.scan.conf file.

I am aliasing a new domain so I needed to take each line and add the same user
with a different domain below it. So, I made a Python script to do this and
remove any duplication found. I don't know perl but it is probably easily
done in that I guess.

The other script is more or less a domains.to.scan.conf management script. It
requires python2.2 (all I have) but only one line uses 2.2 syntax so it
shouldn't be hard to backport.  Here is the usage which pretty much explains
what it does.
Usage:
       dom2scan [user to add] -a [user to add] -d [user to delete] -h help

       Or you may specify the whole email address such as:
                        dom2scan user at this.com

        For whole domains to add rather than the default domain:
                        dom2scan -D [domain to add]

The script will append the domains in the variable "domains" when
the script is called without options and without an "@". It will add as many
entries as listed in the domains var. This script makes a backup before it
writes anything. Some sanity checking is also done on presence/absence of
input. Standard exit codes are output based on those from the standard unix
"useradd" command.

If anyone wants it let me know. Even if it is just to port to perl.
--
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115



More information about the MailScanner mailing list