1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "https://www.w3.org/TR/html4/loose.dtd"> 3 <html> <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <link rel='stylesheet' type='text/css' href='postfix-doc.css'> 6 <title> Postfix manual - postlog(1) </title> 7 </head> <body> <pre> 8 POSTLOG(1) POSTLOG(1) 9 10 <b><a name="name">NAME</a></b> 11 postlog - Postfix-compatible logging utility 12 13 <b><a name="synopsis">SYNOPSIS</a></b> 14 <b>postlog</b> [<b>-iv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-p</b> <i>priority</i>] [<b>-t</b> <i>tag</i>] [<i>text...</i>] 15 16 <b><a name="description">DESCRIPTION</a></b> 17 The <a href="postlog.1.html"><b>postlog</b>(1)</a> command implements a Postfix-compatible logging inter- 18 face for use in, for example, shell scripts. 19 20 By default, <a href="postlog.1.html"><b>postlog</b>(1)</a> logs the <i>text</i> given on the command line as one 21 record. If no <i>text</i> is specified on the command line, <a href="postlog.1.html"><b>postlog</b>(1)</a> reads 22 from standard input and logs each input line as one record. 23 24 Logging is sent to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>, and to the standard error 25 stream (with Postfix < 3.8, <a href="postlog.1.html"><b>postlog</b>(1)</a> writes to the standard error 26 stream only if that stream is connected to a terminal). 27 28 The following options are implemented: 29 30 <b>-c</b> <i>config</i><b>_</b><i>dir</i> 31 The <a href="postconf.5.html"><b>main.cf</b></a> configuration file is in the named directory instead 32 of the default configuration directory. See also the MAIL_CONFIG 33 environment setting below. 34 35 <b>-i</b> (obsolete) 36 Include the process ID in the logging tag. This flag is ignored 37 as of Postfix 3.4, where the PID is always included. 38 39 <b>-p</b> <i>priority</i> (default: <b>info</b>) 40 Specifies the logging severity: <b>info</b>, <b>warn</b>, <b>error</b>, <b>fatal</b>, or 41 <b>panic</b>. With Postfix 3.1 and later, the program will pause for 1 42 second after reporting a <b>fatal</b> or <b>panic</b> condition, just like 43 other Postfix programs. 44 45 <b>-t</b> <i>tag</i> Specifies the logging tag, that is, the identifying name that 46 appears at the beginning of each logging record. A default tag 47 is used when none is specified. 48 49 <b>-v</b> Enable verbose logging for debugging purposes. Multiple <b>-v</b> 50 options make the software increasingly verbose. 51 52 <b><a name="security">SECURITY</a></b> 53 The <a href="postlog.1.html"><b>postlog</b>(1)</a> command is designed to run with set-groupid privileges, 54 so that it can connect to the <a href="postlogd.8.html"><b>postlogd</b>(8)</a> daemon process (Postfix 3.7 55 and later; earlier implementations of this command must not have 56 set-groupid or set-userid permissions). 57 58 <b><a name="environment">ENVIRONMENT</a></b> 59 MAIL_CONFIG 60 Directory with the <a href="postconf.5.html"><b>main.cf</b></a> file. In order to avoid exploitation 61 of set-group ID privileges, a non-default directory is allowed 62 only if: 63 64 <b>o</b> The name is listed in the default <a href="postconf.5.html"><b>main.cf</b></a> file with the 65 <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a></b> or <b><a href="postconf.5.html#multi_instance_directories">multi_instance_directo</a>-</b> 66 <b><a href="postconf.5.html#multi_instance_directories">ries</a></b> configuration parameter. 67 68 <b>o</b> The command is invoked by the super-user. 69 70 <b><a name="configuration_parameters">CONFIGURATION PARAMETERS</a></b> 71 The following <a href="postconf.5.html"><b>main.cf</b></a> parameters are especially relevant to this pro- 72 gram. 73 74 The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for 75 more details including examples. 76 77 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 78 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 79 figuration files. 80 81 <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b> 82 The list of environment variables that a privileged Postfix 83 process will import from a non-Postfix parent process, or 84 name=value environment overrides. 85 86 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 87 The syslog facility of Postfix logging. 88 89 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 90 A prefix that is prepended to the process name in syslog 91 records, so that, for example, "smtpd" becomes "prefix/smtpd". 92 93 Available in Postfix 3.4 and later: 94 95 <b><a href="postconf.5.html#maillog_file">maillog_file</a> (empty)</b> 96 The name of an optional logfile that is written by the Postfix 97 <a href="postlogd.8.html"><b>postlogd</b>(8)</a> service. 98 99 <b><a href="postconf.5.html#postlog_service_name">postlog_service_name</a> (postlog)</b> 100 The name of the <a href="postlogd.8.html"><b>postlogd</b>(8)</a> service entry in <a href="master.5.html">master.cf</a>. 101 102 Available in Postfix 3.9 and later: 103 104 <b><a href="postconf.5.html#maillog_file_permissions">maillog_file_permissions</a> (0600)</b> 105 The file access permissions that will be set when the file 106 $<a href="postconf.5.html#maillog_file">maillog_file</a> is created for the first time, or when the file is 107 created after an existing file is rotated. 108 109 <b><a name="see_also">SEE ALSO</a></b> 110 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 111 <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging 112 syslogd(8), system logging 113 114 <b><a name="license">LICENSE</a></b> 115 The Secure Mailer license must be distributed with this software. 116 117 <b><a name="history">HISTORY</a></b> 118 The <a href="postlog.1.html"><b>postlog</b>(1)</a> command was introduced with Postfix version 3.4. 119 120 <b>AUTHOR(S)</b> 121 Wietse Venema 122 IBM T.J. Watson Research 123 P.O. Box 704 124 Yorktown Heights, NY 10598, USA 125 126 Wietse Venema 127 Google, Inc. 128 111 8th Avenue 129 New York, NY 10011, USA 130 131 POSTLOG(1) 132 </pre> </body> </html> 133