Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
ea32af1f
Commit
ea32af1f
authored
Aug 25, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
b0d6473c
' into usedialog
Conflicts: setup/start.sh (changes are in questions.sh now)
parents
c18200d9
b0d6473c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
22 deletions
+28
-22
nginx-top.conf
conf/nginx-top.conf
+6
-2
management.sh
setup/management.sh
+1
-9
questions.sh
setup/questions.sh
+7
-1
system.sh
setup/system.sh
+13
-9
zpush.sh
setup/zpush.sh
+1
-1
No files found.
conf/nginx-top.conf
View file @
ea32af1f
## NOTE: This file is automatically generated by Mail-in-a-Box.
## NOTE: This file is automatically generated by Mail-in-a-Box.
## Do not edit this file. It will be replaced each time
## Do not edit this file. It is continually updated by
## Mail-in-a-Box needs to update the web configuration.
## Mail-in-a-Box and your changes will be lost.
##
## Mail-in-a-Box machines are not meant to be modified.
## If you modify any system configuration you are on
## your own --- please do not ask for help from us.
upstream
php
-
fpm
{
upstream
php
-
fpm
{
server
unix
:/
var
/
run
/
php5
-
fpm
.
sock
;
server
unix
:/
var
/
run
/
php5
-
fpm
.
sock
;
...
...
setup/management.sh
View file @
ea32af1f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
source
setup/functions.sh
source
setup/functions.sh
apt_install python3-flask links duplicity libyaml-dev python3-dnspython
unattended-upgrades
apt_install python3-flask links duplicity libyaml-dev python3-dnspython
hide_output pip3
install
rtyaml
hide_output pip3
install
rtyaml
# Create a backup directory and a random key for encrypting backups.
# Create a backup directory and a random key for encrypting backups.
...
@@ -21,14 +21,6 @@ rm -f /etc/init.d/mailinabox
...
@@ -21,14 +21,6 @@ rm -f /etc/init.d/mailinabox
ln
-s
$(
pwd
)
/conf/management-initscript /etc/init.d/mailinabox
ln
-s
$(
pwd
)
/conf/management-initscript /etc/init.d/mailinabox
hide_output update-rc.d mailinabox defaults
hide_output update-rc.d mailinabox defaults
# Allow apt to install system updates automatically every day.
cat
>
/etc/apt/apt.conf.d/02periodic
<<
EOF
;
APT::Periodic::MaxAge "7";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Verbose "1";
EOF
# Perform a daily backup.
# Perform a daily backup.
cat
>
/etc/cron.daily/mailinabox-backup
<<
EOF
;
cat
>
/etc/cron.daily/mailinabox-backup
<<
EOF
;
#!/bin/bash
#!/bin/bash
...
...
setup/questions.sh
View file @
ea32af1f
...
@@ -14,6 +14,12 @@ fi
...
@@ -14,6 +14,12 @@ fi
# The box needs a name.
# The box needs a name.
if
[
-z
"
$PRIMARY_HOSTNAME
"
]
;
then
if
[
-z
"
$PRIMARY_HOSTNAME
"
]
;
then
if
[
-z
"
$DEFAULT_PRIMARY_HOSTNAME
"
]
;
then
if
[
-z
"
$DEFAULT_PRIMARY_HOSTNAME
"
]
;
then
# We recommend to use box.example.com as this hosts name. The
# domain the user possibly wants to use is example.com then.
# We strip the string "box." from the hostname to get the mail
# domain. If the hostname differs, nothing happens here.
DEFAULT_DOMAIN_GUESS
=
$(
echo
$(
get_default_hostname
)
|
sed
-e
's/^box\.//'
)
# This is the first run. Ask the user for his email address so we can
# This is the first run. Ask the user for his email address so we can
# provide the best default for the box's hostname.
# provide the best default for the box's hostname.
input_box
"Your Email Address"
\
input_box
"Your Email Address"
\
...
@@ -25,7 +31,7 @@ or subdomains you control).
...
@@ -25,7 +31,7 @@ or subdomains you control).
\n\n
We've guessed an email address. Backspace it and type in what
\n\n
We've guessed an email address. Backspace it and type in what
you really want.
you really want.
\n\n
Email Address:"
\
\n\n
Email Address:"
\
me@
`
get_default_hostname
`
\
"me@
$DEFAULT_DOMAIN_GUESS
"
\
EMAIL_ADDR
EMAIL_ADDR
if
[
-z
"
$EMAIL_ADDR
"
]
;
then
if
[
-z
"
$EMAIL_ADDR
"
]
;
then
...
...
setup/system.sh
View file @
ea32af1f
...
@@ -11,18 +11,22 @@ hide_output apt-get -y upgrade
...
@@ -11,18 +11,22 @@ hide_output apt-get -y upgrade
# haveged: Provides extra entropy to /dev/random so it doesn't stall
# haveged: Provides extra entropy to /dev/random so it doesn't stall
# when generating random numbers for private keys (e.g. during
# when generating random numbers for private keys (e.g. during
# ldns-keygen).
# ldns-keygen).
# unattended-upgrades: Apt tool to install security updates automatically.
# ntp: keeps the system time correct
# fail2ban: scans log files for repeated failed login attempts and blocks the remote IP at the firewall
apt_install python3 python3-pip wget curl bind9-host haveged
apt_install python3 python3-pip
\
wget curl bind9-host
\
haveged unattended-upgrades ntp fail2ban
# Turn on basic services:
# Allow apt to install system updates automatically every day.
#
# ntp: keeps the system time correct
#
# fail2ban: scans log files for repeated failed login attempts and blocks the remote IP at the firewall
#
# These services don't need further configuration and are started immediately after installation.
apt_install ntp fail2ban
cat
>
/etc/apt/apt.conf.d/02periodic
<<
EOF
;
APT::Periodic::MaxAge "7";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Verbose "1";
EOF
if
[
-z
"
$DISABLE_FIREWALL
"
]
;
then
if
[
-z
"
$DISABLE_FIREWALL
"
]
;
then
# Turn on the firewall. First allow incoming SSH, then turn on the firewall.
# Turn on the firewall. First allow incoming SSH, then turn on the firewall.
...
...
setup/zpush.sh
View file @
ea32af1f
...
@@ -41,7 +41,7 @@ if [ $needs_update == 1 ]; then
...
@@ -41,7 +41,7 @@ if [ $needs_update == 1 ]; then
fi
fi
# Configure default config.
# Configure default config.
sed
-i
"s
/define('TIMEZONE', .*/define('TIMEZONE', 'Etc
\/
UTC');/
"
/usr/local/lib/z-push/config.php
sed
-i
"s
^define('TIMEZONE', .*^define('TIMEZONE', '
$(
cat
/etc/timezone
)
');^
"
/usr/local/lib/z-push/config.php
sed
-i
"s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/"
/usr/local/lib/z-push/config.php
sed
-i
"s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/"
/usr/local/lib/z-push/config.php
# Configure BACKEND
# Configure BACKEND
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment