SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
"All-Users" List
Some organizations might find it useful to have a mailing list that all users of the email system are a member of.
Add existing domain users to a list
If you already have users in a domain, here's a shell script that can add all the users to a list. You'll have to modify the variables at the beginning to reflect your site:
#!/bin/sh
listName=<listname>
domain=<domain>
ezmlmBinDir=/usr/local/bin/ezmlm
vpopmailDir=/home/vpopmail
vuserinfoBin=$vpopmailDir/bin/vuserinfo
domainDir=$vpopmailDir/domains/$domain
userList=`"$vuserinfoBin" -n -D "$domain"`
for currentUser in $userList; do
$ezmlmBinDir/ezmlm-sub $domainDir/$listName $currentUser@$domain
done
NOTE: You might need to go through the mailing list subscribers if there are any addresses in the domain that you do not want on the list
Automatically adding new users via onchange
Here's a script that can be implemented via the vpopmail onchange functionality to automatically add/delete users to a mailing list when they are added to or deleted from the domain.
cd /usr/local/bin
wget http://www.dwadson.com/files/scripts/allUsersList.pl
chmod ugo+x allUsersList.pl
Edit /usr/local/bin/allStaffList.pl
and adjust the variables to reflect any differences in your installation, such as the name of the "staff" mailing list.
Once those changes are made, add the allUsersList.pl
script to the onchange
script. Edit /home/vpopmail/etc/onchange
and add:
/usr/local/bin/allUsersList.pl $*
- Log in to post comments
Credits
Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.