1. Telnet into the LFS server and log in as an administrative user.
2. Move to a directory where you can safely store files. For example:
3. Using your favorite Linux text editor, create a file called setallspamactions.pl.
4. Within the file, enter the following code:
echo "usage: $prog
if [ -z "$DEFPROB" -o -z "$ACTION" ]; then
if [ "$DEFPROB" != "definite" -a "$DEFPROB" != "probable" ]; then
if [ "$ACTION" != "Mark" \
-a "$ACTION" != "None" \
-a "$ACTION" != "Move" \
-a "$ACTION" != "Delete" ]; then
for u in /home/*; do
echo -n "$user = "
wv set [$DEFPROB spam action]$user=$ACTION
5. Save the file.
Run the script
1. Before running the script, the permissions associated with the file must be changed so that it may be executable. To do this type:
chmod +x setallspamactions.pl
2. Run the script with the setting you wish to set globally. The syntax for running the script is as follows:
./setallspamactions.pl TYPE ACTION
The options for the TYPE of spam detected are definite and probable and the options for the spam treatment ACTION are Mark, None, Move and Delete. Therefore, adjust the script according to your preference. For example, if you would like to have all definite spam deleted from the server, type:
./setallspamactions.pl definite Delete
If you want to move all probable spam, type:
./setallspamactions.pl probable Move
3. The script shows all user accounts in LFS being modified to use the settings you have just set.