-L

Syslog label V8.10 and later

Ordinarily, when sendmail logs a message with the syslog(8) facility, it does so using the name “sendmail.” For example, the first part of a typical syslog(8) entry might look like this:

Mar  1 11:30:48 your.host.domain sendmail[18754]: f21IUUxl018753: to=...

The name “sendmail” usually precedes the process ID number, which is set off in square braces.

Beginning with V8.10 sendmail, it is now possible to change the name used by sendmail when it logs into a new name of your choice. This is done by using the -L command-line switch. To illustrate, consider this line from a typical /etc/init.d/sendmail system startup file:

/usr/sbin/sendmail -bd -q30m;

At some sites, administrators prefer to run the listening daemon (the -bd) separately from the queue processing daemon (the -q30m). At such sites, the system startup file might be rewritten (in part) like this:

/usr/sbin/sendmail -Lsendmail-listen -bd;
/usr/sbin/sendmail -Lsendmail-queue -q30m;

Here, the listening daemon will log its messages using the name “sendmail-listen” and the queue handling daemon will log its messages using the name “sendmail-queue.”

Note that if users other than root or trusted users use this switch, it will cause sendmail to syslog(8) a message such as the following:

user uid changed syslog label

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.