- if (u.config_msgnum < 0) {
- syslog(LOG_DEBUG, "No Sieve rules exist. No processing is required.");
- return;
- }
-
- /*
- * Check to see whether the script is empty and should not be processed.
- * A script is considered non-empty if it contains at least one semicolon.
- */
- if (
- (get_active_script(&u) == NULL)
- || (strchr(get_active_script(&u), ';') == NULL)
- ) {
- syslog(LOG_DEBUG, "Sieve script is empty. No processing is required.");
- return;
- }
-
- syslog(LOG_DEBUG, "Rules found. Performing Sieve processing for <%s>", roomname);
-
- if (CtdlGetRoom(&CC->room, roomname) != 0) {
- syslog(LOG_ERR, "ERROR: cannot load <%s>", roomname);
- return;
- }
-
- /* Initialize the Sieve parser */
-
- res = sieve2_alloc(&sieve2_context);
- if (res != SIEVE2_OK) {
- syslog(LOG_ERR, "sieve2_alloc() returned %d: %s", res, sieve2_errstr(res));
- return;
- }