This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

Blog About Dedicated Servers

« | »

Disable Majordomo for all sites

Luigi Ramone | 04 September, 2008 14:59

Watching /var/log/maillog, i noticed a lot of spam sent out from my server through majordomo accounts so i chose to disable it in all my sites.

I did a small HOWTO of how to disable all at the same time. This HOWTO is for Linux/Ensim.


HOWTO Begins:

Note: All command must be Logged as root;

1. First of all we have to disable the email alias in all sites.

CODE
ls /home/virtual/ | grep site | while read x; do echo $x; grep -v "majordomo" /home/virtual/$x/fst/etc/aliases > aliases.tmp; mv -f aliases.tmp /home/virtual/$x/fst/etc/aliases; chroot /home/virtual/$x/fst/ newaliases; done;


2. Now we remove user majordomo from site /etc/passwd.

CODE
ls /home/virtual/ | grep site | while read x; do echo $x; grep -v "majordomo" /home/virtual/$x/fst/etc/passwd > passwd.tmp; mv -f passwd.tmp /home/virtual/$x/fst/etc/passwd; done;


3. And now we remove majordomo from site /etc/group

CODE
ls /home/virtual/ | grep site | while read x; do echo $x; grep -v "majordomo" /home/virtual/$x/fst/etc/group > group.tmp; mv -f group.tmp /home/virtual/$x/fst/etc/group; done;


4. Last restart sendmail, I don't know if this is really necessary, but lets do it anyway.

CODE
service sendmail restart

Add comment

Topic

Text

Your name

Your email address (if any)

Your personal page (if any)


authimage




Powered by Boonic, Bloogo & pLog
This Blog does not have any affiliation nor relation with the mentioned companies. All the logotipos, trade names and images are property of the companies that registered them.