---
name: "extsmail.conf"
section: "5"
platform: "linux"
package: "extsmail"
version: "2.5-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/extsmail.conf"
---

# extsmail.conf(5)

configure robust sending of e-mail to external commands

## NAME

**extsmail.conf** – configure robust sending of e-mail to external commands

## DESCRIPTION

**extsmail.conf** is used to configure [extsmail(1)](/extsmail/1.md) and [extsmaild(1)](/extsmaild/1.md). It consists of one or more  *key* *=* *value* pairs. The following variables are defined:

- spool\_dir

  Sets the location of the spool directory used by [extsmail(1)](/extsmail/1.md) and [extsmaild(1)](/extsmaild/1.md). This is the only variable which must be set in every configuration file.

- notify\_failure\_interval

  Specifies how often notifications of unsuccessful deliveries should be made. If unspecified, or set to 0, notifications will never be made. Times are specified as a number followed by *d* (days),  *h* (hours), *m* (minutes), or  *s* (seconds).

- notify\_failure\_cmd

  The shell command to be executed when *notify\_failure\_interval* seconds / minutes / hours / days have elapsed since the last fully successful send cycle. If the string *${TIME}* exists in the command, it is replaced with a pretty printed string detailing how much time has elapsed since the last fully successfully send cycle. The resulting string is then passed to [system(3)](/system/3.md). Note that no security checking is (or can be) done on the command, so this option should be used with caution if a single configuration file serves multiple users. Please check the warnings that come with [system(3)](/system/3.md).

- notify\_success\_cmd

  The shell command to be executed when 1 or more messages have been successfully sent. If the string *${SUCCESSES}* exists in the command, it is replaced with a string representing the number of successfully sent messages. The same warnings that apply to *notify\_failure\_cmd* also apply to this command.

## FILES

The *extsmail* configuration file is searched for, in order, in the following locations:

- \~/.extsmail/conf

  Per-user *extsmail* configuration.

- /etc/extsmail/conf

  System-wide *extsmail* configuration.

## EXAMPLES

The simplest configuration file looks as follows:

```
spool_dir = "~/somewhere"
```

A more complex configuration which uses a notification framework to inform the user of mail sending and failure looks as follows:

```
spool_dir = "~/somewhere"
notify_failure_interval = 30m
notify_failure_cmd = "notify-send -a extsmaild -c email
  -i mail-send -u critical 'extsmaild: ${TIME} since a fully
  successful send cycle'"
notify_success_cmd = "notify-send -a extsmaild -c email
  -i mail-send -u low 'extsmaild: ${SUCCESSES} messages
  successfully sent'"
```

## SEE ALSO

[extsmail(1)](/extsmail/1.md), [extsmail.externals(5)](/extsmail.externals/5.md), [extsmaild(1)](/extsmaild/1.md)

## AUTHORS

Laurence Tratt ⟨http://tratt.net/laurie/⟩
