Subversion Repositories ALCASAR

Rev

Rev 3053 | Rev 3070 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3053 Rev 3062
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 3053 2022-08-09 22:44:43Z rexy $
2
#  $Id: alcasar.sh 3062 2022-08-19 23:31:03Z rexy $
3
 
3
 
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
4
# ALCASAR is a Free and open source NAC (Network Access Controler) created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, lighttpd, php, netfilter, e2guardian, ntpd, openssl, dnsmasq, unbound, gammu, clamav, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
5
# ALCASAR is based on a stripped Mageia (LSB) with the following open source softwares Coovachilli, freeradius, mariaDB, lighttpd, php, netfilter, e2guardian, ntpd, openssl, dnsmasq, unbound, gammu, clamav, Ulog, fail2ban, vnstat, wkhtml2pdf, ipt_NETFLOW, NFsen and NFdump
6
# contact : info@alcasar.net
6
# contact : info@alcasar.net
7
 
7
 
Line 2132... Line 2132...
2132
##                       "mail_service"                         ##
2132
##                       "mail_service"                         ##
2133
## - Install Postfix conf for email registration method         ##
2133
## - Install Postfix conf for email registration method         ##
2134
##################################################################
2134
##################################################################
2135
mail_service()
2135
mail_service()
2136
{
2136
{
-
 
2137
	[ -e /etc/php.d/05_mail.ini.default ] || cp /etc/php.d/05_mail.ini /etc/php.d/05_mail.ini.default
-
 
2138
	$SED "s?^mail.add_x_header =.*?mail.add_x_header = Off?g" /etc/php.d/05_mail.ini
2137
	[ -e /etc/postfix/main.cf.orig ] || cp /etc/postfix/main.cf /etc/postfix/main.cf.orig
2139
	[ -e /etc/postfix/main.cf.orig ] || cp /etc/postfix/main.cf /etc/postfix/main.cf.orig
-
 
2140
	$SED "s?^inet_protocols =.*?inet_protocols = ipv4?g" /etc/postfix/main.cf
-
 
2141
	$SED "s?^smtp_tls_security_level =.*?smtp_tls_security_level = encrypt?g" /etc/postfix/main.cf	
2138
	cat << EOT >> /etc/postfix/main.cf
2142
	cat << EOT >> /etc/postfix/main.cf
-
 
2143
smtp_use_tls = yes
-
 
2144
smtp_tls_wrappermode = yes
2139
smtp_sasl_auth_enable = yes
2145
smtp_sasl_auth_enable = yes
2140
smtp_sasl_security_options = noanonymous
2146
smtp_sasl_security_options = noanonymous
2141
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
2147
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
2142
relayhost =
2148
relayhost =
2143
myhostname = $HOSTNAME.$DOMAIN
2149
myhostname = $HOSTNAME.$DOMAIN
2144
smtp_tls_wrappermode = yes
-
 
2145
EOT
2150
EOT
2146
	chown -R postfix:postfix /var/lib/postfix
2151
	chown -R postfix:postfix /var/lib/postfix
2147
	$SED "s?^inet_protocols =.*?inet_protocols = ipv4?g" /etc/postfix/main.cf
-
 
2148
} # end of mail_service
2152
} # end of mail_service
2149
 
2153
 
2150
##################################################################
2154
##################################################################
2151
##                    Fonction "post_install"                   ##
2155
##                    Fonction "post_install"                   ##
2152
## - Modifying banners (locals et ssh) & prompts                ##
2156
## - Modifying banners (locals et ssh) & prompts                ##