BSMTP(1)

πŸ“¦
version 15.0.3 Β· 2 versions
  • 15.0.3 Β· alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 9, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 25.0.3 Β· alpine 3.24
, in alpine 3.22, alpine 3.23, alpine 3.24, centos-stream 9, debian bookworm, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’Œ BSMTP(1) β€” Bacula's SMTP client, aka the mail submission program, bestie edition

okay so you found the bsmtp page, welcome, pull up a chair 🫢 this is from the Network backup, recovery and verification corner of the world and it's genuinely iconic.


✨ NAME ✨

bsmtp β€” Bacula's SMTP client (mail submission program). she sends mail. that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

bsmtp [options] <recipient> <...>

πŸ¦‹ DESCRIPTION πŸ¦‹

so bsmtp is a lil baby mail user agent β€” a simple one, on purpose. the whole point is that it's more flexible than the standard mail programs you usually trip over on Unix systems, and it's easier to port around. it can even run on Windows machines, no cap. πŸͺŸ

the Director daemon uses it to send notifications and requests to the operator. that's the main character job. πŸ‘‘


πŸ’– OPTIONS πŸ’–

  • -8 β€” encode the mail in UTF-8. ✨
  • -c β€” set the Cc: header.
  • -d nn β€” set debug level to nn.
  • -dt β€” print timestamp in debug output.
  • -f β€” set the From: header. if you don't specify it, bsmtp will try to use your username.
  • -h mailhost:port β€” use mailhost:port as the SMTP server. (default port: 25)
  • -s β€” set the Subject: header.
  • -r β€” set the Reply-To:: header.
  • -l β€” set the maximum number of lines to be sent. (default: unlimited)
  • -? β€” show version and usage of program. the little cry for help, love that for us. 😭

πŸŽ€ USAGE πŸŽ€

recipients is a space separated list of email addresses. like, just yeet them in there one after another.

the body of the email message is read from standard input. the message is ended by sending the EOF character (Ctrl-D on many systems) on the start of a new line, much like many mail commands. so yes bestie, you're typing the whole email into the terminal and then pressing the magic keys. πŸ’€

the actual, automated behavior of bsmtp will depend on the mail-related configuration of the Director in the Messages resource of bacula-dir.conf.

interactive use of bsmtp is pertinent to manually test and ensure these configuration bits are valid. this is highly recommended. fr fr, do it. 🫢


🌈 CONFIGURATION 🌈

these commands should each appear on a single line in the configuration file. (yes, even the ones that look like they're falling off the edge of the page. that's just how the manpage wrapped them, don't @ me.)

Messages {
  Name = Standard
  mailcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f
\"\(Bacula\) \<%r\>\"
                           -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f
\"\(Bacula\) \<%r\>\"
                                 -s \"Bacula: Intervention needed for
%j\" %r"
  mail = sysadmin@site.domain.com = all, !skipped
  operator = sysop@site.domain.com = mount
  console = all, !skipped, !saved
 }

home/bacula/bin is replaced with the path to the Bacula binary directory, and mail.domain.com is replaced with the fully qualified name of an SMTP server, which usually listen on port 25. πŸ‘‘


🌟 ENVIRONMENT 🌟

if the -h option is not specified, bsmtp will use environment variable SMTPSERVER, or localhost if not set. she's got a fallback, she's prepared. 🧚


πŸ’œ NOTES πŸ’œ

since bsmtp always uses a TCP connection rather than writing to a spool file, you may find that your From: address is being rejected because it does not contain a valid domain, or because your message has gotten caught in spam filtering rules. 😭 generally, you should specify a fully qualified domain name in the from field, and depending on whether your SMTP gateway is Exim or Sendmail, you may need to modify the syntax of the from part of the message.

if bsmtp cannot connect to the specified mail host, it will retry to connect to localhost. she tries again. resilient queen. πŸ”₯


πŸ’€ BUGS πŸ’€

if you are getting incorrect dates (e.g. 1970) and you are running with a non-English locale, you might try setting the LANG="en_US" environment variable. yes, the year is stuck in 1970. no, it's not a time machine. πŸ™ˆ


⭐ AUTHOR ⭐

this manual page was written by Jose Luis Tallon <jltallon@adv-solutions.net>, revised and edited by Lucas B. Cohen <lbc@members.fsf.org>.


🌸 SEE ALSO 🌸

bacula-dir(8)


this man page document is released under the BSD 2-Clause license.


okay that's the whole thing, you're fully caught up bestie πŸ’– this page came from Kern Sibbald and it's dated 6 December 2009, filed under BSMTP(1). go forth and send your notifications. slay. βœ¨πŸŽ€πŸ¦‹