Mercurial > p > roundup > code
view share/man/man1/roundup-mailgw.1 @ 6823:fe0091279f50
Refactor session db logging and key generation for sessions/otks
While I was working on the redis sessiondb stuff, I noticed that
log_wanrning, get_logger ... was duplicated. Also there was code to
generate a unique key for otks that was duplicated.
Changes:
creating new sessions_common.py and SessionsCommon class to provide
methods:
log_warning, log_info, log_debug, get_logger, getUniqueKey
getUniqueKey method is closer to the method used to make
session keys in client.py.
sessions_common.py now report when random_.py chooses a weak
random number generator. Removed same from rest.py.
get_logger reconciles all logging under
roundup.hyperdb.backends.<name of BasicDatabase class>
some backends used to log to root logger.
have BasicDatabase in other sessions_*.py modules inherit from
SessionCommon.
change logging to use log_* methods.
In addition:
remove unused imports reported by flake8 and other formatting
changes
modify actions.py, rest.py, templating.py to use getUniqueKey
method.
add tests for new methods
test_redis_session.py
swap out ModuleNotFoundError for ImportError to prevent crash in
python2 when redis is not present.
allow injection of username:password or just password into redis
connection URL. set pytest_redis_pw envirnment variable to password
or user:password when running test.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 07 Aug 2022 01:51:11 -0400 |
| parents | 76e270b35e63 |
| children | f0d39308819f |
line wrap: on
line source
.TH ROUNDUP-MAILGW 1 "07 October 2019" .SH NAME roundup-mailgw \- mail gateway for roundup .SH SYNOPSIS \fBroundup-mailgw\fP [\fI-v\fP] [\fI-c\fP \fIdefault_class\fP] [[\fI-C\fP \fIclass\fP] \fI-S\fP \fIfield=value\fP] [\fIinstance_home\fP] [\fImail source [specification]\fP] .SH OPTIONS .TP \fB-v\fP Print version and exit. .TP \fB-c\fP \fIhyperdb class\fP specify the default tracker class - one of issue (the default), msg, file, user etc. Overrides the tracker's mailgw default_class setting. .TP \fB-C\fP \fIhyperdb class\fP specify a tracker class - one of msg (the default), issue, file, user - to manipulate with -S options .TP \fB-S\fP \fIproperty\fP\fB=\fP\fIvalue\fP[\fB;\fP\fIproperty\fP\fB=\fP\fIvalue\fP] \fIpairs\fP specify the values to set on the class specified by \fB-C\fP using the same format as the Subject line property manipulations. Can also be specified with \fB--set\fP. .SH DESCRIPTION The roundup mail gateway may be called in one of four ways: .IP \(bu without arguments which will use the env var ROUNDUP_INSTANCE, .IP \(bu with an instance_home as the only argument, .IP \(bu with both an instance_home and a mail spool file, or .IP \(bu with both an instance home and a mail source type and its specification. .PP \fBPIPE\fP .br In the first and second cases, the mail gateway reads a single message from the standard input and submits the message to the roundup.mailgw module. \fBUNIX mailbox\fP .br In the second case, the gateway reads all messages from the mail spool file and submits each in turn to the roundup.mailgw module. The file is emptied once all messages have been successfully handled. The file is specified as: \fImailbox /path/to/mailbox\fP In all of the following the username and password can be stored in a ~/.netrc file. In this case only the server name need be specified on the command-line. The username and/or password will be prompted for if not supplied on the command-line or in ~/.netrc. \fBPOP\fP .br In the third case, the gateway reads all messages from the POP server specified and submits each in turn to the roundup.mailgw module. The server is specified as: \fBpop\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver\fP .br The username and password may be omitted: \fBpop\fP \fIusername\fP\fB@\fP\fIserver\fP \fBpop\fP \fIserver\fP .br are both valid. \fBPOPS\fP .br Connect to the POP server over ssl/tls. This requires python 2.4 or later. This supports the same notation as POP. \fBpops\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver\fP .br etc. \fBAPOP\fP .br Same as POP, but using Authenticated POP: \fBapop\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver\fP \fBIMAP\fP .br Connect to an IMAP server. This supports the same notation as that of POP mail. \fBimap\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver\fP .br It also allows you to specify a specific mailbox other than INBOX using this format: \fBimap\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver mailbox\fP \fBIMAPS\fP .br Connect to an IMAP server over ssl/tls. This supports the same notation as IMAP. \fBimaps\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver\fP [\fImailbox\fP] \fBIMAPS_CRAM\fP .br Connect to an IMAP server over ssl/tls using CRAM-MD5 authentication. This supports the same notation as IMAP. \fBimaps_cram\fP \fIusername\fP\fB:\fP\fIpassword\fP\fB@\fP\fIserver\fP [\fImailbox\fP] .SH ENVIRONMENT VARIABLES \fBROUNDUP_INSTANCE\fP .br This can be used to set the instance directory. If it is set, the \fIinstance_home\fP argument is optional. .SH EXAMPLE If your msg class has a messsagetype property you can set up aliases to receive the different types of messages. Setting up an alias in your MTA Using: tracker: |/tools/roundup/bin/roundup-mailgw -C msg -S "messagetype=reply - to all" /var/roundup/sysadmin (the lines are split for readability. In the alias file they will be on the same line). Replace /tools/roundup/bin/roundup-mailgw by your path to the roundup-mailgw. This creates the email alias "tracker". All messages sent to it have their messagetype property set to "reply - to all". The roundup tracker instance is located at /var/roundup/sysadmin. A comment alias would receive emails at tracker_comment with: tracker_comment: |/tools/roundup/bin/roundup-mailgw -C msg -S "messagetype=comment - to technical" /var/roundup/sysadmin which would be a technical message. These messages can trigger different workflows based on the messagetype. Both examples use the default class specified in the tracker's config.ini (usually the issue class). .SH AUTHOR This manpage was written by Bastian Kleineidam <calvin@debian.org> for the Debian distribution of roundup. The main author of roundup is Richard Jones <richard@users.sourceforge.net>. Updates by John Rouillard <rouilj@users.sourceforge.net>.
