- bump release - add default admin user/pass - change http service to listen on all interfaces
59 lines
1.3 KiB
Bash
59 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Create default configuration if it doesn't exist
|
|
if [ ! -f /opt/stalwart/etc/config.toml ]; then
|
|
cat > /opt/stalwart/etc/config.toml << 'EOF'
|
|
# Stalwart Mail Server Configuration with FoundationDB
|
|
# This is a minimal configuration file. Please customize according to your needs.
|
|
# Full documentation: https://stalw.art/docs/
|
|
|
|
[server]
|
|
hostname = "localhost"
|
|
|
|
[server.listener.smtp]
|
|
bind = ["127.0.0.1:25"]
|
|
protocol = "smtp"
|
|
|
|
[server.listener.submission]
|
|
bind = ["127.0.0.1:587"]
|
|
protocol = "smtp"
|
|
|
|
[server.listener.imap]
|
|
bind = ["127.0.0.1:143"]
|
|
protocol = "imap"
|
|
|
|
[server.listener.http]
|
|
bind = ["[::]:8080"]
|
|
protocol = "http"
|
|
|
|
[storage]
|
|
data = "foundationdb"
|
|
fts = "foundationdb"
|
|
blob = "fs"
|
|
lookup = "foundationdb"
|
|
directory = "internal"
|
|
|
|
[store."foundationdb"]
|
|
type = "foundationdb"
|
|
cluster = "/etc/foundationdb/fdb.cluster"
|
|
|
|
[store."fs"]
|
|
type = "fs"
|
|
path = "/var/lib/stalwart/blobs"
|
|
|
|
[directory."internal"]
|
|
type = "internal"
|
|
store = "foundationdb"
|
|
|
|
[authentication.fallback-admin]
|
|
user = "admin"
|
|
secret = "$6$PAEtTGE/jbt9B/FQ$lYXn/whSh7rzegMdA6W8vuw2E/3IDFjpb0edXRqrl1d8i2KQF6Qm.ESmZ3j5jIHCTPSIH3JYBvIgvIbk9sH3p1"
|
|
EOF
|
|
|
|
chown stalwart:stalwart /opt/stalwart/etc/config.toml
|
|
chmod 600 /opt/stalwart/etc/config.toml
|
|
fi
|
|
|
|
# Reload systemd
|
|
systemctl daemon-reload
|