Zimbra server is configured to avoid relay access. But, I see a lot of tries to do this.So, I decided to use Fail2ban to block this hosts.The enviroment that I have installed the Zimbra Mail Server is:CentOS 6.4 x64EPEL and RPMForge repositoriesZimbra 7First, we install Fail2ban service:# yum install fail2banAfter, we create a filter:# vi /etc/fail2ban/filter.d/zimbra-relay.confContent:[Definition]failregex = \[(?P\S*)\]: 554 5\.7\.1Finally, we enable the filter in jail.conf file adding the following lines:[zimbra-relay]enabled = truefilter = zimbra-relaylogpath = /var/log/zimbra.logaction = iptables-allports[name = zimbra-relay]maxretry = 3bantime = 2800Restart the service:# service fail2ban restart That's all folks. Esta configuracao foi executada no Mailcleaner versoes 05 e 06 de 2012 Community.Apos ter efetuado o registro no site atraves do link http://www.barracudacentral.org/account/register, logue no servidor Mailcleaner instalado e crie o arquivo BARRACUDA.cf com o seguinte conteudo:name=BARRACUDAtype=IPRBLdnsname=b.barracudacentral.orgsublist=127.0.0.\d+,BARRACUDA,barracuda listDepois de criado o arquivo, mova-o para o diretorio /usr/mailcleaner/etc/rbls/Edite o arquivo /usr/mailcleaner/etc/mailscanner/dnsblacklists.conf, adicionando a seguinte linha:BARRACUDA b.barracudacentral.orgAcesse a interface web, va em Configuration, Anti-Spam e ira aparecer bl.barracuda.org para ser habilitada. Adicionar a linha:. /etc/rc.d/init.d/rc.localAntes do comando echo.Crie o arquivo /etc/rc.d/init.d/rc.local.# vi /etc/rc.d/init.d/rc.local#!/bin/shexit 0Dentro desse arquivo, voce pode colocar o caminho completo do script que deseja iniciar no boot.Sempre no final do arquivo, tem que ser um "exit 0". Nao se esqueca! This script do a backup of only one day. This way, we can do incremental backups.Pay attention to variables DOMAINS, ADMIN and PASSWDSorry by my english.Hope that could be understandable. #!/bin/bash# Incremental backup from Zimbra based in date. # Create the backup folder with the actual date and create files tgz with emails of before day.## Marcio Jose Atanasio # marcio.jose@atanasio.com.br## Version 20131008# LOCALBCKDIR="/opt/zimbra/backup"LOGFILE="/var/log/zmbackupin.log"# Mount CIFS REMOTE_BACKUP="0"MNTREMOTE=""USER=""MNTPASSWD=""# Use "all" to backup all domains accounts or put the domains that you want backup with space between.DOMAINS="YOURDOMAIN.COM.BR"# Administrator LoginZIMBRAURL="https://127.0.0.1"ADMIN="admin"PASSWD="xxxxxxx"ZMBACKUPPREFIX="INC"RETENTION="5"# ENVIROMENT DT=`date +%Y"-"%m"-"%d`DTBCK=`date -d "-2 days" +%m"/"%d"/"%Y`function put_logger { echo `date +%Y"-"%m"-"%d" - "%H":"%M`" - $1" >> $LOGFILE}function purge_old { find $BCKDIR/*$ZMBACKUPPREFIX -type d -mtime +$RETENTION -exec rm -rf {} \;}function backup_dir { if [ "$1" = "mount" ]; then if [ "$REMOTE_BACKUP" = "1" ]; then /bin/mount.cifs $MNTREMOTE $BCKDIR -o user=$USER,password=$MNTPASSWD if [ "$?" = "0" ]; then put_logger "Mount of $MNTREMOTE sucessfull." else put_logger "Mount of $MNTREMOTE fail. Backup failed." exit 0 fi fi if [ -d $BCKDIR/$DT-$ZMBACKUPPREFIX ]; then rm -rf $BCKDIR/$DT-$ZMBACKUPPREFIX fi /bin/mkdir $BCKDIR/$DT-$ZMBACKUPPREFIX > /dev/null 2>&1 fi if [ "$1" = "umount" ]; then if [ "$REMOTE_BACKUP" = "1" ]; then /bin/umount $BCKDIR put_logger "Unmount of $MNTREMOTE sucessfull." fi fi}function get_domains { if [ "$DOMAINS" = "all" ]; then DOMAINS=`/opt/zimbra/bin/zmprov gad | sort` echo $DOMAINS | sed s/" "/"\n"/g >> $BCKDIR/$DT-$ZMBACKUPPREFIX/domains.txt fi put_logger "Domain lists from $DOMAINS saved."}function get_lists { for DOM in `echo $DOMAINS`; do for LST in `/opt/zimbra/bin/zmprov gadl $DOM` ; do echo "Lista "$LST >> $BCKDIR/$DT-$ZMBACKUPPREFIX/$DOM.lists.txt echo "/opt/zimbra/bin/zmprov gdl $LST | grep zimbraMailForwardingAddress | cut -d" " -f2 >> $BCKDIR/$DT-$ZMBACKUPPREFIX/$DOM.lists.txt" echo "" >> $BCKDIR/$DT-$ZMBACKUPPREFIX/$DOM.lists.txt done put_logger "Distribuition list from $DOM saved." done}function backup_accounts_aliases { for DOM in `echo $DOMAINS`; do put_logger "Stated backup of account and alias from $DOM." for ACC in `/opt/zimbra/bin/zmprov -l gaa $DOM | sort`; do wget -q -t 1 -T