comparison roundup/scripts/roundup_mailgw.py @ 4990:63574f1f3570

closed issue2550884 roundup-mailgw --help text improved to explain the allowed parameters better. Suggested by by Karl-Philipp Richter.
author Bernhard Reiter <bernhard@intevation.de>
date Sat, 23 May 2015 23:30:36 +0200
parents 86ef4ab17dc5
children 64b05e24dbd8
comparison
equal deleted inserted replaced
4989:623bf494d9d1 4990:63574f1f3570
43 43
44 def usage(args, message=None): 44 def usage(args, message=None):
45 if message is not None: 45 if message is not None:
46 print message 46 print message
47 print _( 47 print _(
48 """Usage: %(program)s [-v] [-c class] [[-C class] -S field=value]* <instance home> [method] 48 """Usage: %(program)s [-v] [-c class] [[-C class] -S field=value]* [instance home] [mail source [specification]]
49 49
50 Options: 50 Options:
51 -v: print version and exit 51 -v: print version and exit
52 -c: default class of item to create (else the tracker's MAIL_DEFAULT_CLASS) 52 -c: default class of item to create (else the tracker's MAIL_DEFAULT_CLASS)
53 -C / -S: see below 53 -C / -S: see below
54 54
55 The roundup mail gateway may be called in one of four ways: 55 The roundup mail gateway may be called in one of the following ways:
56 . without arguments. Then the env var ROUNDUP_INSTANCE will be tried.
56 . with an instance home as the only argument, 57 . with an instance home as the only argument,
57 . with both an instance home and a mail spool file, 58 . with both an instance home and a mail spool file,
58 . with both an instance home and a POP/APOP server account, or 59 . with an instance home, a mail source type and its specification.
59 . with both an instance home and a IMAP/IMAPS server account.
60 60
61 It also supports optional -C and -S arguments that allows you to set a 61 It also supports optional -C and -S arguments that allows you to set a
62 fields for a class created by the roundup-mailgw. The default class if 62 fields for a class created by the roundup-mailgw. The default class if
63 not specified is msg, but the other classes: issue, file, user can 63 not specified is msg, but the other classes: issue, file, user can
64 also be used. The -S or --set options uses the same 64 also be used. The -S or --set options uses the same
67 of an email message. 67 of an email message.
68 68
69 It can let you set the type of the message on a per email address basis. 69 It can let you set the type of the message on a per email address basis.
70 70
71 PIPE: 71 PIPE:
72 In the first case, the mail gateway reads a single message from the 72 If there is no mail source specified,
73 standard input and submits the message to the roundup.mailgw module. 73 the mail gateway reads a single message from the standard input
74 74 and submits the message to the roundup.mailgw module.
75 UNIX mailbox: 75
76 In the second case, the gateway reads all messages from the mail spool 76 Mail source "mailbox":
77 In this case, the gateway reads all messages from the UNIX mail spool
77 file and submits each in turn to the roundup.mailgw module. The file is 78 file and submits each in turn to the roundup.mailgw module. The file is
78 emptied once all messages have been successfully handled. The file is 79 emptied once all messages have been successfully handled. The file is
79 specified as: 80 specified as:
80 mailbox /path/to/mailbox 81 mailbox /path/to/mailbox
81 82
82 In all of the following the username and password can be stored in a 83 In all of the following mail source type the username and password
83 ~/.netrc file. In this case only the server name need be specified on 84 can be stored in a ~/.netrc file. If done so case only the server name
84 the command-line. 85 need to be specified on the command-line.
85 86
86 The username and/or password will be prompted for if not supplied on 87 The username and/or password will be prompted for if not supplied on
87 the command-line or in ~/.netrc. 88 the command-line or in ~/.netrc.
88 89
89 POP: 90 POP:
90 In the third case, the gateway reads all messages from the POP server 91 For the mail source "pop", the gateway reads all messages from the POP server
91 specified and submits each in turn to the roundup.mailgw module. The 92 specified and submits each in turn to the roundup.mailgw module. The
92 server is specified as: 93 server is specified as:
93 pop username:password@server 94 pop username:password@server
94 Alternatively, one can omit one or both of username and password: 95 Alternatively, one can omit one or both of username and password:
95 pop username@server 96 pop username@server

Roundup Issue Tracker: http://roundup-tracker.org/