1Fsdb::Filter::dbformmaiUls(e3r)Contributed Perl DocumentFastdibo:n:Filter::dbformmail(3)
2
3
4

NAME

6       dbformmail - write a shell script that will send e-mail to many people
7

SYNOPSIS

9       dbformmail [-m MECHANISM] format_file.txt
10

DESCRIPTION

12       Read a ``form mail'' message from the file FORMAT_FILE.TXT, filling in
13       underscore-preceded column-names with data.  Output a shell script
14       which will send each message through some mail transport MECHANISM.
15
16       Do not use this program for evil or I will have to come over and have
17       words with you.
18
19       Note that this program does NOT actually SEND the mail.  It writes a
20       shell script that will send the mail for you.  I recommend you save it
21       to a file, check it (one last time!), then run it with sh.
22
23       Unlike most Fsdb programs, this program does not output a FSDB file.
24

OPTIONS

26       -m MECHANISM
27           Select the mail-sending mechanism: Mail, sendmail, or mh.  Defaults
28           to "Mail".
29
30           Mail uses a Berkeley-style /usr/bin/Mail.  Sendmail invokes
31           /usr/bin/sendmail.  Mh writes messages into the current directory,
32           treating it as an mh-style mailbox (one message per file, with
33           filesnames as sequential integrates).
34
35       This module also supports the standard fsdb options:
36
37       -d  Enable debugging output.
38
39       -i or --input InputSource
40           Read from InputSource, typically a file name, or "-" for standard
41           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
42           objects.
43
44       -o or --output OutputDestination
45           Write to OutputDestination, typically a file name, or "-" for
46           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
47           Fsdb::BoundedQueue objects.
48
49       --autorun or --noautorun
50           By default, programs process automatically, but Fsdb::Filter
51           objects in Perl do not run until you invoke the run() method.  The
52           "--(no)autorun" option controls that behavior within Perl.
53
54       --help
55           Show help.
56
57       --man
58           Show full manual.
59

SAMPLE USAGE

61   Input:
62           #fsdb account passwd uid gid fullname homedir shell
63           johnh * 2274 134 John_Heidemann /home/johnh /bin/bash
64           greg * 2275 134 Greg_Johnson /home/greg /bin/bash
65           root * 0 0 Root /root /bin/bash
66           # this is a simple database
67
68       Sample form (in the file form.txt):
69
70           To: _account
71           From: the sysadmin <root>
72           Subject: time to change your password
73
74           Please change your password regularly.
75           Doesn't this message make you feel safer?
76
77   Command:
78           cat DATA/passwd.fsdb | dbformmail form.txt >outgoing.sh
79
80   Output (in outgoing.sh):
81           #!/bin/sh
82           sendmail 'johnh' <<'END'
83           To: johnh
84           From: the sysadmin <root>
85           Subject: time to change your password
86
87           Please change your password regularly.
88           Doesn't this message make you feel safer?
89
90           END
91           sendmail 'greg' <<'END'
92           (etc.)
93
94       And to send the mail, run
95
96           sh outgoing.sh
97

SEE ALSO

99       Fsdb.
100

CLASS FUNCTIONS

102   new
103           $filter = new Fsdb::Filter::dbformmail(@arguments);
104
105       Create a new dbformmail object, taking command-line arguments.
106
107   set_defaults
108           $filter->set_defaults();
109
110       Internal: set up defaults.
111
112   parse_options
113           $filter->parse_options(@ARGV);
114
115       Internal: parse command-line arguments.
116
117   setup
118           $filter->setup();
119
120       Internal: setup, parse headers.
121
122   run
123           $filter->run();
124
125       Internal: run over each rows.
126
127   finish
128           $filter->finish();
129
130       Internal: write trailer, but no trailer for us.
131
133       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
134
135       This program is distributed under terms of the GNU general public
136       license, version 2.  See the file COPYING with the distribution for
137       details.
138
139
140
141perl v5.32.1                      2021-01-27       Fsdb::Filter::dbformmail(3)
Impressum