subjectTemplate¶
Selects the template used to generate the mail subject line.
This parameter applies to ommail: Mail Output Module.
- Name:
subjectTemplate
- Scope:
input
- Type:
word
- Default:
input=none
- Required?:
no
- Introduced:
8.5.0
Description¶
The name of the template to be used as the mail subject. Use this parameter
when message content should appear in the subject. If you just need a constant
subject line, use subjectText instead. The
subjectTemplate and subjectText parameters cannot both be configured
within a single action. If neither is specified, a default, non-configurable
subject line will be generated.
Input usage¶
module(load="ommail")
template(name="mailSubject" type="string" string="Alert: %msg%")
action(
type="ommail"
server="mail.example.net"
port="25"
mailFrom="rsyslog@example.net"
mailTo="operator@example.net"
subjectTemplate="mailSubject"
)
Legacy names (for reference)¶
Historic names/directives for compatibility. Do not use in new configs.
$ActionMailSubject — maps to subjectTemplate (status: legacy)
See also¶
See also ommail: Mail Output Module.
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.