Next: Starting and Stopping, Up: Invocation [Contents][Index]
• Operation Modifiers | ||
• General Settings | ||
• Preprocessor Options | ||
• Timeout Control | ||
• Logging and Debugging Options | ||
• Informational Options |
Next: General Settings, Up: options [Contents][Index]
Run in daemon mode (default).
Load the script named in the command line and execute the function named start, or ‘main’, if start is not given.
The full invocation syntax for this mode is:
mailfromd [options] --run[=start \ [macro=value] [file args...]
Its parts are:
Any mailfromd options needed to tune its behavior.
Start symbol. Defaults to main
.
Any number of Sendmail macro definitions. macro is the macro name and value is the value to initialize it to.
Script file name. If omitted, default script file will be used (see default script file).
Command line arguments that will be pased to the start MFL function as parameters.
The start function must be defined as:
func start (...) returns number
See Run Mode, for a detailed discussion of this feature.
Run in test mode. See Testing Filter Scripts. Default state is ‘envfrom’. This option implies --stderr (see --stderr).
Next: Preprocessor Options, Previous: Operation Modifiers, Up: options [Contents][Index]
Set socket for the default callout server. This is mainly useful together with the --mtasim option.
This option controls where the output of the echo
statement
(see Echo) goes when mailfromd
is run in test mode,
i.e. using the --test or --run options
(see Testing Filter Scripts).
When used without argument it directs the echo
output to the
standard output stream. If an argument is supplied (second form
above), the output goes to the named file. The file will be created
if it doesn’t exist. Notice, that the use of ‘=’ is compulsory
when specifying an argument. A single dash as a filename means
standard output, so that --echo=- and --echo are
equivalent.
Stay in foreground. When given this option, mailfromd
will
not disconnect itself from the controlling terminal and will run in
the foreground.
Retain the group name when switching to user privileges. See Starting and Stopping.
This option complements the group
configuration statement
(see group).
Add the directory dir to the list of directories to be searched
for include files (see include search path). This setting affects
the #include
statement (see include) and is used to locate
preprocessor setup file (see Preprocessor). If enabled in the
configuration (see pass-includes), directories
from the include search path will also be added to the preprocessor
command line as additional -I options.
Add the directory dir to the list of directories searched for
MFL module files (see module search path). This setting affects
the require
and import
MFL statements. See Modules.
Set the URL of the mailer to use. See Mail Sending Functions.
This option is reserved for use by mtasim
(see mtasim).
Set optimization level for code generator. Two levels are implemented: ‘0’, meaning no optimization, and ‘1’, meaning full optimization.
Set communication socket. Overrides the listen
configuration
statement, which you are advised to use instead (see listen).
Set pidfile name. Overrides the pidfile
configuration
statement, which you are advised to use instead (see pidfile).
Read relayed domains from file. Overrides the
relayed-domain-file
configuration statement (see relayed-domain-file), which you are advised to use instead.
See Avoiding Verification Loops, and the description of
relayed
function (see relayed) for more information.
Read resolver settings from file, instead of the default /etc/resolv.conf.
Set new program state directory. See Local state directory, for
the description of this directory and its purposes. This option
overrides the settings of state-directory
configuration statement,
described in state-directory.
Set source address for TCP connections. Overrides the ‘source-ip’ configuration statement, which you are advised to use instead (see source-ip).
Switch to this user privileges after startup. Overrides the user
configuration file statement, which you are advised to use instead
(see user). Default user is ‘mail’.
Assign value to the global variable var. The variable must be declared in your startup script. See overriding initial values, for a detailed discussion of this option.
Next: Timeout Control, Previous: General Settings, Up: options [Contents][Index]
Following command line options control the preprocessor feature. See Preprocessor, for a detailed discussion of these.
Do not run the preprocessor.
If command is supplied, use it as the external preprocessor
instead of the default. This overrides the
preprocessor.command
setting (see conf-preprocessor).
If used without arguments, forces the use of the configured preprocessor. This form is intended as a way to manually enable the use of the preprocessor if disabled in the configuration.
Define a preprocessor symbol name to have a value value.
This option is ignored if the preprocessor.pass-defines
configuration setting is false
.
Undefine the preprocessor symbol name.
This option is ignored if the preprocessor.pass-defines
configuration setting is false
.
Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output.
Next: Logging and Debugging Options, Previous: Preprocessor Options, Up: options [Contents][Index]
See time interval specification, for information on interval format.
Set MTA connection timeout. Overrides milter-timeout
statement in the mailfromd
configuration file, which you are
advised to use instead (see milter-timeout).
Next: Informational Options, Previous: Timeout Control, Up: options [Contents][Index]
Mention column number in error messages. See location-column. Use --no-location-column to disable
Set debugging level. See Logging and Debugging.
Parse and compile the script file and dump the disassembled listing of the produced code to the terminal. See Logging and Debugging.
Enable debugging the script file parser. While parsing the file, the detailed dump of the parser states and tokens seen will be output.
Enable debugging the lexical analyzer. While parsing the script file, the detailed dump of the lexer states and matched rules will be output.
Show Sendmail macros used in the script file. The macro names are displayed as comma-separated lists, grouped by handler names. See Sendmail, for a detailed description of this option and its usage.
Parse and compile the script file and dump the parse tree in a printable form to the terminal.
Print a cross-reference of variables used in the filter script. See Testing Filter Scripts.
Stop after the preprocessing stage; do not run the compiler proper. The output is in the form of preprocessed source code, which is sent to the standard output. See Preprocessor.
Check script file syntax and exit. If the file is OK, return 0 to the shell, otherwise print appropriate messages to stderr and exit with code 78 (‘configuration error’).
Do not fork sub-processes to serve requests. This option is meant to
assist in debugging mailfromd
. Don’t use it for anything
else but for debugging, as it terribly degrades performance!
Add MFL stack trace information to runtime error output.
Overrides stack-trace
configuration statement. Use the
--no-stack-trace to disable trace information.
See tracing runtime errors, for more information on this feature.
Set desired logging level for gacopyz
library
(see Gacopyz). There are five logging levels. The following
table lists them in order of decreasing priority:
Log fatal errors.
Log error messages.
Log warning messages.
Log informational messages. In particular, this enables printing messages on each subprocess startup and termination, which look like that:
Apr 28 09:00:11 host mailfromd[9411]: connect from 192.168.10.1:50398 Apr 28 09:00:11 host mailfromd[9411]: finishing connection
This level can be useful for debugging your scripts.
Log debugging information.
Log Milter protocol interactions. This level prints huge amounts of information, in particular it displays dumps of each Milter packet sent and received.
Although it is possible to set these levels independently of each
other, it is seldom practical. Therefore, the option
--gacopyz-log=level enables all logging levels from
level up. For example, --gacopyz-log=warn enables
log levels ‘warn’, ‘err’ and ‘fatal’. It is the
default. If you need to trace each subprocess startup and shutdown,
set --gacopyz-log=info. Setting the logging level to
‘proto’ can be needed only for Gacopyz
developers, to
debug the protocol.
Set logger mechanism (mech is one of ‘stderr’, ‘syslog’, ‘syslog:async’). See Logging and Debugging.
Output logs to syslog facility.
Tag syslog entries with the given string, instead of the program name.
Include C source information in debugging messages. This is
similar to setting line-info yes
in the debug
configuration block (see line-info in GNU Mailutils Manual).
The --no-source-info can be used to cancel the effect of the
line-info yes
configuration statement.
You do not need this option, unless you are developing or debugging
mailfromd
.
Synonym for --lint.
Enable or disable action tracing. If --trace is given,
mailfromd
will log all executed actions. See Logging and Debugging.
Enable program instruction tracing. With this option
mailfromd
will log execution of every instruction in the
compiled filter program. The optional arguments allows to specify a
comma-separated list of source code modules for which the tracing is
to be enabled, for example --trace-program=bi_io,bi_db
enables
tracing for functions from modules bi_io.c and bi_db.c
(notice, that you need not give file suffixes in string).
This option is useful for debugging mailfromd
, but is not
advised to use otherwise, since it is very time-costly.
Enable or disable transcript of the SMTP sessions to the log channel. See Logging and Debugging.
Selects default syslog mechanism for diagnostic output.
Directs all logging to standard output. Similar to --logger=stderr.
Same as --dump-xref. See Logging and Debugging.
Previous: Logging and Debugging Options, Up: options [Contents][Index]
Give a short help summary.
Give a short usage message.
Print program version.
Show compilation defaults. See Examining Defaults.
Previous: Logging and Debugging Options, Up: options [Contents][Index]