Skip to content

Commit

Permalink
Merge branch 'release/8.8.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
rupalid committed Sep 18, 2017
2 parents 1c9d7a1 + e244281 commit 55db2ef
Show file tree
Hide file tree
Showing 87 changed files with 6,604 additions and 919 deletions.
30 changes: 17 additions & 13 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
<ant dir="./store" target="publish-local" inheritAll="true"/>
</target>

<target name="test-all-plough-through" unless="skipTests" depends="publish-local-all">
<target name="set-no-halt-on-failure">
<echo message="WARNING: IGNORING UNIT TEST FAILURES"/>
<property name="halt-on-failure" value="no"/>

<antcall target="test-all" inheritAll="true"/>
</target>

<target name="test-all" depends="publish-local-all">
<target name="set-halt-on-failure">
<property name="halt-on-failure" value="yes"/>
</target>

<target name="test-all-plough-through" depends="set-no-halt-on-failure,test-all"/>
<target name="test-all" unless="skipTests" depends="set-halt-on-failure,publish-local-all">
<property name="test-results-file" value="${basedir}/build/test-results.txt"/>

<echo file="${test-results-file}" message="BEGIN&#xD;&#xA;" />
Expand All @@ -33,17 +36,13 @@
<echo append="true" file="${test-results-file}" message="END&#xD;" />
</target>

<target name="pkg" depends="all">
<delete dir="build/dist"/>
<delete dir="build/stage"/>
<antcall target="all" inheritAll="true"/>
<exec dir="." executable="./pkg-builder.pl" failonerror="true">
<arg value="--define"/>
<arg value="jetty.distro=jetty-distribution-9.3.5.v20151012"/>
</exec>
<target name="pkg" depends="clean-pkg,all">
<exec dir="." executable="./pkg-builder.pl" failonerror="true"/>
</target>

<target name="clean" depends="clean-ant">
<target name="pkg-after-plough-through-tests" depends="test-all-plough-through,pkg"/>

<target name="clean" depends="clean-ant,clean-pkg">
<exec dir="./native" executable="make" failonerror="true"><arg value="clean"/></exec>
<delete dir="build"/>
</target>
Expand All @@ -55,4 +54,9 @@
<ant dir="./client" target="clean" inheritAll="false"/>
<ant dir="./store" target="clean" inheritAll="false"/>
</target>

<target name="clean-pkg">
<delete dir="build/dist"/>
<delete dir="build/stage"/>
</target>
</project>
10 changes: 10 additions & 0 deletions client/src/java/com/zimbra/client/ZMailbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ public class ZMailbox implements ToZJSONObject, MailboxStore {
private Element mVoiceStorePrincipal;
private long mSize;
private boolean mNoTagCache;
private boolean alwaysRefreshFolders;
private ZContactByPhoneCache mContactByPhoneCache;
private final ZMailboxLock lock;
private int lastChangeId = 0;
Expand Down Expand Up @@ -394,6 +395,7 @@ public static class Options {
private String mDeviceId;
private boolean mGenerateDeviceId;
private SoapTransport.NotificationFormat notificationFormat = SoapTransport.NotificationFormat.DEFAULT;
private boolean alwaysRefreshFolders;

public Options() {
}
Expand Down Expand Up @@ -450,6 +452,9 @@ public Options(ZAuthToken authToken, String uri, boolean forceAuth, boolean csrf
public ZAuthToken getAuthToken() { return mAuthToken; }
public Options setAuthToken(ZAuthToken authToken) { mAuthToken = authToken; return this; }

public boolean getAlwaysRefreshFolders() { return alwaysRefreshFolders; }
public Options setAlwaysRefreshFolders(boolean alwaysRefresh) { alwaysRefreshFolders = alwaysRefresh; return this; }

public SoapTransport.NotificationFormat getNotificationFormat() {
return notificationFormat;
}
Expand Down Expand Up @@ -664,6 +669,7 @@ public ZMailbox(Options options) throws ServiceException {
}
mNotificationFormat = options.getNotificationFormat();
mNotifyPreference = SessionPreference.fromOptions(options);
alwaysRefreshFolders = options.getAlwaysRefreshFolders();

mClientIp = options.getClientIp();

Expand Down Expand Up @@ -4025,8 +4031,12 @@ public ZSearchPagerResult searchConversation(String convId, ZSearchParams params

private void populateFolderCache() throws ServiceException {
if (mUserRoot != null) {
if(alwaysRefreshFolders) {
noOp();
}
return;
}

if (mNotifyPreference == null || mNotifyPreference == SessionPreference.full) {
noOp();
if (mUserRoot != null) {
Expand Down
41 changes: 41 additions & 0 deletions common/src/java/com/zimbra/common/account/ZAttrProvisioning.java
Original file line number Diff line number Diff line change
Expand Up @@ -11484,6 +11484,14 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
@ZAttr(id=375)
public static final String A_zimbraNetworkActivation = "zimbraNetworkActivation";

/**
* Whether to enable old zimbra network admin module.
*
* @since ZCS 8.8.2
*/
@ZAttr(id=2119)
public static final String A_zimbraNetworkAdminEnabled = "zimbraNetworkAdminEnabled";

/**
* Contents of a signed Zimbra license key - an XML string.
*/
Expand Down Expand Up @@ -15420,6 +15428,16 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
@ZAttr(id=1900)
public static final String A_zimbraShortTermGranteeCacheSize = "zimbraShortTermGranteeCacheSize";

/**
* Whether edit header commands in admin sieve scripts are enabled or
* disabled. If TRUE, the addheader, deleteheader and replaceheader
* commands will be executed during admin sieve script execution.
*
* @since ZCS 8.8.4
*/
@ZAttr(id=2121)
public static final String A_zimbraSieveEditHeaderEnabled = "zimbraSieveEditHeaderEnabled";

/**
* Deprecated since: 8.7.8. Variable feature is always enabled, hence
* this attribute has been deprecated. Orig desc: Whether to enable the
Expand All @@ -15431,6 +15449,14 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
@ZAttr(id=2096)
public static final String A_zimbraSieveFeatureVariablesEnabled = "zimbraSieveFeatureVariablesEnabled";

/**
* Comma separated list of sieve immutable headers
*
* @since ZCS 8.8.4
*/
@ZAttr(id=2122)
public static final String A_zimbraSieveImmutableHeaders = "zimbraSieveImmutableHeaders";

/**
* Whether the RFC compliant &#039;notify&#039; is used. If TRUE, ZCS
* parses the &#039;notify&#039; action parameters based on the syntax
Expand Down Expand Up @@ -15462,6 +15488,21 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
@ZAttr(id=2111)
public static final String A_zimbraSieveRejectMailEnabled = "zimbraSieveRejectMailEnabled";

/**
* Whether the declaration of the Sieve extension feature is mandatory by
* the &#039;require&#039; control. If TRUE, before ZCS evaluates a Sieve
* extension test or action, it checks the corresponding capability
* string at &#039;require&#039; control; and if the capability string is
* not declared in the &#039;require&#039;, the entire Sieve filter
* execution will be failed. If FALSE, any Sieve extensions can be used
* without declaring the capability string in the &#039;require&#039;
* control.
*
* @since ZCS 8.8.4
*/
@ZAttr(id=2120)
public static final String A_zimbraSieveRequireControlEnabled = "zimbraSieveRequireControlEnabled";

/**
* Unique ID for an signature
*/
Expand Down
2 changes: 0 additions & 2 deletions common/src/java/com/zimbra/common/localconfig/LC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,6 @@ public static PUBLIC_SHARE_VISIBILITY getPublicShareAdvertisingScope() {
@Supported
public static final KnownKey smime_truststore_password = KnownKey.newKey("${mailboxd_truststore_password}");

public static final KnownKey sieve_immutable_headers = KnownKey.newKey("Received,DKIM-Signature,Authentication-Results,Received-SPF,Message-ID");

//Remote IMAP
@Reloadable
public static final KnownKey imap_always_use_remote_store = KnownKey.newKey(false);
Expand Down
11 changes: 11 additions & 0 deletions common/src/java/com/zimbra/common/soap/AdminConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -1464,4 +1464,15 @@ public final class AdminConstants {

// Two-Factor Auth
public static final String A_LAZY_DELETE = "lazyDelete";

// Sieve editheader extension constants
public static final String A_LAST = "last";
public static final String E_HEADERNAME = "headerName";
public static final String E_HEADERVALUE = "headerValue";
public static final String A_COMPARATOR = "comparator";
public static final String A_MATCHTYPE = "matchType";
public static final String A_COUNT_COMPARATOR = "countComparator";
public static final String A_VALUE_COMPARATOR = "valueComparator";
public static final String A_RELATIONAL_COMPARATOR = "relationalComparator";
public static final String E_NEW_VALUE = "newValue";
}
16 changes: 16 additions & 0 deletions common/src/java/com/zimbra/common/soap/HeaderConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ public final class HeaderConstants {
public static final String E_SOAP_ID = "soapId";
public static final String A_WAITSET_ID = "wsId";

// sieve constants
public static final String INDEX = ":index";
public static final String LAST = ":last";
public static final String NEW_NAME = ":newname";
public static final String NEW_VALUE = ":newvalue";
public static final String I_ASCII_NUMERIC = "i;ascii-numeric";
public static final String COUNT = ":count";
public static final String VALUE = ":value";

public static final String GT_OP = "gt";
public static final String GE_OP = "ge";
public static final String LT_OP = "lt";
public static final String LE_OP = "le";
public static final String EQ_OP = "eq";
public static final String NE_OP = "ne";

private HeaderConstants() {
}
}
3 changes: 3 additions & 0 deletions common/src/java/com/zimbra/common/soap/MailConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,9 @@ private MailConstants() {
public static final String E_ACTION_REJECT = "actionReject";
public static final String E_ACTION_EREJECT = "actionEreject";
public static final String E_ACTION_LOG = "actionLog";
public static final String E_ACTION_ADDHEADER = "actionAddheader";
public static final String E_ACTION_DELETEHEADER = "actionDeleteheader";
public static final String E_ACTION_REPLACEHEADER = "actionReplaceheader";

public static final String A_ADDRESS_PART = "part";
public static final String A_STRING_COMPARISON = "stringComparison";
Expand Down
9 changes: 3 additions & 6 deletions pkg-builder.pl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ ()
{
Die("wrong commandline options")
if ( !GetOptions( "defines=s" => \%DEFINES ) );

Die("jetty.distro not specified (--define jetty.distro=<xxxx>)")
if ( !exists $DEFINES{'jetty.distro'} );
}

sub cpy_file($$)
Expand Down Expand Up @@ -198,9 +195,9 @@ ($)
{
my $stage_base_dir = shift;

make_path("$stage_base_dir/opt/zimbra/$DEFINES{'jetty.distro'}/webapps/service");
System("cd $stage_base_dir/opt/zimbra/$DEFINES{'jetty.distro'}/webapps/service && jar -xf @{[getcwd()]}/store/build/service.war");
cpy_file( "store/conf/web.xml.production", "$stage_base_dir/opt/zimbra/$DEFINES{'jetty.distro'}/etc/service.web.xml.in" );
make_path("$stage_base_dir/opt/zimbra/jetty_base/webapps/service");
System("cd $stage_base_dir/opt/zimbra/jetty_base/webapps/service && jar -xf @{[getcwd()]}/store/build/service.war");
cpy_file( "store/conf/web.xml.production", "$stage_base_dir/opt/zimbra/jetty_base/etc/service.web.xml.in" );

return ["."];
}
Expand Down
1 change: 1 addition & 0 deletions soap/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<dependency org="org.codehaus.jackson" name="jackson-core-asl" rev="1.9.2" />
<dependency org="org.codehaus.jackson" name="jackson-mapper-asl" rev="1.9.2" />
<dependency org="org.codehaus.jackson" name="jackson-xc" rev="1.9.2" />
<dependency org="org.apache.james" name="apache-jsieve-core" rev="0.5"/>
<dependency org="zimbra" name="zm-common" rev="latest.integration" />
<dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" />
</dependencies>
Expand Down
Loading

0 comments on commit 55db2ef

Please sign in to comment.