|
Upgrade_040_050
Upgrade Guide: 0.4.0 => 0.5.0
For any issue before or after upgrade, please go to our forum for help: http://www.iredmail.org/forum/ Issues Fixed & Notify
### Remove ldap_virtual_mailbox_maps.cf in virtual_mailbox_maps. # virtual_mailbox_maps = ldap:/etc/postfix/ldap_accounts.cf, ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf virtual_mailbox_maps = ldap:/etc/postfix/ldap_accounts.cf
# chmod 0644 /etc/cron.d/sa-update
# cp /etc/localtime /var/spool/postfix/etc/ Reference: Confusing timestamp in /var/log/secure (UTC time instead of localtime)
# cp /etc/openldap/schema/iredmail.schema /opt/backup/ # cd /tmp/ # wget http://iredmail.googlecode.com/svn/trunk/iRedMail/samples/iredmail.schema # rm -f /etc/openldap/schema/iredmail.schema # mv /tmp/iredmail.schema /etc/openldap/schema/ # /etc/init.d/ldap restart
#
# Allow users to access their own domain subtree.
#
access to dn.regex="domainName=([^,]+),o=domains,dc=iredmail,dc=org$"
by anonymous auth
by self write
by dn.exact="cn=vmail,dc=iredmail,dc=org" read
by dn.exact="cn=vmailadmin,dc=iredmail,dc=org" write
by dn.regex="mail=[^,]+,ou=Users,domainName=$1,o=domains,dc=iredmail,dc=org$" read
by dn.regex="mail=[^,]+@$1,o=domainAdmins,dc=iredmail,dc=org$" read # <-- Add this line.
by users none
#
# Enable vmail/vmailadmin.
#
access to dn.subtree="o=domains,dc=iredmail,dc=org"
by anonymous auth
by self write
by dn.exact="cn=vmail,dc=iredmail,dc=org" read
by dn.exact="cn=vmailadmin,dc=iredmail,dc=org" write
by dn.regex="mail=[^,]+,domainName=$1,o=domains,dc=iredmail,dc=org$" read
by users read
########################################################
################# Add below lines ######################
########################################################
access to dn.subtree="o=domainAdmins,dc=iredmail,dc=org"
by anonymous auth
by self write
by dn.exact="cn=vmail,dc=iredmail,dc=org" read
by dn.exact="cn=vmailadmin,dc=iredmail,dc=org" write
by users none
# chown vmail:vmail /etc/pysieved.ini # /etc/init.d/pysieved restart Improvements and UpdatesApache
User-agent: * Disallow: /mail Disallow: /webmail Disallow: /roundcube Disallow: /phpldapadmin Disallow: /ldap Disallow: /mysql Disallow: /phpmyadmin Disallow: /awstats PHP
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, proc_open Thanks david(at)knapp(dot)org. MySQL backend special
Warning: Please replace '/home/vmail' below to fit your environment.# mysql -uroot -p vmail mysql> ALTER TABLE mailbox ADD COLUMN storagebasedirectory VARCHAR(255) DEFAULT '/home/vmail';
# mysql -uroot -p vmail mysql> ALTER TABLE mailbox CHANGE COLUMN enablesieve enablemanagesieve TINYINT(1);
# ... skip some lines ... [Dovecot] service = managesieve # ... skip some lines ...
# mysql -uroot -p vmail mysql> ALTER TABLE mailbox ADD COLUMN employeeid VARCHAR(255) DEFAULT NULL; mysql> ALTER TABLE mailbox ADD COLUMN lastlogindate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'; mysql> ALTER TABLE mailbox ADD COLUMN lastloginprotocol CHAR(255) NOT NULL DEFAULT ''; OpenLDAP backend special
query_filter = (&(mail=%s)(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=forward))
index domainAdmin,domainGlobalAdmin,domainBackupMX eq,pres index listAllowedUser,accessPolicy eq,pres index memberOfGroup eq,pres After you added above line, please stop openldap and run 'slapindex' in database directory:# /etc/init.d/ldap stop # cd /var/lib/ldap/iredmail.org/ # slapindex # chown ldap:ldap * # /etc/init.d/ldap start Postfix
virtual_alias_maps =
ldap:/etc/postfix/ldap_virtual_alias_maps.cf,
ldap:/etc/postfix/ldap_virtual_group_maps.cf # Add this lookup file.Create /etc/postfix/ldap_virtual_group_maps.cf:server_host = 127.0.0.1 server_port = 389 version = 3 bind = yes start_tls = no bind_dn = cn=vmail,dc=iredmail,dc=org bind_pw = KrxIkebDaRWb81yHdetBPt0UXC6NVZ search_base = domainName=%d,o=domains,dc=iredmail,dc=org scope = sub query_filter = (&(memberOfGroup=%s)(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=deliver)) result_attribute= mail debuglevel = 0 Remove (objectClass=mailList) in query_filter line in /etc/postfix/ldap_virtual_alias_maps.cf:#query_filter = (&(mail=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailList)(objectClass=mailAlias)(&(objectClass=mailUser)(enabledService=forward)))) query_filter = (&(mail=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailAlias)(&(objectClass=mailUser)(enabledService=forward))))
Warning: Do NOT forget to add 'enabledService=senderbcc' and 'enabledService=recipientbcc' for all domains/users allowed bcc feature. query_filter = (&(domainName=%d)(objectClass=mailDomain)(domainStatus=active)(enabledService=mail)(enabledService=senderbcc)) query_filter = (&(domainName=%d)(objectClass=mailDomain)(domainStatus=active)(enabledService=mail)(enabledService=recipientbcc)) query_filter = (&(mail=%s)(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=senderbcc)) query_filter = (&(mail=%s)(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=recipientbcc))
query = SELECT domain FROM domain WHERE domain='%s' AND backupmx='0' AND active='1' AND expired >= NOW() query_filter = (&(objectClass=mailDomain)(domainName=%s)(!(domainBackupMX=yes))(domainStatus=active)(enabledService=mail))
search_base = domainName=%d,o=domains,dc=iredmail,dc=org scope = sub query_filter = (&(mail=%s)(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(objectClass=mailList)(objectClass=mailAlias)(&(objectClass=mailUser)(enabledService=forward)))) result_attribute= mailForwardingAddress DovecotWarning: Make sure you have upgrade OpenLDAP and MySQL with steps listed above.
mail_location = maildir:/%Lh/:INDEX=/%Lh/ and dovecot-mysql.conf (if you use MySQL as backend) should be changed too:user_query = SELECT CONCAT(storagebasedirectory, '/', maildir) AS home, \and dovecot-ldap.conf (if you use OpenLDAP as backend) should be changed too:user_attrs = =sieve_dir=/home/vmail/sieve/%Ld/%Ln/,storageBaseDirectory=home,mailMessageStore=mail=maildir:~/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$ Roundcube webmail
'filter' => "(&(accountStatus=active)(enabledService=mail)(enabledService=deliver)(|(&(objectClass=mailList)(hasMember=yes))(objectClass=mailAlias)(objectClass=mailUser)))", // Search mail users, lists, aliases.
# File: /var/www/roundcubemail-x.y.z-stable/config/main.inc.php
'search_fields' => array('mail', 'cn', 'givenName', 'sn'), // fields to search in
'firstname_field' => 'givenName', // this field represents the contact's first nameDisclaimeriRedMail-0.5.0 supports automatically adding a disclaimer to all outgoing emails with Amavisd-new + alterMIME.
# yum install altermime.i386 # yum install altermime.x86_64
# mkdir -p /etc/postfix/disclaimer/
$policy_bank{'MYNETS'} = { # mail originating from @mynetworks
[ ... skip other settings here ...]
allow_disclaimers => 1, # enables disclaimer insertion if available
};
# ------------ Disclaimer Setting ---------------
$altermime = '/usr/bin/altermime';
$defang_maps_by_ccat{+CC_CATCHALL} = [ 'disclaimer' ];
# Disclaimer in plain text formart.
@altermime_args_disclaimer = qw(--disclaimer=/etc/postfix/disclaimer/_OPTION_.txt);
@disclaimer_options_bysender_maps = ({
# Per-domain disclaimer setting: /etc/postfix/disclaimer/host1.iredmail.org.txt
#'host1.iredmail.org' => 'host1.iredmail.org',
# Sub-domain disclaimer setting: /etc/postfix/disclaimer/iredmail.org.txt
#'.iredmail.org' => 'iredmail.org',
# Per-user disclaimer setting: /etc/postfix/disclaimer/boss.iredmail.org.txt
#'boss@iredmail.org' => 'boss.iredmail.org',
# Catch-all disclaimer setting: /etc/postfix/disclaimer/default.txt
'.' => 'default',
},);
# ------------ End Disclaimer Setting ---------------
# echo 'Testing disclaimer.' > /etc/postfix/disclaimer/default.txt
# /etc/init.d/amavisd restart | |||||||||||||