1 (edited by terciof 2011-07-29 03:48:34)

Topic: [SOLVED] Feature Request / Tip

Hi!

iRedAdmin-Pro Ldap v1.6.1, ubuntu 11.04.

Basically all my users have unlimited quota, but, I'd like to be able to see each user usage.

I made this modification myself, but it I think that it could be useful for most users.

My modifications:

Diff file: iRedAdmin-Pro-LDAP-1.6.1/templates/default/ldap/user/list.html

103c103,107
<                                         <td class="vcenter">{{ _('Unlimited') }}</td>
---
>                     {% if session.get('enableShowUsedQuota') is sameas true %}
>                         <td class="vcenter">{{ usedQuota |filesizeformat }} / {{ _('Unlimited') }}</td>
>                     {% else %}
>                         <td class="vcenter">{{ _('Unlimited') }}</td>
>                     {% endif %}

The change is shown in the attachment.

Also I have a tip to users that have a large user base.

For example, in the User list page the HTML that the iRedAdmin-Pro generates has a lot boilerplate chars, this is normal because all the templates are formated and structured to easy maintainability, but in the daily basis the excess of whitespaces, etc, can be significant.

To minimize this I installed in my Apache2 the Google PageSpeed module. This module rewrite the page output(After all processing by Python) and minifies it, reducing the final file size.

More information can be found at: http://code.google.com/speed/page-speed … g_mod.html

Thanks again for this amazing tool!

Post's attachments

UnlimitedQuotaShow.jpg
UnlimitedQuotaShow.jpg 31.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: [SOLVED] Feature Request / Tip

Another tip.

Reading the logs I notice that the amavis has no decoders for compressed files.

Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .7z   tried: 7zr, 7za, 7z
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .rar  tried: unrar-free
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .arj  tried: arj, unarj
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .arc  tried: nomarch, arc
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .zoo  tried: zoo
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .lha 
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .doc  tried: ripole
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .cab  tried: cabextract
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .tnef
Jul 27 12:32:35 ec2 amavis[739]: Internal decoder for .tnef
Jul 27 12:32:35 ec2 amavis[739]: No decoder for       .exe  tried: unrar-free; arj, unarj

To install the decoders in a Debian/Ubuntu box:

aptitude install  arj zoo nomarch cpio lzop cabextract p7zip rpm unrar-free ripole

After that all decoders will be available to amavis and clamav.

Regards,

3

Re: [SOLVED] Feature Request / Tip

terciof wrote:

Diff file: iRedAdmin-Pro-LDAP-1.6.1/templates/default/ldap/user/list.html

Great modification, merged into trunk release. Thanks very much. smile

terciof wrote:

aptitude install  arj zoo nomarch cpio lzop cabextract p7zip rpm unrar-free ripole

Will try to fix it in iRedMail-0.7.3 release, thanks for your feedback. smile

4

Re: [SOLVED] Feature Request / Tip

Another modification that I made is to the backup scripts.

By default they echo messages(Including errors) to stdout.

I changed all error messages to echo to stderr.

The default behavior in cron is to send a email to root if the command executed echoed something, whether to stdout or stderr.

Changing error messages to stderr allow us to redirect stdout to /dev/null in cron, if the backup complete successfully no message will be logged by the cron, thus no email will be sent. But, if a message is echoed to stderr(Error messages) cron will send the command output to the root email(In my case an aliases has been created to my email).

This allow us to be notified if an error occurs, and the normal messages will not get lost, they will be logged to log file anyway.

In crontab -e:

0 0 * * * /usr/local/iRedMail/tools/backup_openldap.sh > /dev/null
0 0 * * * /usr/local/iRedMail/tools/backup_mysql.sh > /dev/null

Diff iRedMail/tools/backup_mysql.sh:

128,130c128,130
<     echo "[ERROR] You don't have correct MySQL related configurations in file: ${0}"
<     echo -e "\t- MYSQL_USER\n\t- MYSQL_PASSWD\n\t- DATABASES"
<     echo "Please configure them first."
---
>     echo "[ERROR] You don't have correct MySQL related configurations in file: ${0}" 1>&2
>     echo -e "\t- MYSQL_USER\n\t- MYSQL_PASSWD\n\t- DATABASES" 1>&2
>     echo "Please configure them first." 1>&2
138,139c138,139
<     echo "[ERROR] MySQL username or password is incorrect in file ${0}."
<     echo "Please fix them first."
---
>     echo "[ERROR] MySQL username or password is incorrect in file ${0}." 1>&2
>     echo "Please fix them first." 1>&2
217,219c217
<     cat <<EOF
< * Backup completed with !!!ERRORS!!!.
< EOF
---
>     echo -e "\n* Backup completed with !!!ERRORS!!!.\n" 1>&2

Diff iRedMail/tools/backup_openldap.sh

193,195c195
<     cat <<EOF
< * Backup completed with !!!ERRORS!!!.
< EOF
---
>     echo -e "\n* Backup completed with !!!ERRORS!!!.\n" 1>&2

I don't know if this modifications are good to every one, but I think it's good to share!

Thanks!

5

Re: [SOLVED] Feature Request / Tip

That's cool. I like it, and merged into iRedMail moment ago.
Thanks for your contribution. smile

6

Re: [SOLVED] Feature Request / Tip

terciof wrote:

To install the decoders in a Debian/Ubuntu box:

aptitude install  arj zoo nomarch cpio lzop cabextract p7zip rpm unrar-free ripole

After that all decoders will be available to amavis and clamav.

hi terciof,

Just want to let you know, iRedMail-0.7.3 will install these packages on Debian/Ubuntu automatically.
Thanks for your feedback. smile

7

Re: [SOLVED] Feature Request / Tip

ZhangHuangbin wrote:

Just want to let you know, iRedMail-0.7.3 will install these packages on Debian/Ubuntu automatically.
Thanks for your feedback. smile

Fast as always!!!

Thank you!