# smfi_getsymval

SYNOPSIS |
    #include <libmilter/mfapi.h>
    char* smfi_getsymval(
    	SMFICTX *ctx,
    	char *symname
    );
Get the value of a sendmail macro.
DESCRIPTION |
Called When | smfi_getsymval may be called from within any of the xxfi_* callbacks. Which macros are defined will depend on when it is called.
Effects | None.
ARGUMENTS |
Argument | Description
--- | ---
ctx | The opaque context structure.
symname | The name of a sendmail macro. Single letter macros can optionally be enclosed in braces ("{" and "}"), longer macro names must be enclosed in braces, just as in a `sendmail.cf` file. See below for default macros.
RETURN VALUES | smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.
NOTES | By default, the following macros are valid in the given contexts:
Sent With | Macros
--- | ---
xxfi_connect | daemon_name, if_name, if_addr, j, _
xxfi_helo | tls_version, cipher, cipher_bits, cert_subject, cert_issuer
xxfi_envfrom | i, auth_type, auth_authen, auth_ssf, auth_author, mail_mailer, mail_host, mail_addr
xxfi_envrcpt | rcpt_mailer, rcpt_host, rcpt_addr
xxfi_data | (none)
xxfi_eoh | (none)
xxfi_eom | msg_id
All macros stay in effect from the point they are received until the end of the connection for the first two sets, just for each recipient for xxfi_envrcpt. and the end of the message for the rest. The macro list can be changed using the confMILTER_MACROS_* options in sendmail.mc or via the smfi_setsymlist function. The scopes of such macros will be determined by when they are set by sendmail. For descriptions of macros' values, please see the "Sendmail Installation and Operation Guide" provided with your sendmail distribution.

Copyright (c) 2000, 2002-2003, 2007 Proofpoint, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.