This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Write-Output "JOB START" | |
| # Create connection to Master DB | |
| $MasterDatabaseConnection = New-Object System.Data.SqlClient.SqlConnection | |
| $MasterDatabaseConnection.ConnectionString = "Data Source=_DBNAME_.database.windows.net;Initial Catalog=_DBCATALOG_;Integrated Security=False;User ID=_USERDB_;Password=_PASSDB_;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False" | |
| $MasterDatabaseConnection.Open() | |
| Write-Output "CONNECTION OPEN" | |
| # Create command | |
| $MasterDatabaseCommand = New-Object System.Data.SqlClient.SqlCommand |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## This is the mail-log with the activities from=<> (SPAM) to relay | |
| Nov 9 10:22:34 lonquen postfix/cleanup[22653]: 7690E9FE0D: message-id=<20171109132234.7690E9FE0D@mx.mailserver.cl> | |
| Nov 9 10:22:34 lonquen postfix/qmgr[12006]: 7690E9FE0D: from=<>, size=9957, nrcpt=1 (queue active) | |
| Nov 9 10:22:34 lonquen postfix/bounce[22665]: 391CC9FE10: sender non-delivery notification: 7690E9FE0D | |
| Nov 9 10:22:34 lonquen postfix/qmgr[12006]: 391CC9FE10: removed | |
| Nov 9 10:22:42 lonquen postfix/cleanup[22653]: D2E5B9FE0A: message-id=<20171109132242.D2E5B9FE0A@mx.mailserver.cl> | |
| Nov 9 10:22:42 lonquen postfix/qmgr[12006]: D2E5B9FE0A: from=<>, size=9509, nrcpt=1 (queue active) | |
| Nov 9 10:22:42 lonquen postfix/bounce[22665]: 8D1199FE0E: sender non-delivery notification: D2E5B9FE0A | |
| Nov 9 10:22:42 lonquen postfix/qmgr[12006]: 8D1199FE0E: removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # @lolmos - SEP-17. | |
| # POSTFIX with Dovecot. | |
| # Script para crear cuenta de correo POP3 o IMAP | |
| # Primero ejecutar: doveadm pw | |
| # doveadm pw -p $2 | |
| # $1 -> usuario, $2 -> dominio, $3 -> Contraseña | |
| #MOREF='sudo run command against $VAR1 | grep name | cut -c7-' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### PFLOGSUMM - Postfix report ################ | |
| # pflogsumm.pl is designed to provide an over-view of postfix activity, with just enough detail to give the administrator | |
| # a "heads up" for potential trouble spots. | |
| # The following is an over-view of the reports produced: | |
| sudo yum install perl-Date-Calc | |
| cd /usr/local/ | |
| sudo curl -O http://jimsun.linxnet.com/downloads/pflogsumm-1.1.3.tar.gz | |
| sudo tar -xzf pflogsumm-1.1.3.tar.gz | |
| sudo mv pflogsumm-1.1.3 pflogsumm | |
| sudo chmod +x pflogsumm/pflogsumm.pl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @olmosleo | |
| # Leonardo Olmos F. | |
| # 30-AGO-17 | |
| # HTOP compilacion on CentOS 6.x & CentOS 7.x | |
| # AUTO-INSTALL htop tools: | |
| # (Run on root) | |
| # | |
| # git clone https://gist.github.com/bcef33702a4ed858ed38a55a28cd232d.git && cd bcef33702a4ed858ed38a55a28cd232d/ && chmod 755 htop_make_install.sh && ./htop_make_install.sh | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## INSTALACION POSTFIX CON DOVECOT | |
| ## POSTFIX - MULTIPLES DOMINIOS & USUARIOS | |
| ## if ! type -path "dig" > /dev/null 2>&1; then yum install bind-utils -y; fi | |
| # Grupo de usuarios virtuales | |
| groupadd vmail -g 2222 | |
| # Agregamos el usuario (vmail) con el ID 2222 al sistema | |
| useradd vmail -r -g 2222 -u 2222 -d /var/vmail -m -c "mail user" | |
| ## INSTALL POSTFIX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| yum install spamassassin | |
| groupadd spamfilter | |
| useradd -g spamfilter -s /bin/false -d /usr/local/spamassassin spamfilter | |
| chown spamfilter: /usr/local/spamassassin | |
| ## vim /etc/mail/spamassassin/local.cf | |
| ## Required_hits: This determines the filter balance; the lower the score the more aggressive the filter. | |
| # A setting of 5.0 is generally effective for a small organisation or a single user. | |
| # Adjust the strictness score to your organization's needs - a large medical organisation might want to let email items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # (UTC-04:00) Santiago ( Horario de Invierno ) | |
| WEBSITE_TIME_ZONE = 'Pacific SA Standard Time' | |
| ############ WEBSITE_TIME_ZONE = 'Venezuela Standard Time' | |
| # (UTC-03:00) Santiago ( Agosto 12 - Horario de verano ) | |
| WEBSITE_TIME_ZONE = 'Argentina Standard Time' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Tested on Zabbix 3.2.5 (CentOS 6.9 Final) | |
| # first you need install ssmtp and mailx | |
| # sudo yum install ssmtp mailx | |
| # add this script on /usr/lib/zabbix/alertscripts/zabbix-sendmail | |
| # In zabbix you can use {ALERT.SENDTO}, {ALERT.SUBJECT}, {ALERT.MESSAGE} to link the parameters. | |
| to=$1 | |
| subject=$2 | |
| body=$3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "1/5 - Creando jaula del directorio para la cuenta sFTP " $1; | |
| mkdir /srv/ftp/$1 | |
| mkdir /srv/ftp/$1/dt/ | |
| chgrp ftp -R /srv/ftp/$1/dt/ | |
| chmod g+w -R /srv/ftp/$1/dt/ | |