vi /etc/selinux/config
: SELINUX=disabled
HOSTNAME=iredmail.ichiayi.com
127.0.0.1 iredmail.ichiayi.com iredmail localhost localhost.localdomain
iredmail.ichiayi.com
sync;sync;sync;reboot
su - root yum install wget bzip2 cd /root/ wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.9.tar.bz2 tar xjf iRedMail-0.9.9.tar.bz2 cd /root/iRedMail-0.9.9/ bash iRedMail.sh
sync;sync;sync;reboot
hostname -f
是否能夠正確出現標準 FQDN 格式 Exp. iredmai.ichiayi.com
IREDMAIL_EPEL_MIRROR='http://mirrors.aliyun.com/epel' IREDMAIL_MIRROR='https://dl.iredmail.org' bash iRedMail.sh
postconf -e message_size_limit=31457280 systemctl restart postfix
SMTPRecipientsRefused: {'xxx@xxx': (554, '5.7.1 <xxx@xxx>: Recipient address rejected: Sender is not same as SMTP authenticate username')}
systemctl restart iredapd
yum install imapsync
imapsync --host1 mail.ichiayi.com --user1 jonathan --passfile1 /root/sync_info/jonathan --host2 192.168.11.236 --user2 jonathan --passfile2 /root/sync_info/jonathan
Err 1/2: Could not create folder [from Albert/&ZbBbomI2--Data/INDIA/ABC.] from [from Albert/&ZbBbomI2--Data/INDIA/ABC.]: 38252 NO [CANNOT] Character not allowed in mailbox name: '.' (0.001 + 0.000 secs). :
su - root mkdir -p 0.9.9 cd 0.9.9 wget -O iRedAPD-5.0.2.tar.gz https://github.com/iredmail/iRedAPD/archive/5.0.2.tar.gz tar zxf iRedAPD-5.0.2.tar.gz cd iRedAPD-5.0.2/tools/ bash upgrade_iredapd.sh
查看更新紀錄
tail -500 /var/log/iredapd/iredapd.log
cd /root/0.9.9 wget https://dl.iredmail.org/yum/misc/iRedAdmin-1.3.tar.gz tar zxvf iRedAdmin-1.3.tar.gz cd iRedAdmin-1.3/tools/ bash upgrade_iredadmin.sh
cd /root/0.9.9 wget https://github.com/iredmail/mlmmjadmin/archive/3.1.2.tar.gz tar zxf 3.1.2.tar.gz cd mlmmjadmin-3.1.2/tools/ bash upgrade_mlmmjadmin.sh
cd /root/0.9.9 wget https://github.com/roundcube/roundcubemail/releases/download/1.4.11/roundcubemail-1.4.11-complete.tar.gz tar xf roundcubemail-*.tar.gz cd roundcubemail-* bin/installto.sh /var/www/roundcubemail
如果無法執行 /bin/installto.sh 可能要檢查 /etc/php.ini 內是否關閉 system 的命令使用
wget https://github.com/netdata/netdata/releases/download/v1.12.0/netdata-v1.12.0.gz.run chmod +x netdata-*.gz.run ./netdata-*.gz.run --accept
vi /etc/nginx/templates/roundcube.tmpl
: location ~ ^/mail/(bin|config|installer|logs|SQL|temp|vendor)($|/.*) { deny all; } : location ~ ^/mail/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)($|.*) { deny all; } : location ~ ^/mail/plugins/.*/config.inc.php.* { deny all; } : location ~ ^/mail/plugins/enigma/home($|/.*) { deny all; } :
vi /etc/nginx/templates/roundcube-subdomain.tmpl
: location ~ ^/(bin|config|installer|logs|SQL|temp|vendor)/.* { deny all; } : location ~ ^/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)$ { deny all; } : location ~ ^/plugins/.*/config.inc.php.* { deny all; } : location ~ ^/plugins/enigma/home($|/.*) { deny all; } :
cd /usr/bin/ wget -O mlmmj-amime-receive https://raw.githubusercontent.com/iredmail/iRedMail/master/samples/mlmmj/mlmmj-amime-receive chown mlmmj:mlmmj mlmmj-amime-receive chmod 0550 mlmmj-amime-receive
vi /etc/amavisd/amavisd.conf
: $policy_bank{'MLMMJ'} = { ... forward_method => 'smtp:[127.0.0.1]:10028', }; :
vi /etc/postfix/master.cf
: 127.0.0.1:10028 inet n - n - - smtpd -o syslog_name=postfix/10028 -o content_filter= -o mynetworks_style=host -o mynetworks=127.0.0.1 -o local_recipient_maps= -o relay_recipient_maps= -o strict_rfc821_envelopes=yes -o smtp_tls_security_level=none -o smtpd_tls_security_level=none -o smtpd_restriction_classes= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_end_of_data_restrictions= -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
systemctl restart postfix systemctl restart amavisd
cd /var/vmail/backup/ wget -O backup_sogo.sh https://raw.githubusercontent.com/iredmail/iRedMail/master/tools/backup_sogo.sh chown root backup_sogo.sh chmod 0400 backup_sogo.sh
cd /root/0.9.9 wget -O iredmail.mysql https://raw.githubusercontent.com/iredmail/iRedMail/master/update/0.9.9/iredmail.mysql mysql vmail < iredmail.mysql
vi /etc/dovecot/dovecot-mysql.conf
: user_query = SELECT \ ... LOWER(CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir)) AS home, \ CONCAT(mailbox.mailboxformat, ':~/', mailbox.mailboxfolder, '/') AS mail, \ ... :
systemctl restart dovecot
vi /etc/iredmail-release
0.9.9 #0.9.8 MARIADB edition. :
systemctl stop netdata systemctl disable netdata
vi /etc/mail/spamassassin/init.pre
: #loadplugin Mail::SpamAssassin::Plugin::SPF :
systemctl restart amavisd
systemctl start amavisd systemctl enable amavisd
mysql -u root -p USE vmail; select isadmin,isglobaladmin from mailbox where username = '[email protected]'; UPDATE mailbox SET isadmin=1, isglobaladmin=1 WHERE username = '[email protected]'; INSERT INTO domain_admins (username, domain) VALUES ('[email protected]', 'ALL');
mysql -u root -p MariaDB [(none)]> USE vmail; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [vmail]> select isadmin,isglobaladmin from mailbox where username = '[email protected]'; +---------+---------------+ | isadmin | isglobaladmin | +---------+---------------+ | 0 | 0 | +---------+---------------+ 1 row in set (0.00 sec) MariaDB [vmail]> UPDATE mailbox SET isadmin=1, isglobaladmin=1 WHERE username = '[email protected]'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 MariaDB [vmail]> INSERT INTO domain_admins (username, domain) VALUES ('[email protected]', 'ALL'); Query OK, 1 row affected (0.00 sec) MariaDB [vmail]> exit Bye