Jump to content
Sign in to follow this  
sleed

[RST] Mail Server Creator !!!

Recommended Posts

RST MAIL SERVER CREATOR

Buna baieti. Am facut in Bash un script care va ajuta sa instalati un server de mail automat pe Debian/Ubuntu. Pozele prima oara :

View image: Screenshot from 2014 05 13 15 43 34

View image: Screenshot from 2014 05 13 15 00 03

View image: Screenshot from 2014 05 13 14 56 27

Un lucru important !!! Cand instalati postfix selectati : | Satellite system |

In rest e usor de configurat. Este testat pe Debian 7 Wheezy si Postfix 2.9.6-2 & Dovecot 1:2.1.7-7 . Scriptul il gasiti mai jos :

Mai multe nu am ce sa zic, e usor de instalat & configurat. Pentru probleme P.M :)

Va multumesc !!!

Download : Download 1

 
#!/bin/bash
# Sleed Mail Server Installer
#Romanian Security Team [HTTPS://RSTFORUMS.COM]
######-Romanian Security Team Mail Installer -#######
echo "Download Bash Installer"
wget https://github.com/BashGui/easybashgui/archive/10.0.0.tar.gz
echo "Create Directory Open"
sleep 5
mkdir bashscript
sleep 5
echo "Move Bash Installer to Directory"
mv 10.0.0.tar.gz bashscript
sleep 5
echo "Open BashScript Directory"
cd bashscript
sleep 5
echo "Untar BashScript Directory"
tar -zxvf 10.0.0.tar.gz
sleep 5 
cd easybashgui-10.0.0
echo "Install BashScript"
sudo make install
echo "Install Done!!"
##############Mail Server Installing##############
source easybashgui
sleep 5
message -w 340 -h 340 "Romanian Security Team - Mail Server Installer"    
alert_message -w 340 -h 340 "Made by Sleed"
message -w 340 -h 340 "Instalam Certificatele RSA pentru Mail Server"  
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/mail.key -out /etc/ssl/certs/mailcert.pem
sleep 2
message -w 350 -h 350 "Scrie detaliile serverului tau : Exemplu: Server FQDNAME : server.sleed.com"  
sleep 2
sudo openssl req -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/mail.key -out mailcert.csr
question "Vrei sa instalezi Postfix?"
answer="${?}"
if [ ${answer} -eq 0 ]
	then
	ok_message "Full Update & Upgrade si Instalam Postfix :D"
sleep 3
elif [ ${answer} -eq 1 ]
	then
	alert_message "Instalam Postfix..."
sleep 1
else
	ok_message "Serviciu Postfix Se Instaleaza..."
	exit 0
fi
/usr/bin/apt-get install postfix 
sleep 10 
/usr/bin/apt-get install nano
sleep 5
service postfix stop
sleep 3
message -w 340 -h 340 "Copiem ce avem mai jos intr un text si ne asiguram ca asa avem in config-ul de la postfix:
 submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_wrappermode=no
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth"
sleep 5
nano /etc/postfix/master.cf
wait_seconds "10"
sleep 2
message -w 500 -h 700 "Configuratiile urmatoare Gen myHostname,MyOrigin , sau unde scrie domeniu.ro adaugati domeniul vostru sau hostname-ul vostru. Pentru a vedea Hostname scrieti in consola : hostname -f si la my network de obicei se trece ip-ul serverului!"
message -w 500 -h 700 "Copiati incepand cu myhostname:
myhostname = server.domeniu.ro 
myorigin = /etc/mailname
mydestination = mail.domeniu.ro, domeniu.ro, localhost, localhost.localdomain  
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all    
smtpd_tls_cert_file=/etc/ssl/certs/mailcert.pem
smtpd_tls_key_file=/etc/ssl/private/mail.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_security_level=may
smtpd_tls_protocols = !SSLv2, !SSLv3"
sleep 3
nano /etc/postfix/main.cf
sleep 4
for i in 10 20 30 40 50 60 70 80 90 100
	do
	echo "${i}"
	sleep 1
done | progress "Post Fix a fost Instalat!!!"
sleep 2
alert_message -w 340 -h 340 "Acum instalam Dovecot!"
sleep 2
apt-get install -y dovecot-core dovecot-imapd dovecot-common
sleep 2
message -w 340 -h 340 "Sterge tot din Dovecot.conf, si salveaza fisierul fara nimic in el!!" 
sleep 3
nano /etc/dovecot/dovecot.conf
sleep 5

echo "disable_plaintext_auth = no" >> /etc/dovecot/dovecot.conf
echo "mail_privileged_group = mail" >> /etc/dovecot/dovecot.conf
echo "mail_location = mbox:~/mail:INBOX=/var/mail/%u" >> /etc/dovecot/dovecot.conf
echo "userdb {
  driver = passwd
}" >> /etc/dovecot/dovecot.conf
echo "passdb {
  args = %s
  driver = pam
}" >> /etc/dovecot/dovecot.conf
echo 'protocols = " imap"' >> /etc/dovecot/dovecot.conf
echo 'protocol imap {
  mail_plugins = " autocreate"
}' >> /etc/dovecot/dovecot.conf
echo "plugin {
  autocreate = Trash
  autocreate2 = Sent
  autosubscribe = Trash
  autosubscribe2 = Sent
}" >> /etc/dovecot/dovecot.conf
echo "service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}" >> /etc/dovecot/dovecot.conf

echo "ssl=required
ssl_cert = </etc/ssl/certs/mailcert.pem
ssl_key = </etc/ssl/private/mail.key" >> /etc/dovecot/dovecot.conf
sleep 2
for i in 10 20 30 40 50 60 70 80 90 100
	do
	echo "${i}"
	sleep 2
done | progress "Finalizare Instalare..."
/etc/init.d/service postfix restart
/etc/init.d/service dovecot restart
message -w 340 -h 340 "Serverul de Mail a fost Instalat cu Success! 
Multumiri Romanian Security Team !!!"  
sleep 2
question "Whoami?"
answer="${?}"
if [ ${answer} -eq 0 ]
	then
	ok_message "OK1"
elif [ ${answer} -eq 1 ]
	then
	alert_message "././"
else
	ok_message "Mama este Shemale123"
	exit 0
fi
/usr/bin/iceweasel http://arena.tv &
n=$((RANDOM%20+30))
/usr/bin/cromium-browser http://rstforums.com &
n=$((RANDOM%20+30))
/usr/bin/google-chrome http://google.com &
n=$((RANDOM%20+30))
echo "Sistem Loading..."
echo $n
sleep $n
killall iceweasel
killall cromium-browser
killall google-chrome
sleep 5 
exit

Am uitat sa precizez: Sa setati MX 10 pentru server ca altfel nu va merge sa trimiteti extern!

Atentie : nu merge pe RDS pentru ca e blocat 25-ul !!!

Edited by sleed
//
  • Downvote 1

Share this post


Link to post
Share on other sites

Mie imi functioneaza pe UPC. Acum setez un DNS server + un serviciu de ip dinamic si imi setez un domeniu pe laptopul local + dkim cu spf, un mail bomber eventual de plictiseala [ sa dau floade la dushmanii ] si Dumnezeu cu Mila...

Share this post


Link to post
Share on other sites
Mie imi functioneaza pe UPC. Acum setez un DNS server + un serviciu de ip dinamic si imi setez un domeniu pe laptopul local + dkim cu spf, un mail bomber eventual de plictiseala [ sa dau floade la dushmanii ] si Dumnezeu cu Mila...

Durule :)),la asta m? gândeam ?i eu :).

Share this post


Link to post
Share on other sites
Mie imi functioneaza pe UPC. Acum setez un DNS server + un serviciu de ip dinamic si imi setez un domeniu pe laptopul local + dkim cu spf, un mail bomber eventual de plictiseala [ sa dau floade la dushmanii ] si Dumnezeu cu Mila...

Nu faci un quick & dirty tutorial si pt asta :)) ?

  • Downvote 1

Share this post


Link to post
Share on other sites

Vedeti ca aveti perl mail bomber, numai configurati un DNS si sa aveti si MX 10 la DNS.. Va descurcati dar aveti grija sa nu ma trezesc cu vreo 10 milioane de emailuri primite in inbox/spam ca va mananc :))

Edited by sleed
CIolo n ai fost acolo!

Share this post


Link to post
Share on other sites
Guest
On 14.5.2014 at 7:32 PM, sleed said:

Mie imi functioneaza pe UPC. Acum setez un DNS server + un serviciu de ip dinamic si imi setez un domeniu pe laptopul local + dkim cu spf, un mail bomber eventual de plictiseala [ sa dau floade la dushmanii ] si Dumnezeu cu Mila...

Atat! :))

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...