File: commands.info

package info (click to toggle)
procmail-lib 1:1995.08.28-4.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 156 kB
  • ctags: 32
  • sloc: perl: 213; makefile: 143
file content (364 lines) | stat: -rw-r--r-- 12,664 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
This file provides detailed information on the commands supported
by my mail filter (a procmail recipe file called "commands.rc").
This is $Revision: 1.3 $.

In order to be recognized, the following command phrases must
occur on the Subject: header line, and not in the body of the
mail message.  The word "get" may be used instead of "send", and
the noun phrases with spaces may alternatively be hyphenated
(ie:  "send emacs setup" or "send emacs-setup").

    send help
    send info
    send procmailrc
    send procmail info
    send procmail library
    send emacs setup
    send pgp key
    disable autoacks
    enable autoacks

------------------------------------------------------------------

send help
=========

    The file $HELPFILE ("commands.help" by default) is sent as a
    reply.

send info
=========

    The file $INFOFILE ("commands.info" by default) is sent as a
    reply.

send procmailrc
===============

    Returns an annotated, example procmailrc file which must
    be only slightly modified to achieve a working personal
    mail filter.  A good example of how to write a variety of
    procmail filters.

send procmail info
==================

    Returns information about procmail and how to obtain it;
    currently, this is maintained in the "procmail.info" file.

send procmail library
=====================

    A collection of procmail recipe files developed by Alan K.
    Stebbens <aks@hub.ucsb.edu> which may make writing procmail
    recipes easier and more useful.  This library is freely
    available in the same spirit by which procmail and the GNU
    utilities are being made available.

    The following are the files currently comprising the library:

  ackmail.rc
  ----------

    Ackmail.rc is a procmail recipe file which provides the
    functionality of intelligent auto-acknowledgement of incoming
    mail.  It uses a file, named "ackmsg" by default, as the
    prototype message for replies.  The file can contain several
    variables which are substituted with values determined at the
    time of the reply.  The variables currently supported are:
    $SUBJECT, $SENDER, and $UNREAD (the value of $UNREAD is under
    the control of the owner; see the recipe files
    "unread-*.rc").

    Ackmail.rc tries very hard not to respond to daemons,
    mailers, mailing lists, yourself, or a configurable list of
    addresses and names to which you do not wish automatic
    replies.  When used in combination with another recipe file,
    "commands.rc", your recipients can decide for themselves to
    receive these auto-acknowledgements or not.

    Ackmail.rc will only respond with an auto-acknowledge mail
    once per day per address.

    Ackmail.rc can detect when you are on vacation (when you
    create a "vacation.msg" file) and will generate replies with
    this message instead.

    A "cache" of acknowledgements is maintained in a file, named
    "ackmail.cache" by default.

    If the "ackmsg" or "vacation.msg" files contain the string
    $UNREAD, then an attempt to determine the number of unread
    messages will be made.  This computation will depend upon the
    value of the variable MUA, which tells the recipe which Mail
    User Agent (MUA), the user is using.  The value of MUA is
    then used to derive a recipe filename of "unread-$MUA.rc",
    which is then included for procmail processing so that it can
    define  UNREAD correctly for the defined MUA.

    Currently, there are two unread MUA methods: 

      MUA	File		    What
      ===	====		    ===
      default	unread-default.rc   Counts messages in $DEFAULT
      mh	unread-mh.rc	    Counts messages in +inbox

    New MUA values can be added and implemented as additional
    unread-$MUA.rc files

  commands.rc
  -----------

    Commands.rc is a recipe file for procmail which implements
    a "Subject: header command parser and implementor.  Commands.rc
    currently recognizes a given set of commands, but can be
    easily extended or modified.

  dupcheck.rc
  -----------

    This procmail recipe file checks for and removes duplicate
    mail, as determined by the "Message-Id:" header.  If you are
    subscribed to many mailing lists, this is a very useful
    recipe to use -- it will detect and remove duplicate messages
    arriving via different mailing lists but from the same
    originator.

  get-from.rc
  -----------

    A little recipe used to extract the "best" address for the
    sender of the incoming mail.  The result of this recipe is
    left in the variable FROM, with the personal name portion
    extracted into the variable FRIENDLY.  The result of this
    recipe differs from the result of `formail -rt` in that the
    former includes the complete address, with any comments or
    quoted strings, while the latter is only the email address.

    For example, with a message of:

	To: you@yourhost.yourdomain
	From: "Ponce De Leon" <pdl@foo.bar.com>

    the results would be:

	get-from.rc:
	    FROM="Ponce De Leon" <pdl@foo.bar.com
	    FRIENDLY="Ponce De Leon"

	`formail -rt`:
	    pdl@foo.bar.com
	    
  guess-mua.rc
  ------------

    This recipe attempts to get the Mail User Agent (MUA) being
    used by the user receiving the incoming mail.  The purpose of
    this recipe is to provide a hint to "ackmail.rc" so that a
    proper value of UNREAD can be computed when needed.

    This recipe is only invoked if the user has not explicitly
    defined MUA.

    In my environment, I define MUA as MUA=mh, since I use
    procmail to filter my incoming mail into three or more MH
    folders.

    In a "standard" environment, with the incoming mail being
    dropped into the $DEFAULT maildrop, MUA should be defined as
    MUA=default.

    See "ackmail.rc" on details for using this variable.

  headers.rc
  ----------

    A recipe which defines some variables useful in procmail regexp 
    patterns.  The variables defined are:

    PRE_ADDR_SPAN	Spans (matches) any or no text before
			the address.

    POST_ADDR_SPAN	Spans any or no text after an address.

    USERADDR		Matches the user portion of an email 
			address.

    HOSTADDR		Matches the host portion of an email 
			address, including fully-qualified domain
			names.

    HOSTNAME		Matches only the "plain" host name of an
			email address, not including any domain 
			name.

    ADDRESS		Matches either an RFC822 or UUCP email 
			address.

    FROM		Matches the various headers indicating
			the originator of the mail.  These
			headers include "Resent-From:",
			"Resent-Sender:", "From:", "Sender:",
			"X-Envelope-From:", and "From ".

    TO                  Matches the various headers indicating
			the primary recipients of the mail and
			any text up to but not including the
			email address; does not include any Cc:
			fields.

			The primary recipient fields include:
			"Original-Resent-To", "Resent-To:",
			"To:", "X-Envelope-To:",
			"Apparently-To:", and
			"Apparently-Resent-To:".

    CC			Matches the various headers indicating
			the secondary recipients of the mail, and
			any text up to but not including the email
			address.  Does not include any To:
			fields.

    TOCC		This is only for "completeness", and is
			identical to using the builtin procmail
			macro '^TO'.

    LIST_PRECEDENCE	Matches the Precedence: header with one
			of the list attributes: "list", "bulk", or
			"junk".

    LIST_MAILERS	Matches the user names of all common mailing
			list software.

    FROM_LIST		Matches mail received from a mailing list.

    Notes: when these variables are used in a procmail recipe regexp,
    be sure to precede the condition line with a '$' so that the
    variable will be interpreted for its value, rather than used
    literally.  For example, to write a procmail condition to
    check for a generic mail list mail and file it into the folder
    "junk", you could write:

	:0:
	* $ $FROM_LIST
	junk


  unread-default.rc
  -----------------

    This recipe is used to compute the number of unread messages
    sitting in the $DEFAULT system mail drop folder (typically
    /usr/spool/mail/$LOGNAME or /usr/mail/$LOGNAME, depending
    upon your system).  The result of this recipe is to set the
    variable UNREAD to a number or "no".

    This recipe is invoked by "ackmail.rc" when the active reply
    text (from either ackmsg or vacation.msg) contains the string
    '$UNREAD'.

    Currently, the recipe uses "egrep -c" to count the messages,
    which is very fast, but sometimes inaccurate (such as when a
    mail body contains the pattern "^From ").  If accuracy is
    more important to you than speed, edit the file and comment
    out the first recipe, and uncomment the second.

  unread-mh.rc
  ------------
    
    A recipe file used to calculate the number of unread messages
    for MH users.  The variable UNREAD is derived from one of the
    following methods, attempted in the given order:

    a. the user defines MH_INFOLDERS to one or more MH folders in
       which incoming mail is filed.  For each of these folders,
       the sum of the differences between the last and current
       message numbers is accumulated as the result.

    b. the MH user uses the Unseen-Sequence profile entry to keep
       track of pre-filed messges in the +inbox folder, and counts
       the number of messages in this sequence.

    c. the number of messages between the "current" +inbox message
       and the last message in the +inbox is the count of unread
       messages.

send emacs setup
================

    A shar archive of Emacs-lisp files used to provide an Emacs
    initialization method is sent as the reply.  The "setup"
    archive is a couple files of Emacs-lisp utility "setup"
    functions and a collection of "setup" initialization
    "recipes" for many Emacs modes, utilities, and packages.

    The system manager can configure Emacs to provide these setup
    "recipes" of initialization sequences so that each Emacs user
    need only refer, in their ~/.emacs file, to the setup
    sequence with the expression (setup 'FEATURE) where FEATURE
    is the desired feature to be initialized.

    Of course, each user can further customize each feature to
    suit the individual needs or taste, but, by using the "setup"
    package, it is no longer necessary for each Emacs user to
    define the complete initialization sequence for all
    contributed Emacs' packages or utilities.

send pgp key
============

    My current PGP public key is sent as the reply.  Using this
    key, you can then send a message encrypted such that only I
    can read it.  Or, by using my PGP public key, you can verify
    any digitally signed or encrypted mail from me as being
    authentic or not.

disable autoacks
================

    By using "ackmail.rc", my mail filter will automatically
    reply to incoming mail with an acknowledgement.  If you prefer
    not to recieve these acknowledgements, you can send me this
    command and your email address will be added to the "noacks"
    file of addresses.

    Note: if you send mail from several addresses, you will have
    to send this command from each of your addresses, unless you
    have configured your mail agent to use a canonical email
    address for you on a "From:" or "Reply-To:" header.

enable autoacks
===============

    If you decide that you wish to recieve acknowledgements from
    my mail filter after having disabled them, you can send me
    the "enable autoacks" command and your email address will be
    removed from my "noacks" file.

    Be sure to send this command from the same address from which
    you previously sent the "disable" command, or take care to
    set your "From:" or "Reply-To:" headers to the same address.


------------------------------------------------------------------

Procmail, SmartList, and my procmail library are available via FTP:

  ftp://hub.ucsb.edu/pub/mail/procmail-3.11pre3.tar.gz
  ftp://hub.ucsb.edu/pub/mail/SmartList-3.11pre3.tar.gz
  ftp://hub.ucsb.edu/pub/mail/procmail-lib.shar 

If you have any questions about using procmail, there is a mailing list
with lots of helpful members: <procmail@informatik.rwth-aachen.de>.  Use
the address: <procmail-request@informatik.rwth-aachen.de> to subscribe
to the list.

------------------------------------------------------------------

The latest version of procmail can be obtained directly from the
ftp-archive at:

          ftp.informatik.rwth-aachen.de (137.226.225.3)

as (g)zipped tar file:  /pub/packages/procmail/procmail.tar.gz  <160KB
as compressed tar file: /pub/packages/procmail/procmail.tar.Z   <224KB