aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto>2006-10-13 16:41:59 +0000
committerrhatto <rhatto>2006-10-13 16:41:59 +0000
commit9290bd98bfef3e7bd9cb4b4027fadf97aec70c69 (patch)
tree1a6d11b23aceabbdf188e456c30642aaa0a44f48
parent671a04034c6a436adb052a8e069a2d2b999afefc (diff)
downloadfirma-9290bd98bfef3e7bd9cb4b4027fadf97aec70c69.tar.gz
firma-9290bd98bfef3e7bd9cb4b4027fadf97aec70c69.tar.bz2
small fixes
-rwxr-xr-xfirma64
1 files changed, 33 insertions, 31 deletions
diff --git a/firma b/firma
index b6a6a09..99274e7 100755
--- a/firma
+++ b/firma
@@ -889,7 +889,7 @@ function NewList {
# list description, passphrase and key size
if [ "$return_code" == "0" ]; then
- read -rep " List description (optional): " DESCRIPTION
+ read -rep " List description (optional): " KEY_DESCRIPTION
while true; do
read -rep " Automatically create a passphrase for the list pubkey? (Y/n) " answer
answer="`echo $answer | tr '[:lower:]' '[:upper:]'`"
@@ -967,16 +967,17 @@ function NewList {
if [ -f "$LIST_CONFIG_FILE" ]; then
DeclareGpgVars
echo -e "LIST_HOMEDIR='$LIST_HOMEDIR'\nLIST_ADDRESS='$LIST_ADDRESS'\nLIST_ADMIN='$LIST_ADMIN'\nPASSPHRASE='$PASSPHRASE'" > $LIST_CONFIG_FILE
+ echo -e "KEY_SIZE='$KEY_SIZE'\nKEY_DESCRIPTION=$KEY_DESCRIPTION" >> $LIST_CONFIG_FILE
echo "Now generating your keyring..."
$GPG --gen-key <<EOF
Key-Type: DSA
- Key-Length: 1024
+ Key-Length: $KEY_SIZE
Subkey-Type: ELG-E
Subkey-Length: $KEY_SIZE
- Name-Real: $DESCRIPTION
+ Name-Real: $KEY_DESCRIPTION
Name-Email: $LIST_ADDRESS
Expire-Date: $KEY_EXPIRATION
@@ -1913,16 +1914,16 @@ function SourceFirmaConfig {
[ "$1" == "help" ] && echo -e "\nMandatory global firma config parameters\n"
- [ "$1" == "help" ] && echo -e "\tGPG_BINARY= path to the GnuPG binary" || \
+ [ "$1" == "help" ] && echo -e "\tGPG_BINARY= path to the GnuPG binary." || \
GPG_BINARY="`EvalConfigParameter $FIRMA_CONFIG_FILE GPG_BINARY`"
- [ "$1" == "help" ] && echo -e "\tMAIL_AGENT= path to the mail transport agent to be used (e.g., sendmail)" || \
+ [ "$1" == "help" ] && echo -e "\tMAIL_AGENT= path to the mail transport agent to be used (e.g., sendmail)." || \
MAIL_AGENT="`EvalConfigParameter $FIRMA_CONFIG_FILE MAIL_AGENT`"
- [ "$1" == "help" ] && echo -e "\tMAIL_AGENT_ARGS= command-line arguments to be passed to the command above" || \
+ [ "$1" == "help" ] && echo -e "\tMAIL_AGENT_ARGS= command-line arguments to be passed to the command above." || \
MAIL_AGENT_ARGS="`EvalConfigParameter $FIRMA_CONFIG_FILE MAIL_AGENT_ARGS`"
- [ "$1" == "help" ] && echo -e "\tLISTS_DIR= path to the mailing lists directory" || \
+ [ "$1" == "help" ] && echo -e "\tLISTS_DIR= path to the mailing lists directory." || \
LISTS_DIR="`EvalConfigParameter $FIRMA_CONFIG_FILE LISTS_DIR`"
[ "$1" == "help" ] && echo -e "\nOptional global firma config parameters\n"
@@ -1930,39 +1931,39 @@ function SourceFirmaConfig {
[ "$1" == "help" ] && echo -e "\tUSER= user that runs firma (usually the same as your MTA user);
\t defaults to "nobody"; you can also specify this parameter
\t in each mailing list config file if you plan to have one
-\t user per mailing list" || \
+\t user per mailing list." || \
FIRMA_USER="`EvalConfigParameter $FIRMA_CONFIG_FILE USER`"
[ "$1" == "help" ] && echo -e "\tGROUP= group that runs firma (usually the same as your MTA group);
\t defaults to "nobody"; you can also specify this parameter
\t in each mailing list config file if you plan to have one
-\t group per mailing list" || \
+\t group per mailing list." || \
FIRMA_GROUP="`EvalConfigParameter $FIRMA_CONFIG_FILE GROUP`"
[ "$1" == "help" ] && echo -e "\tLOG_TO_SYSLOG= set to "1" to log errors and warnings to syslog, else firma
-\t will print errors to STDERR" || \
+\t will print errors to STDERR." || \
LOG_TO_SYSLOG="`EvalConfigParameter $FIRMA_CONFIG_FILE LOG_TO_SYSLOG`"
- [ "$1" == "help" ] && echo -e "\tLOGGER_BINARY= if logging to syslog, set the path to logger's binary" || \
+ [ "$1" == "help" ] && echo -e "\tLOGGER_BINARY= if logging to syslog, set the path to logger's binary." || \
LOGGER_BINARY="`EvalConfigParameter $FIRMA_CONFIG_FILE LOGGER_BINARY`"
[ "$1" == "help" ] && echo -e "\tSYSLOG_PRIORITY= if logging to syslog, set a priority for the error messages
-\t (defaults to "user.err")" || \
+\t (defaults to "user.err")." || \
SYSLOG_PRIORITY="`EvalConfigParameter $FIRMA_CONFIG_FILE SYSLOG_PRIORITY`"
[ "$1" == "help" ] && echo -e "\tUSE_GPG_HIDDEN_RECIPIENT_OPTION= set to '1' to use GnuPG's --hidden-recipient
\t option, available from version 1.4.0 onwards
-\t (try 'man gpg' for more information)" || \
+\t (try 'man gpg' for more information)." || \
USE_GPG_HIDDEN_RECIPIENT_OPTION="`EvalConfigParameter $FIRMA_CONFIG_FILE USE_GPG_HIDDEN_RECIPIENT_OPTION`"
[ "$1" == "help" ] && echo -e "\tREMOVE_THESE_HEADERS_ON_ALL_LISTS= headers that should be stripped from list
\t messages on all lists running under firma
\t (space separated case-insensitive entries)
-\t (may include regexps (e.g., X-.*)" || \
+\t (may include regexps (e.g., X-.*)." || \
REMOVE_THESE_HEADERS_ON_ALL_LISTS="`EvalConfigParameter $FIRMA_CONFIG_FILE REMOVE_THESE_HEADERS_ON_ALL_LISTS`"
[ "$1" == "help" ] && echo -e "\tKEYSERVER= default keyserver to import/export keys
-\t (defaults to keyserver.noreply.org)" || \
+\t (defaults to keyserver.noreply.org)." || \
KEYSERVER="`EvalConfigParameter $FIRMA_CONFIG_FILE KEYSERVER`"
}
@@ -1980,31 +1981,31 @@ function SourceListConfig {
[ "$1" == "help" ] && echo -e "\nMandatory list config parameters\n"
- [ "$1" == "help" ] && echo -e "\tLIST_ADDRESS= list's email address" || \
+ [ "$1" == "help" ] && echo -e "\tLIST_ADDRESS= list's email address." || \
LIST_ADDRESS="`EvalConfigParameter $LIST_CONFIG_FILE LIST_ADDRESS`"
[ "$1" == "help" ] && echo -e "\tLIST_REQUEST_ADDRESS= list's email address for administrative
-\t requests (defaults to listname-request@domain" || \
+\t requests (defaults to listname-request@domain." || \
LIST_REQUEST_ADDRESS="`EvalConfigParameter $LIST_CONFIG_FILE LIST_REQUEST_ADDRESS`"
- [ "$1" == "help" ] && echo -e "\tLIST_ADMIN= list's administrators email addresses (space separated)" || \
+ [ "$1" == "help" ] && echo -e "\tLIST_ADMIN= list's administrators email addresses (space separated)." || \
LIST_ADMIN="`EvalConfigParameter $LIST_CONFIG_FILE LIST_ADMIN`"
- [ "$1" == "help" ] && echo -e "\tLIST_HOMEDIR= list's GnuPG homedir, where the list's keyrings are located" || \
+ [ "$1" == "help" ] && echo -e "\tLIST_HOMEDIR= list's GnuPG homedir, where the list's keyrings are located." || \
LIST_HOMEDIR="`EvalConfigParameter $LIST_CONFIG_FILE LIST_HOMEDIR`"
[ "$1" == "help" ] && echo -e "\tUSER= user that runs firma (usually the same as your MTA user);
\t defaults to "nobody"; you can also specify this parameter
\t in each mailing list config file if you plan to have one
-\t user per mailing list" || \
- firma_user="`EvalConfigParameter $FIRMA_CONFIG_FILE USER`"
+\t user per mailing list." || \
+ firma_user="`EvalConfigParameter $LIST_CONFIG_FILE USER`"
[ ! -z "$firma_user" ] && FIRMA_USER="$firma_user"
[ "$1" == "help" ] && echo -e "\tGROUP= group that runs firma (usually the same as your MTA group);
\t defaults to "nobody"; you can also specify this parameter
\t in each mailing list config file if you plan to have one
-\t group per mailing list" || \
- firma_group="`EvalConfigParameter $FIRMA_CONFIG_FILE GROUP`"
+\t group per mailing list." || \
+ firma_group="`EvalConfigParameter $LIST_CONFIG_FILE GROUP`"
[ ! -z "$firma_group" ] && FIRMA_GROUP="$firma_group"
[ "$1" == "help" ] && echo -e "\tPASSPHRASE= passphrase for the list's private keyring\n
@@ -2017,32 +2018,32 @@ function SourceListConfig {
[ "$1" == "help" ] && echo -e "\nOptional list config parameters\n"
- [ "$1" == "help" ] && echo -e "\tSUBJECT_PREFIX= prefix to be included in the subject of list messages" || \
+ [ "$1" == "help" ] && echo -e "\tSUBJECT_PREFIX= prefix to be included in the subject of list messages." || \
SUBJECT_PREFIX="`EvalConfigParameter $LIST_CONFIG_FILE SUBJECT_PREFIX`"
[ "$1" == "help" ] && echo -e "\tREMOVE_THESE_HEADERS= headers that should be stripped from list messages
\t (space separated case-insensitive entries)
-\t (may include regexps (e.g., X-.*)" || \
+\t (may include regexps (e.g., X-.*)." || \
REMOVE_THESE_HEADERS="`EvalConfigParameter $LIST_CONFIG_FILE REMOVE_THESE_HEADERS`"
- [ "$1" == "help" ] && echo -e "\tREPLIES_SHOULD_GO_TO_LIST= set to '1' to add a Reply-To header containing the list address" || \
+ [ "$1" == "help" ] && echo -e "\tREPLIES_SHOULD_GO_TO_LIST= set to '1' to add a Reply-To header containing the list address." || \
REPLIES_SHOULD_GO_TO_LIST="`EvalConfigParameter $LIST_CONFIG_FILE REPLIES_SHOULD_GO_TO_LIST`"
[ "$1" == "help" ] && echo -e "\tSILENTLY_DISCARD_INVALID_MESSAGES= set to '1' to silently discard invalid
\t messages (message not signed/encrypted,
\t sender not subscribed to the list, etc.)
-\t instead of sending bounces back to sender" || \
+\t instead of sending bounces back to sender." || \
SILENTLY_DISCARD_INVALID_MESSAGES="`EvalConfigParameter $LIST_CONFIG_FILE SILENTLY_DISCARD_INVALID_MESSAGES`"
[ "$1" == "help" ] && echo -e "\tKEYSERVER= default keyserver to import/export keys
-\t (defaults to keyserver.noreply.org)" || \
+\t (defaults to keyserver.noreply.org)." || \
keyserver="`EvalConfigParameter $LIST_CONFIG_FILE KEYSERVER`"
[ ! -z "$keyserver" ] && KEYSERVER="$keyserver"
[ "$1" == "help" ] && echo -e "\tREQUIRE_SIGNATURE= wheter messages sent to the list should be (yes) or dont
\t need to be signed to be processed (no); defaults to yes;
\t this doesnt affect the way email administration works,
-\t when signature is mandatory" || \
+\t when signature is mandatory." || \
REQUIRE_SIGNATURE="`EvalConfigParameter $LIST_CONFIG_FILE REQUIRE_SIGNATURE`"
[ "$1" == "help" ] && echo -e "\tDELIVERY_RANDOMIZATION= if non-zero, set a random delay between 0 and N seconds
@@ -2129,7 +2130,7 @@ GLOBAL_VARS="
LIST_ADDRESS LIST_ADMIN LIST_HOMEDIR PASSPHRASE SUBJECT_PREFIX REMOVE_THESE_HEADERS REPLIES_SHOULD_GO_TO_LIST
FIRMA_CONFIG_FILE VERSION
ERROR_MESSAGE EXIT_CODE
- DESCRIPTION LIST_NAME LIST_PATH LIST_CONFIG_FILE KEY_EXPIRATION KEY_SIZE
+ KEY_DESCRIPTION LIST_NAME LIST_PATH LIST_CONFIG_FILE KEY_EXPIRATION KEY_SIZE
GPG_FLAGS GPG GPG_LIST_KEYS GPG_DECRYPT GPG_ENCRYPT
STDIN
ORIG_MESSAGE
@@ -2151,7 +2152,8 @@ GLOBAL_VARS="
KEYSERVER
MODE
REQUIRE_SIGNATURE
- SIGNATURE_MADE_BY_SENDER"
+ SIGNATURE_MADE_BY_SENDER
+ DELIVERY_RANDOMIZATION"
FUNCTIONS="
Usage