1BSMTP(1) Network backup, recovery and verification BSMTP(1)
2
3
4
6 bsmtp - Bacula's SMTP client (mail submission program)
7
8
10 bsmtp [options] <recipient> <...>
11
12
14 bsmtp is a simple mail user agent designed to permit more flexibility
15 than the standard mail programs typically found on Unix systems, and to
16 ease portability. It can even run on Windows machines. It is used by
17 the Director daemon to send notifications and requests to the operator.
18
19
21 -8 Encode the mail in UTF-8.
22
23 -c Set the Cc: header.
24
25 -d nn Set debug level to nn.
26
27 -dt Print timestamp in debug output.
28
29 -f Set the From: header. If not specified, bsmtp will try to use
30 your username.
31
32 -h mailhost:port
33 Use mailhost:port as the SMTP server. (default port: 25)
34
35 -s Set the Subject: header.
36
37 -r Set the Reply-To:: header.
38
39 -l Set the maximum number of lines to be sent. (default: unlimited)
40
41 -? Show version and usage of program.
42
43
45 recipients is a space separated list of email addresses.
46
47 The body of the email message is read from standard input. Message is
48 ended by sending the EOF character (Ctrl-D on many systems) on the
49 start of a new line, much like many 'mail' commands.
50
51 The actual, automated behavior of bsmtp will depend on the mail-related
52 configuration of the Director in the Messages resource of bacula-
53 dir.conf.
54
55 Interactive use of bsmtp is pertinent to manually test and ensure these
56 configuration bits are valid. This is highly recommended.
57
58
60 These commands should each appear on a single line in the configuration
61 file.
62
63 Messages {
64 Name = Standard
65 mailcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f \"\(Bac‐
66 ula\) \<%r\>\"
67 -s \"Bacula: %t %e of %c %l\" %r"
68 operatorcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f
69 \"\(Bacula\) \<%r\>\"
70 -s \"Bacula: Intervention needed for
71 %j\" %r"
72 mail = sysadmin@site.domain.com = all, !skipped
73 operator = sysop@site.domain.com = mount
74 console = all, !skipped, !saved
75 }
76
77 home/bacula/bin is replaced with the path to the Bacula binary direc‐
78 tory, and mail.domain.com is replaced with the fully qualified name of
79 an SMTP server, which usually listen on port 25.
80
81
83 If the -h option is not specified, bsmtp will use environment variable
84 SMTPSERVER, or 'localhost' if not set.
85
86
88 Since bsmtp always uses a TCP connection rather than writing to a spool
89 file, you may find that your From: address is being rejected because it
90 does not contain a valid domain, or because your message has gotten
91 caught in spam filtering rules. Generally, you should specify a fully
92 qualified domain name in the from field, and depending on whether your
93 SMTP gateway is Exim or Sendmail, you may need to modify the syntax of
94 the from part of the message.
95
96 If bsmtp cannot connect to the specified mail host, it will retry to
97 connect to localhost.
98
99
101 If you are getting incorrect dates (e.g. 1970) and you are running with
102 a non-English locale, you might try setting the LANG="en_US" environ‐
103 ment variable.
104
105
107 This manual page was written by Jose Luis Tallon
108 <jltallon@adv-solutions.net>, revised and edited by Lucas B. Cohen
109 <lbc@members.fsf.org>.
110
112 bacula-dir(8)
113
115 This man page document is released under the BSD 2-Clause license.
116
117
118
119Kern Sibbald 6 December 2009 BSMTP(1)