Global Variables
V8.14 sendmail uses more than 100 variables. They are all listed in sendmail.h and conf.c with “lite” comments. Global variables store information such as sendmail’s option values, file descriptor values, macro values, class lists, and database access information. Any can be modified inside checkcompat, but before attempting to do so, study the sendmail C source code to anticipate any unexpected side effects.
In general, you can use almost any of the global variables when designing your own checkcompat( ) routine. The five most interesting are:
RealHostAddr
The IP address of the sending host. This is a union of several sockaddr_ types depending on your selection of protocol types. This can be zero for locally submitted mail.
RealHostName
A string containing the definitive canonical name of the sending host. If it can’t be resolved to a name, it will contain the host’s IP number in text form, surrounded by square brackets.
LogLevel
This variable determines the amount of logging that sendmail does, and is set using the
LogLevel
option (LogLevel on page 1040). You can use thisLogLevel
variable to decide how much, if anything, you wish to log about what you are doing inside the checkcompat( ) function.CurrentLA
An integer representation of the current load average. You might want to use checkcompat( ) to defer mail between selected senders and recipients when the load is very high.
Verbose
An integer that, when nonzero, means that you allow checkcompat( ) to show (print to the ...
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.