curl -sL https://rpm.nodesource.com/setup_12.x | bash - yum install nodejs -y
npm install -g @babel/core @babel/cli @babel/preset-env
npm list -g --depth=0
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
augroup openintab | |
autocmd! | |
autocmd BufAdd,BufNewFile * nested tab sball | |
augroup end | |
cnoreabbrev tn tabnext | |
cnoreabbrev tp tabprevious | |
cnoreabbrev add arga |
INSTALL (https://imanudin.net/2014/09/08/how-to-install-policyd-on-zimbra-8-5/) | |
su - zimbra | |
zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd | |
#Verify apache Zimbra | |
--- | |
rpm qa | grep zimbra-apache-components | |
yum install zimbra-apache-components | |
cd package && rpm -Uvh zimbra-apache-** |
curl -sL https://rpm.nodesource.com/setup_12.x | bash - yum install nodejs -y
npm install -g @babel/core @babel/cli @babel/preset-env
npm list -g --depth=0
#!/bin/bash | |
USERS=$( /opt/zimbra/bin/zmprov -l gaa | grep -Ev 'spam\.|ham\.|virus-quarantine\.|galsync') | |
for account in $USERS | |
do | |
echo -n "Purging ${account} : " | |
/opt/zimbra/bin/zmmailbox -z -m ${account} emptyFolder /Trash | |
/opt/zimbra/bin/zmmailbox -z -m ${account} emptyFolder /Drafts | |
/opt/zimbra/bin/zmmailbox -z -m ${account} emptyFolder /Junk | |
echo "...done" |
# | |
# Este archivo es donde se ponen las reglas para detectar spam via MCP | |
# (Message Content Protection) | |
# | |
# Reglas para SPAMMERS peruanos | |
# | |
# Ponerlo en /etc/mail/spamassassin | |
# | |
# Autor: Alex Celi - alex arroba linux punto org punto pe | |
# http://cipher.pe |
//Fecha actual | |
const date = new Date() | |
//Fecha menos X dias - ejm 1 | |
const day_past = new Date(new Date().getTime() - 1*86400000) | |
//Formato de fechas: | |
const day = '0'.concat(date.getDate()).slice(-2) // dd | |
const month = '0'.concat(date.getMonth() + 1).slice(-2) // mm | |
const year = date.getFullYear() // yyyy |
#!/bin/bash | |
if [ -z $1 ]; then | |
echo "ERROR: Proporcionar el usuario para le reporte" | |
exit 1 | |
fi | |
sender(){ | |
echo "Sender :" | |
/opt/zimbra/libexec/zmmsgtrace -s "^${1}$" /opt/backup/logs/zimbra.log-202* > /tmp/${1} 2> /dev/null |
const validateEmail = email => { | |
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ | |
return re.test(String(email.trim()).toLowerCase()) | |
} | |
const deleteRepeated = (valor, indice, self) => { | |
return self.indexOf(valor.toString()) === indice | |
} | |
//arrray: data.filter(validateEmail).filter(deleteRepeated) |
#WHITELIST | |
whitelist_from *@perulinux.pe | |
whitelist_from *@bcp.com.pe | |
whitelist_from *@scotiabank.com.pe | |
whitelist_from *@verisure.pe | |
whitelist_from *@telefonica.com | |
whitelist_from *@munlima.gob.pe | |
whitelist_from *@alignet.com | |
whitelist_from *@pay-me.com | |
whitelist_from *@perutributario.com.pe |