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
c869f67e
Commit
c869f67e
authored
Aug 26, 2013
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ask the user for inputs
parent
8ac35be2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
19 deletions
+51
-19
add_mail_user.sh
scripts/add_mail_user.sh
+15
-0
index.sh
scripts/index.sh
+0
-6
mail.sh
scripts/mail.sh
+2
-2
mail_testuser.sh
scripts/mail_testuser.sh
+0
-3
start.sh
scripts/start.sh
+30
-0
system.sh
scripts/system.sh
+4
-8
No files found.
scripts/add_mail_user.sh
0 → 100644
View file @
c869f67e
EMAIL_ADDR
=
$1
if
[
-z
"
$EMAIL_ADDR
"
]
;
then
echo
echo
"Set up your first email account..."
read
-e
-i
"user@
`
hostname
`
"
-p
"Email Address: "
EMAIL_ADDR
fi
EMAIL_PW
=
$2
if
[
-z
"
$EMAIL_PW
"
]
;
then
read
-e
-p
"Email Password: "
EMAIL_PW
fi
echo
"INSERT INTO users (email, password) VALUES ('
$EMAIL_ADDR
', '
`
sudo
doveadm pw
-s
SHA512-CRYPT
-p
$EMAIL_PW
`
');"
\
| sqlite3
$STORAGE_ROOT
/mail/users.sqlite
scripts/index.sh
deleted
100644 → 0
View file @
8ac35be2
.
scripts/system.sh
.
scripts/dns.sh
.
scripts/mail.sh
.
scripts/dkim.sh
.
scripts/dns_update.sh
scripts/mail.sh
View file @
c869f67e
...
...
@@ -6,12 +6,12 @@
# Install packages.
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-q
-y
\
postfix postgrey dovecot-core dovecot-imapd dovecot-lmtpd dovecot-sqlite
postfix postgrey dovecot-core dovecot-imapd dovecot-lmtpd dovecot-sqlite
sqlite3
# POSTFIX
mkdir
-p
$STORAGE_ROOT
/mail
# TLS configuration
sed
-i
"s/#submission/submission/"
/etc/postfix/master.cf
# enable submission port (not in Drew Crawford's instructions)
tools/editconf.py /etc/postfix/main.cf
\
...
...
scripts/mail_testuser.sh
deleted
100644 → 0
View file @
8ac35be2
# Create a test user: testuser@testdomain.com with password "testpw"
echo
"INSERT INTO users (email, password) VALUES ('testuser@testdomain.com', '
`
sudo
doveadm pw
-s
SHA512-CRYPT
-p
testpw
`
');"
| sqlite3 storage/mail/users.sqlite
scripts/start.sh
0 → 100755
View file @
c869f67e
if
[
-z
"
$PUBLIC_HOSTNAME
"
]
;
then
echo
echo
"Enter the hostname you want to assign to this machine."
echo
"We've guessed a value. Just backspace it if it's wrong."
echo
"Josh uses box.occams.info as his hostname. Yours should"
echo
"be similar."
read
-e
-i
"
`
hostname
`
"
-p
"Hostname: "
PUBLIC_HOSTNAME
fi
if
[
-z
"
$PUBLIC_IP
"
]
;
then
echo
echo
"Enter the public IP address of this machine, as given to"
echo
"you by your ISP. We've guessed a value, but just backspace"
echo
"it if it's wrong."
read
-e
-i
"
`
hostname
-i
`
"
-p
"Public IP: "
PUBLIC_IP
fi
if
[
-z
"
$STORAGE_ROOT
"
]
;
then
if
[
!
-d
/home/user-data
]
;
then
useradd
-m
user-data
;
fi
STORAGE_ROOT
=
/home/user-data
fi
.
scripts/system.sh
.
scripts/dns.sh
.
scripts/mail.sh
.
scripts/dkim.sh
.
scripts/spamassassin.sh
.
scripts/dns_update.sh
.
scripts/add_mail_user.sh
.
scripts/users_update.sh
scripts/system.sh
View file @
c869f67e
...
...
@@ -3,10 +3,6 @@
apt-get
-q
update
apt-get
-q
-y
upgrade
# Basic packages.
apt-get
-q
-y
install
sqlite3
# Turn on basic services:
#
# ntp: keeps the system time correct
...
...
@@ -19,10 +15,10 @@ apt-get install -q -y ntp fail2ban
# Turn on the firewall. First allow incoming SSH, then turn on the firewall. Additional open
# ports will be set up in the scripts that set up those services.
ufw allow ssh
#ufw allow http
#ufw allow https
ufw
--force
enable
if
[
-z
"
$DISABLE_FIREWALL
"
]
;
then
ufw allow ssh
;
ufw
--force
enable
;
fi
# Mount the storage volume.
export
STORAGE_ROOT
=
/home/ubuntu/storage
...
...
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