codes generated by openai
This commit is contained in:
parent
07ee98ed85
commit
fa63af5597
2
01-install-packages.sh
Normal file
2
01-install-packages.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 01-install-packages.sh
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
02-configure-mariadb.sql
Normal file
2
02-configure-mariadb.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 02-configure-mariadb.sql
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
03-configure-postfix.sh
Normal file
2
03-configure-postfix.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 03-configure-postfix.sh
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
04-configure-dovecot.sh
Normal file
2
04-configure-dovecot.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 04-configure-dovecot.sh
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
05-configure-rspamd.sh
Normal file
2
05-configure-rspamd.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 05-configure-rspamd.sh
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
06-setup-ssl-cert.sh
Normal file
2
06-setup-ssl-cert.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 06-setup-ssl-cert.sh
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
07-install-snappymail.sh
Normal file
2
07-install-snappymail.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 07-install-snappymail.sh
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
08-dns-setup-guide.txt
Normal file
2
08-dns-setup-guide.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for 08-dns-setup-guide.txt
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
56
README.md
56
README.md
@ -1,3 +1,55 @@
|
|||||||
# openai-mailserver
|
|
||||||
|
|
||||||
this is a script generated by openai
|
# 邮件服务器部署文档 / Mail Server Deployment Guide
|
||||||
|
|
||||||
|
## 介绍 / Introduction
|
||||||
|
|
||||||
|
这是一个基于 Ubuntu 22.04 操作系统的邮件服务器部署脚本,包含以下功能:
|
||||||
|
- 使用 Postfix 作为 SMTP 邮件发送服务器
|
||||||
|
- 使用 Dovecot 支持 IMAP/POP3 协议
|
||||||
|
- 使用 MariaDB 管理虚拟邮箱账户
|
||||||
|
- 使用 Rspamd 和 ClamAV 进行反垃圾邮件和病毒扫描
|
||||||
|
- 使用 Let's Encrypt 自动化 SSL 证书配置
|
||||||
|
- 使用 SnappyMail 提供 Webmail 界面
|
||||||
|
- 支持 Nginx 作为 Webmail 和 HTTPS 代理
|
||||||
|
|
||||||
|
This is a mail server deployment script for Ubuntu 22.04, which includes the following features:
|
||||||
|
- Postfix for SMTP mail sending server
|
||||||
|
- Dovecot for IMAP/POP3 mail retrieval protocol
|
||||||
|
- MariaDB for managing virtual mailbox accounts
|
||||||
|
- Rspamd and ClamAV for anti-spam and antivirus scanning
|
||||||
|
- Let's Encrypt for automatic SSL certificate setup
|
||||||
|
- SnappyMail for webmail interface
|
||||||
|
- Nginx for Webmail and HTTPS proxy
|
||||||
|
|
||||||
|
## 部署步骤 / Deployment Steps
|
||||||
|
|
||||||
|
1. 下载压缩包并解压。
|
||||||
|
Download the zip package and unzip it.
|
||||||
|
|
||||||
|
2. 修改配置文件中的参数(如域名、IP 等)。
|
||||||
|
Modify parameters in the configuration files (e.g., domain, IP, etc.).
|
||||||
|
|
||||||
|
3. 运行 `install.sh` 脚本来安装和配置邮件服务器。
|
||||||
|
Run the `install.sh` script to install and configure the mail server.
|
||||||
|
|
||||||
|
4. 配置 DNS 记录(MX、SPF、DKIM、DMARC 等)。
|
||||||
|
Configure DNS records (MX, SPF, DKIM, DMARC, etc.).
|
||||||
|
|
||||||
|
5. 配置和测试 Webmail 界面。
|
||||||
|
Configure and test the webmail interface.
|
||||||
|
|
||||||
|
## 注意事项 / Notes
|
||||||
|
|
||||||
|
- 请确保服务器已连接互联网,并且有公网 IP。
|
||||||
|
Ensure the server is connected to the internet and has a public IP.
|
||||||
|
|
||||||
|
- 配置 TLS 证书时,请确保域名解析已正确指向服务器 IP。
|
||||||
|
When configuring TLS certificates, ensure that the domain resolves correctly to the server IP.
|
||||||
|
|
||||||
|
- 你可以根据需要自定义反垃圾邮件和病毒扫描的规则。
|
||||||
|
You can customize anti-spam and antivirus rules as needed.
|
||||||
|
|
||||||
|
## 许可证 / License
|
||||||
|
|
||||||
|
此项目使用 MIT 许可证。详情请查看 LICENSE 文件。
|
||||||
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
||||||
|
17
mail_server_config.json
Normal file
17
mail_server_config.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"os": "ubuntu_22_04",
|
||||||
|
"public_ip": "99.99.99.99",
|
||||||
|
"domain": "some.com",
|
||||||
|
"dns_control": true,
|
||||||
|
"deployment_method": "native",
|
||||||
|
"smtp_server": "postfix",
|
||||||
|
"imap_pop3_server": "dovecot",
|
||||||
|
"virtual_users": true,
|
||||||
|
"webmail": "snappymail",
|
||||||
|
"ssl": "letsencrypt",
|
||||||
|
"antispam": "rspamd",
|
||||||
|
"antivirus": "clamav",
|
||||||
|
"database": "mariadb",
|
||||||
|
"webserver": "nginx",
|
||||||
|
"maildir_format": "Maildir"
|
||||||
|
}
|
2
utils/postfix-dovecot-sql.cf
Normal file
2
utils/postfix-dovecot-sql.cf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for utils/postfix-dovecot-sql.cf
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
2
utils/ssl-template.conf
Normal file
2
utils/ssl-template.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Jinja2 template for utils/ssl-template.conf
|
||||||
|
# Use '{{ variable }}' for parameter substitution
|
Loading…
Reference in New Issue
Block a user