Paid Remote Upgrade Support
We offer remote upgrade support if you don't want to get your hands dirty, check the details and contact us.
mlmmj-amime-receive
and upgrade mlmmjadmin./etc/iredmail-release
with new iRedMail version numberiRedMail stores the release version in /etc/iredmail-release
after
installation, it's recommended to update this file after you upgraded iRedMail,
so that you can know which version of iRedMail you're running. For example:
0.9.9
Please follow below tutorial to upgrade iRedAPD to the latest stable release: Upgrade iRedAPD to the latest stable release
Please follow this tutorial to upgrade iRedAdmin open source edition to the latest stable release: Upgrade iRedAdmin to the latest stable release
Roundcube 1.3
With the release of Roundcube 1.3.0, the previous stable release branches 1.2.x and 1.1.x will switch in to LTS low maintenance mode which means they will only receive important security updates but no longer any regular improvement updates.
Please follow Roundcube official tutorial to upgrade Roundcube webmail to the latest stable release immediately:
Please run commands below to fix incorrect file owner/group and permission:
chown mlmmj:mlmmj /opt/mlmmjadmin/settings.py
chmod 0400 /opt/mlmmjadmin/settings.py
Accurate Nginx url match helps avoid namespace conflicts, we need some fixes for Roundcube to get accurate url match.
Please open file /etc/nginx/templates/roundcube.tmpl
, find location
directives like below:
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; }
Add a ^
symbol before url path, this will exactly match the url begins
with the path.
+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; }
Open file /etc/nginx/templates/roundcube-subdomain.tmpl
, find location
directives like below:
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; }
Add ^
symbol like below:
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; }
With default settings of iRedMail-0.9.8, if you use a per-user alias address as member of a mailing list, Postfix doesn't not expand it to the final recipient. For more details of this bug, please check this forum post. Please follow steps below to fix it.
MLMMJ
like below:/etc/amavisd/amavisd.conf
/etc/amavis/conf.d/50-user
/usr/local/etc/amavisd.conf
/etc/amavisd.conf
$policy_bank{'MLMMJ'} = {
...
};
Add a new line inside the {} block:
$policy_bank{'MLMMJ'} = {
...
forward_method => 'smtp:[127.0.0.1]:10028',
};
Here we use a new smtp port 10028.
/etc/postfix/master.cf
(Linux/OpenBSD) or
/usr/local/etc/postfix/master.cf
(FreeBSD):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
It's very similar to existing transport '10025', but without option no_address_mappings
.
Port 10025 is used BEFORE content filter, but 10028 is used AFTER
content filter.
iRedMail-0.9.9 introduces 2 new LDAP attributes for mail user account:
mailboxFormat
: used to store mailbox format. All formats supported by
Dovecot are ok. for example, maildir
, mdbox
. For more details, please
check Dovecot document here: https://wiki2.dovecot.org/MailboxFormatmailboxFolder
: used to store the folder name which will be appended to
maildir path. Defaults to Maildir
.With these 2 new attributes, it will be very easy to switch different mailbox format.
Warning
If you use different mailbox format, you need to set mailbox format to the one you're using.
Download the latest iRedMail LDAP schema file
cd /tmp
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
cd /etc/openldap/schema/
cp iredmail.schema iredmail.schema.bak
cp -f /tmp/iredmail.schema /etc/openldap/schema/
service slapd restart
cd /tmp
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
cd /etc/ldap/schema/
cp iredmail.schema iredmail.schema.bak
cp -f /tmp/iredmail.schema /etc/ldap/schema/
service slapd restart
cd /tmp
wget https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
cd /usr/local/etc/openldap/schema/
cp iredmail.schema iredmail.schema.bak
cp -f /tmp/iredmail.schema /usr/local/etc/openldap/schema/
service slapd restart
On OpenBSD:
Note: if you're running ldapd as LDAP server, the schema directory is
/etc/ldap
, and service name isldapd
.
cd /tmp
ftp https://bitbucket.org/zhb/iredmail/raw/default/iRedMail/samples/iredmail/iredmail.schema
cd /etc/openldap/schema/
cp iredmail.schema iredmail.schema.bak
cp -f /tmp/iredmail.schema /etc/openldap/schema/
rcctl restart slapd
Please open file /etc/dovecot/dovecot-ldap.conf
(Linux/OpenBSD) or
/usr/local/etc/dovecot/dovecot-ldap.conf
(FreeBSD), find the user_attrs =
line like below:
user_attrs = mail=master_user,mail=user,homeDirectory=home,=mail=maildir:~/Maildir/,mailQuota=quota_rule=*:bytes=%$
Please replace it by below one:
user_attrs = mail=master_user,mail=user,homeDirectory=home,=mail=%{ldap:mailboxFormat:maildir}:~/%{ldap:mailboxFolder:Maildir}/,mailQuota=quota_rule=*:bytes=%$
If attribute mailboxFormat
doesn't present in user object, Dovecot will use
string maildir
as default value.
For more details about changing mailbox format, please check our tutorial: Change mailbox format.
vmail
databaseWe've made some changes to vmail
database:
mailbox.mailboxformat
: used to store mailbox format.
All formats supported by Dovecot are ok. for example, maildir
, mdbox
.
Default value is maildir
.
For more details, please check Dovecot document here:
https://wiki2.dovecot.org/MailboxFormatmailboxfolder
: used to store the folder name which will be appended to
maildir path. Defaults to Maildir
.With these 2 new columns, it will be very easy to migrate existing mailbox to different mailbox format, or set different mailbox for new user.
Warning
If you use different mailbox format, you need to set mailbox format to the one you're using.
Download SQL template file and import it:
cd /root/
wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/0.9.9/iredmail.mysql
mysql vmail < /root/iredmail.mysql
Please open file /etc/dovecot/dovecot-mysql.conf
(Linux/OpenBSD) or
/usr/local/etc/dovecot/dovecot-mysql.conf
(FreeBSD), find the user_attrs =
line like below:
user_query = SELECT \
...
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
...
Add a new CONCAT
line after above CONCAT()
line:
user_query = SELECT \
...
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
CONCAT(mailbox.mailboxformat, ':', mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir, '/Maildir') AS mail, \
...
For more details about changing mailbox format, please check our tutorial: Change mailbox format.
vmail
databaseWe've made some changes to vmail
database:
mailbox.mailboxformat
: used to store mailbox format.
All formats supported by Dovecot are ok. for example, maildir
, mdbox
.
Default value is maildir
.
For more details, please check Dovecot document here:
https://wiki2.dovecot.org/MailboxFormatmailboxfolder
: used to store the folder name which will be appended to
maildir path. Defaults to Maildir
.With these 2 new columns, it will be very easy to migrate existing mailbox to different mailbox format, or set different mailbox for new user.
Warning
If you use different mailbox format, you need to set mailbox format to the one you're using.
Download SQL template file used to update SQL database:
cd /root/
wget https://bitbucket.org/zhb/iredmail/raw/default/extra/update/0.9.9/iredmail.mysql
# su - postgres
$ psql -d vmail
sql> \i /tmp/mysql.pgsql
Please open file /etc/dovecot/dovecot-pgsql.conf
(Linux/OpenBSD) or
/usr/local/etc/dovecot/dovecot-pgsql.conf
(FreeBSD), then
If you're running PostgreSQL 8.x, you can find the user_attrs =
line like
below:
user_query = SELECT \
mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir AS home, \
...
Please Add a line after above line:
user_query = SELECT \
mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir AS home, \
mailbox.mailboxformat || ':' || mailbox.storagebasedirectory || '/' || mailbox.storagenode || '/' || mailbox.maildir || '/' || mailbox.mailboxfolder || '/' AS mail, \
...
Restart Dovecot service is required.
For more details about changing mailbox format, please check our tutorial: Change mailbox format.
If you're running PostgreSQL 9.x and later releases, you can find the
user_attrs =
line like below:
user_query = SELECT \
...
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
...
Add a new CONCAT
line after above CONCAT()
line:
user_query = SELECT \
...
CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, \
CONCAT(mailbox.mailboxformat, ':', mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir, '/', mailbox.mailboxfolder, '/') AS mail, \
...
Restart Dovecot service is required.
For more details about changing mailbox format, please check our tutorial: Change mailbox format.