mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-26 02:57:04 +00:00
16 lines
415 B
Bash
16 lines
415 B
Bash
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', '`doveadm pw -s SHA512-CRYPT -p $EMAIL_PW`');" \
|
|
| sqlite3 $STORAGE_ROOT/mail/users.sqlite
|
|
|