/*++ /* NAME /* postkick 1 /* SUMMARY /* kick a Postfix service /* SYNOPSIS /* .fi /* \fBpostkick\fR [\fB-c \fIconfig_dir\fR] [\fB-v\fR] /* \fIclass service request\fR /* DESCRIPTION /* The \fBpostkick\fR(1) command sends \fIrequest\fR to the /* specified \fIservice\fR over a local transport channel. /* This command makes Postfix private IPC accessible /* for use in, for example, shell scripts. /* /* Options: /* .IP "\fB-c\fR \fIconfig_dir\fR" /* Read the \fBmain.cf\fR configuration file in the named directory /* instead of the default configuration directory. /* .IP \fB-v\fR /* Enable verbose logging for debugging purposes. Multiple \fB-v\fR /* options make the software increasingly verbose. /* .PP /* Arguments: /* .IP \fIclass\fR /* Name of a class of local transport channel endpoints, /* either \fBpublic\fR (accessible by any local user) or /* \fBprivate\fR (administrative access only). /* .IP \fIservice\fR /* The name of a local transport endpoint within the named class. /* .IP \fIrequest\fR /* A string. The list of valid requests is service-specific. /* DIAGNOSTICS /* Problems and transactions are logged to the standard error /* stream. /* ENVIRONMENT /* .ad /* .fi /* .IP \fBMAIL_CONFIG\fR /* Directory with Postfix configuration files. /* .IP \fBMAIL_VERBOSE\fR /* Enable verbose logging for debugging purposes. /* CONFIGURATION PARAMETERS /* .ad /* .fi /* The following \fBmain.cf\fR parameters are especially relevant to /* this program. /* The text below provides only a parameter summary. See /* \fBpostconf\fR(5) for more details including examples. /* .IP "\fBconfig_directory (see 'postconf -d' output)\fR" /* The default location of the Postfix main.cf and master.cf /* configuration files. /* .IP "\fBapplication_event_drain_time (100s)\fR" /* How long the \fBpostkick\fR(1) command waits for a request to enter the /* Postfix daemon process input buffer before giving up. /* .IP "\fBimport_environment (see 'postconf -d' output)\fR" /* The list of environment variables that a privileged Postfix /* process will import from a non-Postfix parent process, or name=value /* environment overrides. /* .IP "\fBqueue_directory (see 'postconf -d' output)\fR" /* The location of the Postfix top-level queue directory. /* FILES /* /var/spool/postfix/private, private class endpoints /* /var/spool/postfix/public, public class endpoints /* SEE ALSO /* qmgr(8), queue manager trigger protocol /* pickup(8), local pickup daemon /* postconf(5), configuration parameters /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
/* *ParseJCL.
*/ while ((c = GETOPT(argc, argv, "c:v")) > 0) { switch (c) { default:
usage(argv[0]); case'c': if (setenv(CONF_ENV_PATH, optarg, 1) < 0)
msg_fatal("out of memory"); break; case'v':
msg_verbose++; break;
}
} if (argc != optind + 3)
usage(argv[0]); class = argv[optind];
service = argv[optind + 1];
request = argv[optind + 2];
/* *Finishinitializations.
*/
mail_conf_read(); /* Enforce consistent operation of different Postfix parts. */
import_env = mail_parm_split(VAR_IMPORT_ENVIRON, var_import_environ);
update_env(import_env->argv);
argv_free(import_env); if (chdir(var_queue_dir))
msg_fatal("chdir %s: %m", var_queue_dir);
/* *Kicktheservice.
*/ if (mail_trigger(class, service, request, strlen(request)) < 0) {
msg_warn("Cannot contact class %s service %s - perhaps the mail system is down", class, service); exit(1);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.