镜像组成

镜像采用的是iRedMail开源电子邮件解决方案,这个方案中有多个与电子邮件相关的开源组件,主要包括:

版本说明

软件名称软件版本软件简介
Postfix2.10.1Postfix 是一种电子邮件服务器
Dovecot2.2.32Dovecot 是一个开源的 IMAP 和 POP3
Nginx1.12.2Nginx是一个高性能的HTTP和反向代理服务,也是一个IMAP/POP3/SMTP服务
MariaDB15.1MariaDB数据库管理系统
mlmmj1.1MLMMJ是一个简单而简明的邮件列表管理器
Amavisd-new2.11.1Amamisd-new是开源中最流行的反垃圾和反病毒软件
SpamAssassin3.4.0SpamAssassin是一种安装在邮件服务器上的邮件过滤器,用来辨识垃圾信
ClamAV0.100.2/25113ClamAV是一种用于检测木马、病毒、恶意软件和其他恶意威胁的开源反病毒引擎。
Roundcube1.3.6RoundCube Webmail是一个基于浏览器,支持多国语言的IMAP客户端
SOGo Groupware4.0.4群件服务器
Fail2ban0.9.7lLinux系统防暴力破解工具
iRedAPD2.2iRedAPD是一个简单的Postfix策略服务器
netdata1.10.0Linux系统性能实时监控平台
iRedAdmin0.9.1iRedAdmin是一个邮件用户管理面版

网络和端口

本邮件服务器需要用到的端口包括:

服务名端口
Postfix25,587
Dovecot993,995,110,143
Nginx80,443

以上端口需要设置好安全组,并且向云产商申请解封25端口

目录路径

邮箱配置完成之后,请使用SFTP到服务器,下载 /root/iRedMail/iRedMail.tips文件,它包含了:

  • 各个 web 程序的访问地址(URL),用户名和密码。
  • 各个组件的配置文件路径
  • 以及其它一些重要和敏感信息

下面摘录一部分重要的配置信息:

  • SSL cert keys:

    • /etc/pki/tls/certs/iRedMail.crt
    • /etc/pki/tls/private/iRedMail.key
  • Mail Storage:

    • Mailboxes: /var/vmail/vmail1
    • Mailbox indexes:
    • Global sieve filters: /var/vmail/sieve
    • Backup scripts and backup copies: /var/vmail/backup
  • Nginx:

    • Configuration files:
      • /etc/nginx/nginx.conf
      • /etc/nginx/sites-available/00-default.conf
      • /etc/nginx/sites-available/00-default-ssl.conf
    • Directories:
      • /etc/nginx
      • /var/www/html
    • See also:
      • /var/www/html/index.html
  • MySQL:

    • Config file: /etc/my.cnf
    • RC script: /etc/init.d/mariadb
  • Backup MySQL database:

    • Script: /var/vmail/backup/backup_mysql.sh
  • Postfix:

    • Configuration files:

      • /etc/postfix
      • /etc/postfix/aliases
      • /etc/postfix/main.cf
      • /etc/postfix/master.cf
    • SQL/LDAP lookup config files:

      • /etc/postfix/mysql
  • Dovecot:

    • Configuration files:
      • /etc/dovecot/dovecot.conf
      • /etc/dovecot/dovecot-ldap.conf (For OpenLDAP backend)
      • /etc/dovecot/dovecot-mysql.conf (For MySQL backend)
      • /etc/dovecot/dovecot-pgsql.conf (For PostgreSQL backend)
      • /etc/dovecot/dovecot-used-quota.conf (For real-time quota usage)
      • /etc/dovecot/dovecot-share-folder.conf (For IMAP sharing folder)
    • Syslog config file:
      • /etc/rsyslog.d/1-iredmail-dovecot.conf (present if rsyslog >= 8.x)
    • RC script: /etc/init.d/dovecot
    • Log files:
      • /var/log/dovecot/dovecot.log
      • /var/log/dovecot/sieve.log
      • /var/log/dovecot/lmtp.log
      • /var/log/dovecot/lda.log (present if rsyslog >= 8.x)
      • /var/log/dovecot/imap.log (present if rsyslog >= 8.x)
      • /var/log/dovecot/pop3.log (present if rsyslog >= 8.x)
      • /var/log/dovecot/sieve.log (present if rsyslog >= 8.x)
    • See also:
      • /var/vmail/sieve/dovecot.sieve
      • Logrotate config file: /etc/logrotate.d/dovecot
  • ClamAV:

    • Configuration files:
      • /etc/clamd.d/amavisd.conf
      • /etc/freshclam.conf
      • /etc/logrotate.d/clamav
    • RC scripts:
      + /etc/init.d/clamd@amavisd
      + /etc/init.d/freshclamd
  • Amavisd-new:

    • Configuration files:
      • /etc/amavisd/amavisd.conf
      • /etc/postfix/master.cf
      • /etc/postfix/main.cf
    • RC script:
      • /etc/init.d/amavisd
  • iRedAPD - Postfix Policy Server:

    • Version: 2.2
    • Listen address: 127.0.0.1, port: 7777
    • Configuration file:
      • /opt/iredapd/settings.py
    • Related files:
      • /opt/iRedAPD-2.2
      • /opt/iredapd (symbol link to /opt/iRedAPD-2.2
  • iRedAdmin - official web-based admin panel:

  • Roundcube webmail: /var/www/roundcubemail-1.3.6

  • SOGo Groupware:

    • Web access: httpS://mail.websoft9.cn/SOGo/
    • Main config file: /etc/sogo/sogo.conf
    • Nginx template file: /etc/nginx/templates/sogo.tmpl
    • See also:
      • cron job of system user: sogo
  • netdata (monitor):

    • Config files:
      • All config files: /opt/netdata/etc/netdata
      • Main config file: /opt/netdata/etc/netdata/netdata.conf
      • Modified modular config files:
        • /opt/netdata/etc/netdata/python.d/mysql.conf
        • /opt/netdata/etc/netdata/python.d/postgres.conf
    • HTTP auth file (if you need a new account to access netdata, please
      update this file with command like 'htpasswd' or edit manually):
      • /etc/nginx/netdata.users
    • Log directory: /opt/netdata/var/log/netdata