REPORTER-MAILX(1)

๐Ÿ“ฆ
version 2.17.15 ยท 3 versions
, in opensuse-leap 16.0

๐Ÿ’Œ REPORTER-MAILX(1) ๐Ÿ’Œ

okay so welcome to the LIBREPORT MANUAL page for reporter-mailx, bestie. this one is a little email-sending icon: it grabs a problem directory, builds an email from whatโ€™s inside, and hands it to mailx so it can go to the recipient you picked. โœจ

you can set email message properties in a config file, and through environment variables too. and thereโ€™s a whole formatting-file situation for making the email look how you want. ๐ŸŽ€

๐ŸŒธ NAME ๐ŸŒธ

reporter-mailx โ€” sends the contents of a problem directory via email. ๐Ÿ’Œ

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

reporter-mailx [-v] -d DIR [-c CONFFILE] [-F FMTFILE]

โœจ DESCRIPTION โœจ

hereโ€™s the vibe: the tool reads a problem directory, puts together an email message from the directory contents, and uses mailx to send that message to specified recipient. ๐Ÿ“ฌ

you can specify the email messageโ€™s properties in a configuration file, and via environment variables. ๐Ÿ’…

๐ŸŽ€ Configuration file ๐ŸŽ€

the configuration file is full of entries shaped like Option = Value.

the options are:

  • Subject โ€” the subject of the email message. โœ‰๏ธ
  • EmailFrom โ€” the sender of the email message. ๐Ÿซถ
  • EmailTo โ€” the recipient of the email message. ๐Ÿ“ฎ
  • SendBinaryData โ€” use yes/true/on/1 to attach all binary files from the problem directory to the email. heads up: this can cause the emails to be very large. ๐Ÿ˜ญ

๐Ÿงš Formatting configuration files ๐Ÿงš

lines starting with # are ignored.

lines can be continued on the next line using trailing backslash.

format:

%summary:: subject format
section:: element1[,element2]...

thereโ€™s also the literal text line to be added to email. it can be empty. (empty lines are NOT ignored! ๐Ÿ’€)

subject format is a line of text, where %element% is replaced by text elementโ€™s content, and [[...%element%...]] block is used only if %element% exists. [[...]] blocks can nest.

sections can be:

  • %summary: email subject format string.
  • %attach: a list of elements to attach.
  • text, double colon (::) and the list of comma-separated elements.

elements can be:

  • problem directory element names, which get formatted as:
<element_name>: <contents>

or:

<element_name>:
:<contents>
:<contents>
:<contents>
  • problem directory element names prefixed by %bare_, which is formatted as-is, without <element_name>: and colons.
  • %oneline, %multiline, %text wildcards, which select all corresponding elements for output or attachment.
  • %binary wildcard, valid only for %attach section, instructs to attach binary elements.
  • problem directory element names prefixed by -, which excludes given element from all wildcards.

nonexistent elements are silently ignored. if none of elements exists, the section will not be created. no drama, it just doesnโ€™t show up. ๐Ÿ’…

๐ŸŒˆ Integration with ABRT events ๐ŸŒˆ

reporter-mailx can be used as a reporter, to allow users report problems via email when they decide to do it. this usage is pre-configured in /etc/libreport/events.d/mailx_event.conf:

EVENT=report_Mailx      reporter-mailx

it can also be used to notify administrator automatically when a problem happens. when this is desired, modify the event configuration file to run the tool on the post-create event:

EVENT=post-create       reporter-mailx

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -d DIR โ€” path to problem directory. ๐Ÿ“
  • -c CONFFILE โ€” path to configuration file. when used in ABRT event system, the file contains site-wide configuration. users can change the values via environment variables. ๐Ÿ”ง
  • -F CONF_FORMAT_FILE โ€” formatting file for an email. ๐ŸŽจ

๐Ÿ’œ ENVIRONMENT VARIABLES ๐Ÿ’œ

environment variables take precedence over values provided in the configuration file. main character energy, honestly. ๐Ÿ‘‘

  • Mailx_Subject โ€” subject of the email message. โœ‰๏ธ
  • Mailx_EmailFrom โ€” sender of the email message. ๐Ÿซถ
  • Mailx_EmailTo โ€” recipient of the email message. if nor the environment variable nor the corresponding option is defined, the message is send to "root@localhost". ๐Ÿ“ฌ
  • Mailx_SendBinaryData โ€” use yes/true/on/1 to attach all binary files from the problem directory to the email. ๐Ÿ“Ž

๐Ÿ“ FILES ๐Ÿ“

  • /usr/share/libreport/conf.d/plugins/mailx.conf โ€” readonly default configuration files. ๐Ÿ”’
  • /etc/libreport/plugins/mailx.conf โ€” configuration files. ๐Ÿ“

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

mailx_event.conf(5), mailx.conf(5), report_mailx.conf(5)

๐ŸŒŸ AUTHORS ๐ŸŒŸ

  • ABRT team ๐Ÿ‘‘

mwah ๐Ÿ’‹ โ€” this iconic little page is from LIBREPORT 2.17.15, dated 07/15/2024. stay legendary, bestie. ๐Ÿซถ