Turning off catch-alls in Ensim
crankycronos posted this on Jan 27th 2007 at 3:03 pm under Ensim Fixes
Sadly the spammers are winning and they have learned that a lot of servers have catch-alls. That means all mail to a domain (as long as it’s a valid domain) will deliver that spam no matter what. Here is what we do to turn off catch-alls.
wget http://www.customensimbackup.com/download/fix_aliases chmod +x fix_aliases ./fix_aliases
Now we are going to edit the /etc/appliance/customization/virtDomain.sh file so that it doesn’t come back. Here is what mine looks like:
#!/bin/bash
DOMAIN=$1
SITE_ADMIN=$2
LOGFILE="/var/log/virtDomain.log"
NOW=`date -R`
fix_aliases() {
# Fix and add aliases
CMD1="/usr/lib/opcenter/virtualhosting/VirtSiteOperation"
CMD2="/usr/lib/opcenter/sendmail/update_alias"
echo $CMD1 $DOMAIN $CMD2 catch-all | at now +2 minutes
echo -e "$NOW\tAliases configured for $DOMAIN" >> $LOGFILE
}
# modified for fixing the catch-all in aliases
# make sure this is at the very end
fix_aliases
Edit yours, or create it and put that in there. Make sure you make it executable when your finished with your edits.
chmod +x /etc/appliance/customization/virtDomain.sh
