Пример #1
0
static bool ext_ihave_validator_load
(const struct sieve_extension *ext, struct sieve_validator *validator)
{
	sieve_validator_register_command(validator, ext, &ihave_test);
	sieve_validator_register_command(validator, ext, &error_command);

	return TRUE;
}
Пример #2
0
static bool ext_date_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register new test */
	sieve_validator_register_command(valdtr, ext, &date_test);
	sieve_validator_register_command(valdtr, ext, &currentdate_test);

	return TRUE;
}
Пример #3
0
static bool ext_notify_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register validator extension to check for conflict with enotify */
	sieve_validator_extension_register
		(valdtr, ext, &notify_validator_extension, NULL);

	/* Register new commands */
	sieve_validator_register_command(valdtr, ext, &cmd_notify_old);
	sieve_validator_register_command(valdtr, ext, &cmd_denotify);

	return TRUE;
}
Пример #4
0
static bool ext_variables_validator_load
(const struct sieve_extension *ext, struct sieve_validator *validator)
{
	sieve_validator_argument_override
		(validator, SAT_VAR_STRING, ext, &variable_string_argument);

	sieve_validator_register_command(validator, ext, &cmd_set);
	sieve_validator_register_command(validator, ext, &tst_string);

	ext_variables_validator_initialize(ext, validator);

	return TRUE;
}
static bool ext_imap4flags_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register commands */
	sieve_validator_register_command(valdtr, ext, &cmd_setflag);
	sieve_validator_register_command(valdtr, ext, &cmd_addflag);
	sieve_validator_register_command(valdtr, ext, &cmd_removeflag);
	sieve_validator_register_command(valdtr, ext, &tst_hasflag);

	/* Attach :flags tag to keep and fileinto commands */
	ext_imap4flags_attach_flags_tag(valdtr, ext, "keep", FALSE);
	ext_imap4flags_attach_flags_tag(valdtr, ext, "fileinto", FALSE);

	return TRUE;
}
static bool ext_environment_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	sieve_validator_register_command(valdtr, ext, &tst_environment);

	return TRUE;
}
Пример #7
0
static bool ext_vacation_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register new command */
	sieve_validator_register_command(valdtr, ext, &vacation_command);

	return TRUE;
}
Пример #8
0
static bool ext_debug_validator_load
(const struct sieve_extension *ext, struct sieve_validator *validator)
{
	/* Register new test */
	sieve_validator_register_command(validator, ext, &debug_log_command);

	return TRUE;
}
Пример #9
0
static bool ext_enotify_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	struct ext_enotify_context *ectx = 
		(struct ext_enotify_context *) ext->context;

	/* Register new commands */
	sieve_validator_register_command(valdtr, ext, &notify_command);
	sieve_validator_register_command(valdtr, ext, &valid_notify_method_test);
	sieve_validator_register_command(valdtr, ext, &notify_method_capability_test);
	
	/* Register new set modifier for variables extension */
	sieve_variables_modifier_register
		(ectx->var_ext, valdtr, ext, &encodeurl_modifier);
	
	return TRUE;
}
Пример #10
0
static bool ext_include_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register new commands */
	sieve_validator_register_command(valdtr, ext, &cmd_include);
	sieve_validator_register_command(valdtr, ext, &cmd_return);
	sieve_validator_register_command(valdtr, ext, &cmd_global);

	/* DEPRICATED */
	sieve_validator_register_command(valdtr, ext, &cmd_import);
	sieve_validator_register_command(valdtr, ext, &cmd_export);

	/* Initialize global variables namespace */
	ext_include_variables_global_namespace_init(ext, valdtr);

	return TRUE;
}
Пример #11
0
static bool ext_execute_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register commands */
	sieve_validator_register_command(valdtr, ext, &cmd_execute);

	return TRUE;
}
Пример #12
0
static bool ext_envelope_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register new test */
	sieve_validator_register_command(valdtr, ext, &envelope_test);

	sieve_validator_extension_register
		(valdtr, ext, &envelope_validator_extension, NULL);
	return TRUE;
}
static bool ext_spamvirustest_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register new test */

	if ( sieve_extension_is(ext, virustest_extension) ) {
		sieve_validator_register_command(valdtr, ext, &virustest_test);
	} else {
		if ( sieve_extension_is(ext, spamtest_extension) ) {
			/* Register validator extension to warn for duplicate */
			sieve_validator_extension_register
				(valdtr, ext, &spamtest_validator_extension, NULL);
		}

		sieve_validator_register_command(valdtr, ext, &spamtest_test);
	}

	return TRUE;
}
Пример #14
0
static bool ext_pipe_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register commands */
	sieve_validator_register_command(valdtr, ext, &cmd_pipe);

	/* Register extension to validator */
	sieve_validator_extension_register
		(valdtr, ext, &pipe_validator_extension, NULL);

	return TRUE;
}
Пример #15
0
static bool ext_extracttext_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register validator extension to check for conflict with eextracttext */
	sieve_validator_extension_register
		(valdtr, ext, &extracttext_validator_extension, NULL);

	/* Register new commands */
	sieve_validator_register_command(valdtr, ext, &cmd_extracttext);

	return TRUE;
}
Пример #16
0
static bool ext_duplicate_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	/* Register validator extension to check for conflict between
	   vnd.dovecot.duplicate and duplicate extensions */
	if ( sieve_extension_is(ext, vnd_duplicate_extension) ) {
		sieve_validator_extension_register
			(valdtr, ext, &duplicate_validator_extension, NULL);
	}

	/* Register duplicate test */
	sieve_validator_register_command(valdtr, ext, &tst_duplicate);

	return TRUE;
}
static bool ext_testsuite_validator_load
(const struct sieve_extension *ext, struct sieve_validator *valdtr)
{
	sieve_validator_register_command(valdtr, ext, &cmd_test);
	sieve_validator_register_command(valdtr, ext, &cmd_test_fail);
	sieve_validator_register_command(valdtr, ext, &cmd_test_config_set);
	sieve_validator_register_command(valdtr, ext, &cmd_test_config_unset);
	sieve_validator_register_command(valdtr, ext, &cmd_test_config_reload);
	sieve_validator_register_command(valdtr, ext, &cmd_test_set);
	sieve_validator_register_command(valdtr, ext, &cmd_test_result_print);
	sieve_validator_register_command(valdtr, ext, &cmd_test_result_reset);
	sieve_validator_register_command(valdtr, ext, &cmd_test_message);
	sieve_validator_register_command(valdtr, ext, &cmd_test_message_print);
	sieve_validator_register_command(valdtr, ext, &cmd_test_mailbox_create);
	sieve_validator_register_command(valdtr, ext, &cmd_test_mailbox_delete);
	sieve_validator_register_command(valdtr, ext, &cmd_test_binary_load);
	sieve_validator_register_command(valdtr, ext, &cmd_test_binary_save);

	sieve_validator_register_command(valdtr, ext, &tst_test_script_compile);
	sieve_validator_register_command(valdtr, ext, &tst_test_script_run);
	sieve_validator_register_command(valdtr, ext, &tst_test_multiscript);
	sieve_validator_register_command(valdtr, ext, &tst_test_error);
	sieve_validator_register_command(valdtr, ext, &tst_test_result_action);
	sieve_validator_register_command(valdtr, ext, &tst_test_result_execute);

/*	sieve_validator_argument_override(valdtr, SAT_VAR_STRING, ext,
		&testsuite_string_argument);*/

	testsuite_variables_init(ext, valdtr);

	return testsuite_validator_context_initialize(valdtr);
}