Difference between revisions of "King0770-Notes-Always Bcc-Mishap"

(Created page with "== Scenario == After using Zimbra for a time, you decided to use the MTA's always_bcc feature.<br> <code><pre> postconf -e always_bcc=archive@example.com zmmtactl restart </...")
(No difference)

Revision as of 17:43, 2 February 2018


After using Zimbra for a time, you decided to use the MTA's always_bcc feature.

postconf -e always_bcc=archive@example.com
zmmtactl restart

Now, there's a new ZCS version you want to upgrade to; time for an upgrade!

After the upgrade completes, you noticed the always_bcc setting is blank.

postconf always_bcc

Nothing returns

Now you re-set the always_bcc setting

postconf -e always_bcc=archive@example.com
zmmtactl restart

How do you add the messages to the archive@example.com account between the times the upgrade completed, and re-setting always_bcc?

Find when the upgrade completed

perl -an -F: -e 'print scalar localtime(shift @F), " @F";' /opt/zimbra/.install_history

*run as the root user*

Get the time when the main.cf file was updated

ls -la /opt/zimbra/common/conf/main.cf

*run as the root user*

Most likely the timestamp of the main.cf file will reflect the time when always_bcc was updated, and the MTA restarted.

Action by example

Lets say for example, the missing messages are all between 5:08AM (when the upgrade started) and 2:39PM when always_bcc was fixed.

As the zimbra user, do the following...

cd /opt/zimbra/store/0

find . -type f -newermt "2018-02-01 05:08:00" ! -newermt "2018-02-01 14:39:00"

You should see output similar to this...


Visually spot check a few of the *.msg files to see if the delivery date/time was within 2018-02-01 05:08:00 & 2018-02-01 14:39:00

Next, run the following to add the messages to the archive@example.com account; providing the archive@example.com's account resides is a zimbra account living on the same mailstore node.

find . -type f -newermt "2018-02-01 05:08:00" ! -newermt "2018-02-01 14:39:00" | xargs zmmailbox -z -m archive@example.com am /Inbox 


Notable RFE ( please vote for it!!! )

Jump to: navigation, search