myvemail/README.md
2024-04-23 18:53:44 -06:00

67 lines
2.1 KiB
Markdown

# MyveMail
All-in-one bash script to install your own personal mail server with Postfix mail transfer agent, Dovecot mail delivery agent, MariaDB database and Nginx web server. Webmail client is provided by [Roundcube](https://github.com/roundcube/roundcubemail) and management is provided by [PostfixAdmin](https://github.com/postfixadmin/postfixadmin). Mail domain services include OpenDKIM and OpenDMARC.
*Note: ISP must have SMTP Port 25 open.*
## :: Pre-installation
Update your DNS registry to reflect the following records
```
# MX Record
@ 300 IN MX 0 ${subdomain}.${domain}.
# A Record
${subdomain} 300 IN A ${server-ip-address}
# TXT Records
@ 300 IN TXT "v=spf1 mx ~all"
${subdomain} 300 IN TXT "v=spf1 a ~all"
_dmarc 300 IN TXT "v=DMARC1; p=none; pct=100; fo=1; rua=mailto:dmarc@${domain}"
default._domainkey 300 IN TXT "v=DKIM1; h=sha256; k=rsa; p=${opendkim-key}"
# CNAME Records
autoconfig 300 IN CNAME ${subdomain}.${domain}.
autodiscover 300 IN CNAME ${subdomain}.${domain}.
```
Example entries:
```
server-ip-address= # Host IPv4 address
subdomain=mail
domain=website.com
opendkim-key= # Provided by mail.sh
```
## :: Installation
Download mail.sh and run it in the terminal:
```
wget https://git.myvelabs.com/lab/mail/src/branch/master/mail.sh
bash mail.sh
```
OR
```
curl -L -O https://git.myvelabs.com/lab/mail/src/branch/master/mail.sh
bash mail.sh
```
OR
```
git clone https://git.myvelabs.com/lab/mail.git
cd mail/
bash mail.sh
```
The following flags are available:
```
-u, --user Unix username
-p, --port SSH port
-d, --domain Domain name (eg, mail.web.com)
-m, --mail-user Mail username
```
Follow the prompts and you'll have a working webmail upon reboot.
## :: Post-installation
Once the server comes back online, services can be accessed through:
```
Roundcube: https://${subdomain}.${domain}/ (eg, https://mail.website.com/)
PostfixAdmin: https://${subdomain}.${domain}/admin/ (eg, https://mail.website.com/admin/)
```