[Solved] Error: virtual_mailbox_limit is smaller than message_size_limit

If you get error from postfix mail log we have sollutions.
Error:

fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit

Show information about mailbox_size_limit and message_size_limit:

[root@email ~]# postconf -n | grep virtual_mailbox_limit
virtual_mailbox_limit = 51200000
[root@email ~]# postconf -n | grep message_size_limit
message_size_limit = 52928640

Now set a new value for virtual_mailbox_limit (bigger than message_size_limit) as follows:

postconf -e ‘virtual_mailbox_limit = 102400000’

(Replace 102400000 with a value of your choice.)

As an alternative, you can disable virtual_mailbox_limit by setting it to 0:

postconf -e ‘virtual_mailbox_limit = 0’

/etc/init.d/postfix restart

How to move mails with imapsync from Linux Server to other server or Exchange Mail server.

We have an old Linux mail server and want to upgrade or move mails to other server or new server. How to move easy?  Answer: imapsync.

Example: Move mails from old Linux mail server to new Linux Server:

[root@Linux673]# imapsync –host1 192.168.1.22 –user1 cristian –password1 PASS07432 –host2 192.168.1.1 –user2 cristian@ceae.info –password2 PASS-new87

Example: Move mails from old Linux mail server to new MS Exchange with TLS2

[root@Linux673]# imapsync –host1 mail.old-linux-dm.com –user1 vuser@old-linux-dm.com –password1 PassWORD –tls2 –host2 email.Exchange-Mail.com –user2 new-user@domain.local –password2 PassWORD

Example: Move mails from old Linux mail server to new MS Exchange with  SSL2

[root@Linux673]# imapsync –host1 mail.old-linux-dm.com –user1 vuser@old-linux-dm.com –password1 PassWORD –ssl2 –host2 email.Exchange-Mail.com –user2 new-user@domain.local –password2 PassWORD

You have to change email.Exchange-Mail.com, new-user@domain.local and PassWORD with your local setup.

Postfix: log warning subject from and to

How to log subject in /var/log/maillog to identify easy mail.
It comes in handy when you need to debug an email issue and need to confirm your mailserver has sent the message.

Edit file /etc/postfix/header_checks  and insert this:

/^subject:/      WARN
/^to:/           WARN
/^from:/         WARN
/^Subject:/      WARN
/^To:/           WARN
/^From:/         WARN

You have to add header_checks = regexp:/etc/postfix/header_checks in /etc/postfix/main.cf

postmap  /etc/postfix/header_checks

After this restart postfix services.

/etc/init.d/postfix restart

or

systemctl restart postfix.service