Entries from April 2015

How To Modify the Maximum Allowed Attachment Size in Postfix

Author: , April 22nd, 2015

By default, Postfix restricts attachment size to about 10MB (10240000 bytes). You can check the current value by running the following command: postconf | grep message_size_limit To change the attachment size limit to say 50 MB, run a command like: postconf -e message_size_limit=52428800 You may find that the maximum mailbox size is lower than the […]

How To Use Regular Expressions (regex) To Forward Email In Postfix

Author: , April 7th, 2015

Create the file /etc/postfix/virtual-regexp. For example, forward all emails with a leading eric and ending with @thewyz.net to a Gmail account:

Edit the file /etc/postfix/main.cf. Add regexp:/etc/postfix/virtual-regexp to the virtual_alias_maps line. For example:

Generate the map .db file:

This example requires the files virtual and virtual.db to exist, even if they are […]