From 2a805ee20271afb60f3a7d727e4745be4f95261d Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Wed, 1 Oct 2014 08:03:36 +0800 Subject: [PATCH] New: change.mail.attachment.size.html. --- README.md | 1 + SUMMARY.md | 36 +++++++++++++ howto/0-change.mail.attachment.size.md | 70 +++++++++++++++++++++++++ html/change.mail.attachment.size.html | 71 ++++++++++++++++++++++++++ html/index.html | 1 + 5 files changed, 179 insertions(+) create mode 100644 howto/0-change.mail.attachment.size.md create mode 100644 html/change.mail.attachment.size.html diff --git a/README.md b/README.md index f9aa0650..6b72c55a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ We're working on migrating [old wiki documents](http://www.iredmail.org/wiki) to # Install iRedMail * [Perform silent/unattended iRedMail installation](src/default/installation/unattended.iredmail.installation.md) # How to +* [Change mail attachment size](src/default/howto/0-change.mail.attachment.size.md) * [Completely disable Amavisd + ClamAV + SpamAssassin](src/default/howto/0-completely.disable.amavisd.clamav.spamassassin.md) * [Enable SMTPS service (SMTP over SSL, port 465)](src/default/howto/0-enable.smtps.md) * [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](src/default/howto/1-amavisd.no.x-spam.headers.md) diff --git a/SUMMARY.md b/SUMMARY.md index 0aa40e57..81296cf6 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1780,3 +1780,39 @@ * [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md) # Frequently Asked Questions * [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md) +# Install iRedMail +* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md) +# How to +* [Change mail attachment size](0-change.mail.attachment.size.md) +* [Completely disable Amavisd + ClamAV + SpamAssassin](0-completely.disable.amavisd.clamav.spamassassin.md) +* [Enable SMTPS service (SMTP over SSL, port 465)](0-enable.smtps.md) +* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](1-amavisd.no.x-spam.headers.md) +* [Disable spam virus scanning for outgoing mails](1-disable.spam.virus.scanning.for.outgoing.mails.md) +* [Quarantining](1-quarantining.md) +* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md) +* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md) +* [Ignore Trash folder in mailbox quota](ignore.trash.folder.in.quota.md) +* [LDAP: Add an alias domain](ldap.add.alias.domain.md) +* [LDAP: Add a mail alias account](ldap.add.mail.alias.md) +* [LDAP: Add a mail list account](ldap.add.mail.list.md) +* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md) +* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md) +* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md) +* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md) +* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md) +* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md) +# Third-party integrations. +* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md) +# Cluster solutions +* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md) +# Backup, restore and migration +* [Migrate iRedAdmin open source edition to iRedAdmin-Pro](migrate.or.upgrade.iredadmin.md) +* [Migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md) +* [Password hashes](password.hashes.md) +# Troubleshooting and Debug +* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md) +* [Turn on debug mode in Cluebringer](turn.on.debug.mode.in.cluebringer.md) +* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md) +* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md) +# Frequently Asked Questions +* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md) diff --git a/howto/0-change.mail.attachment.size.md b/howto/0-change.mail.attachment.size.md new file mode 100644 index 00000000..c4693aab --- /dev/null +++ b/howto/0-change.mail.attachment.size.md @@ -0,0 +1,70 @@ +# Change mail attachment size + +To change mail attachment size, we have to change 3 settings. + +## Change message size limit in postfix + +Postfix is MTA, so we have to change its setting to transfer mail with large +attachment. + +To allow mail with 100Mb attachment, please change 'message_size_limit' setting +like below: + +``` +# postconf -e message_size_limit='104857600' +``` + +Restart postfix to make it work: + +``` +# /etc/init.d/postfix restart +``` + +__NOTES__: + +* `104857600` is 100 (MB) x 1024 (KB) x 1024 (Bit). +* Mail will be encoded by mail user agent (Outlook, Thunderbird, etc) before + transferred, the actual message size will be larger than 100MB, you can + simplily increase above setting to 110Mb or 120Mb to make it work as expected. + +If you use mail clients such as Outlook, thunderbird to send mails, it's now +ok to sent large attachment with above setting. + +## Change upload file size in webmail + +If you have webmail, you have to change two more settings: + +1. Change PHP setting to allow to upload large attachment + +You should change `memory_limit`, `upload_max_filesize` and `post_max_size` in +PHP config file `/etc/php.ini` + +* on RHEL/CentOS: it's `/etc/php.ini` +* on Debian/Ubuntu, it's `/etc/php5/apache2/php.ini` +* on FreeBSD, it's `/usr/local/etc/php.ini` for Apache, or + `/etc/php5/fpm/php.ini` for Nginx. +* on OpenBSD, it's `/etc/php-5.4.ini`. If you're running different PHP release, + the version number `5.4` will be different. + +``` +memory_limit = 200M; +upload_max_filesize = 100M; +post_max_size = 100M; +``` + +2. Change Roundcube webmail settings to allow large attachment + +Change same settings in file `.htaccess` under roundcube root directory: + +* on RHEL/CentOS, it's `/var/www/roundcubemail/.htaccess` +* on Debian/Ubuntu, it's `/usr/share/apache2/roundcubemail/.htaccess` +* on FreeBSD, it's `/usr/local/www/roundcubemail/.htaccess` +* on OpenBSD, it's `/var/www/roundcubemail/.htaccess` + +``` +php_value upload_max_filesize 100M +php_value post_max_size 100M +php_value memory_limit 200M +``` + +Restart Apache or Nginx web server to make it work. diff --git a/html/change.mail.attachment.size.html b/html/change.mail.attachment.size.html new file mode 100644 index 00000000..2066b580 --- /dev/null +++ b/html/change.mail.attachment.size.html @@ -0,0 +1,71 @@ + + + + Change mail attachment size + + + + +

Change mail attachment size

+

To change mail attachment size, we have to change 3 settings.

+

Change message size limit in postfix

+

Postfix is MTA, so we have to change its setting to transfer mail with large +attachment.

+

To allow mail with 100Mb attachment, please change 'message_size_limit' setting +like below:

+
# postconf -e message_size_limit='104857600'
+
+ +

Restart postfix to make it work:

+
# /etc/init.d/postfix restart
+
+ +

NOTES:

+ +

If you use mail clients such as Outlook, thunderbird to send mails, it's now +ok to sent large attachment with above setting.

+

Change upload file size in webmail

+

If you have webmail, you have to change two more settings:

+
    +
  1. Change PHP setting to allow to upload large attachment
  2. +
+

You should change memory_limit, upload_max_filesize and post_max_size in +PHP config file /etc/php.ini

+ +
memory_limit = 200M;
+upload_max_filesize = 100M;
+post_max_size = 100M;
+
+ +
    +
  1. Change Roundcube webmail settings to allow large attachment
  2. +
+

Change same settings in file .htaccess under roundcube root directory:

+ +
php_value    upload_max_filesize    100M
+php_value    post_max_size  100M
+php_value    memory_limit   200M
+
+ +

Restart Apache or Nginx web server to make it work.


If you found something wrong in this document, please do contact us to fix it.

\ No newline at end of file diff --git a/html/index.html b/html/index.html index 28d5f3a4..aad596a0 100644 --- a/html/index.html +++ b/html/index.html @@ -15,6 +15,7 @@

How to