Skip to content

Commit 5f6b90b

Browse files
committed
issue2550757: one bug raised by issue fixed. Patch created by
W. Trevor King (wking) for documentation of mailgw applied by John Rouillard.
1 parent dacb5fd commit 5f6b90b

File tree

3 files changed

+44
-17
lines changed

3 files changed

+44
-17
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Fixed:
3939
- issue2550748: Crash when creating new issues with non-existing
4040
multilink values (in classic template). Applied patch so it
4141
now errors the same way as an update does. (applied by John Rouillard)
42+
- issue2550757: one bug raised by issue fixed. Patch created by
43+
W. Trevor King (wking) for documentation of mailgw applied by
44+
John Rouillard.
4245

4346
2016-01-11: 1.5.1
4447

doc/user_guide.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,20 @@ Subject-line information
402402

403403
The subject line of the incoming message is examined to find one of:
404404

405-
1. the item that the message is responding to,
406-
2. the type of item the message should create, or
407-
3. we default the item class and try some trickiness
405+
1. a case insentive ``help``,
406+
2. a match for ``-- key <OneTimeKey>``,
407+
3. the item that the message is responding to,
408+
4. the type of item the message should create, or
409+
5. we default the item class and try some trickiness.
410+
411+
If the subject is ``help`` (case insensitive), the gateway responds
412+
with an explaination of the interface.
413+
414+
If a one-time key is found, we're processing an in-progress
415+
registration confirmation.
408416

409417
If the subject line contains a prefix in ``[square brackets]`` then
410-
we're looking at case 1 or 2 above. Any "re:" or "fwd:" prefixes are
418+
we're looking at case 3 or 4 above. Any "re:" or "fwd:" prefixes are
411419
stripped off the subject line before we start looking for real
412420
information.
413421

@@ -421,7 +429,7 @@ item of that class with its "messages" property initialized to contain
421429
the new "msg" item and its "files" property initialized to contain any
422430
new "file" items.
423431

424-
The third case above - where no ``[information]`` is provided, the
432+
The fifth case above - where no ``[information]`` is provided, the
425433
tracker's ``MAIL_DEFAULT_CLASS`` configuration variable defines what
426434
class of item the message relates to. We try to match the subject line
427435
to an existing item of the default class, and if there's a match, the

roundup/mailgw.py

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ class node. Any parts of other types are each stored in separate files
3131
special handling of the first text part) if unpack_rfc822 is set in
3232
the mailgw config section.
3333
34-
Summary
35-
-------
36-
The "summary" property on message nodes is taken from the first non-quoting
37-
section in the message body. The message body is divided into sections by
38-
blank lines. Sections where the second and all subsequent lines begin with
39-
a ">" or "|" character are considered "quoting sections". The first line of
40-
the first non-quoting section becomes the summary of the message.
41-
4234
Addresses
4335
---------
4436
All of the addresses in the To: and Cc: headers of the incoming message are
@@ -54,10 +46,26 @@ class node. Any parts of other types are each stored in separate files
5446
5547
Actions
5648
-------
57-
The subject line of the incoming message is examined to determine whether
58-
the message is an attempt to create a new item or to discuss an existing
59-
item. A designator enclosed in square brackets is sought as the first thing
60-
on the subject line (after skipping any "Fwd:" or "Re:" prefixes).
49+
The subject line of the incoming message is examined to determine
50+
whether the message is an attempt to create a new item, discuss an
51+
existing item, or execute some other command.
52+
53+
If the subject consists of one of the following (case insensitive),
54+
the corresponding action is taken:
55+
56+
help
57+
Respond with an explanation of this interface.
58+
59+
If the subject contains the following, the corresponding action is
60+
taken:
61+
62+
-- key <OneTimeKey>
63+
Complete an in-progress user registration.
64+
65+
If the email is not a command, it is either a new item or a message
66+
associated with an existing item. A designator enclosed in square
67+
brackets is sought as the first thing on the subject line (after
68+
skipping any "Fwd:" or "Re:" prefixes).
6169
6270
If an item designator (class name and id number) is found there, the newly
6371
created "msg" node is added to the "messages" property for that item, and
@@ -68,6 +76,14 @@ class node. Any parts of other types are each stored in separate files
6876
"msg" node and its "files" property initialized to contain any new "file"
6977
nodes.
7078
79+
Summary
80+
-------
81+
The "summary" property on message nodes is taken from the first non-quoting
82+
section in the message body. The message body is divided into sections by
83+
blank lines. Sections where the second and all subsequent lines begin with
84+
a ">" or "|" character are considered "quoting sections". The first line of
85+
the first non-quoting section becomes the summary of the message.
86+
7187
Triggers
7288
--------
7389
Both cases may trigger detectors (in the first case we are calling the

0 commit comments

Comments
 (0)