aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-02-24 19:05:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-02-24 19:05:44 -0200
commit0d86856e51af59a670cdb96762d74031abb5025b (patch)
tree9171c72396e8b9f6c8ece95e10bb40d17564e7ea
parent92b5e32198846a607154e9c5f1ac59eacab9517a (diff)
downloadfirma-0d86856e51af59a670cdb96762d74031abb5025b.tar.gz
firma-0d86856e51af59a670cdb96762d74031abb5025b.tar.bz2
Fixing config help
-rw-r--r--README49
-rwxr-xr-xfirma26
2 files changed, 25 insertions, 50 deletions
diff --git a/README b/README
index 7918dd1..f29c837 100644
--- a/README
+++ b/README
@@ -133,7 +133,7 @@ Setup
Firma installation is quite simple:
- 1 - Create a folder to store lists; by default firma use /usr/local/etc/lists
+ 1 - Create a folder to store lists; by default firma use /var/lib/firma
but you can use anything, just edit firma and change FIRMA_LIST_PATH
variable.
@@ -141,55 +141,14 @@ Setup
it has no write permission
3 - Create a list-wide config file (default is /etc/firma.conf) with
- the common definitions for all lists,
+ the common definitions for all lists. You might just copy the sample
+ firma.conf and edit according to your needs.
- GPG_BINARY= path to the GnuPG binary
- MAIL_AGENT= path to the mail transport agent to be used (e.g., sendmail)
- MAIL_AGENT_ARGS= command-line arguments to be passed to the command above
- LISTS_DIR= path to the mailing lists directory
-
- All those variables can be overwritten at each list's own config file;
+ All config variables can be overwritten at each list's own config file;
firma.conf should be chmoded as 600, chowned nobody.nobody or whatever
user your MTA runs. If you run postfix, the user is specified by the
main.cf parameter "default_privs".
- We suggest you to use
-
- MAIL_AGENT=/usr/sbin/sendmail
- MAIL_AGENT_ARGS=-t
-
- As optional parameters, you can also set
-
- FIRMA_USER= user that runs firma (usually the same as your MTA user);
- defaults to "nobody"; you can also specify this parameter
- in each mailing list config file if you plan to have one
- user per mailing list
-
- FIRMA_GROUP= group that runs firma (usually the same as your MTA group);
- defaults to "nobody"; you can also specify this parameter
- in each mailing list config file if you plan to have one
- group per mailing list
-
- LOG_TO_SYSLOG= set to '1' to log errors and warnings to syslog, else firma
- will print errors to STDERR
-
- LOGGER_BINARY= if logging to syslog, set the path to logger's binary
-
- SYSLOG_PRIORITY= if logging to syslog, set a priority for the error messages
- (defaults to 'user.err')
-
- USE_GPG_HIDDEN_RECIPIENT_OPTION= set to '1' to use GnuPG's --hidden-recipient
- option, available from version 1.4.0 onwards
- (try 'man gpg' for more information)
-
- REMOVE_THESE_HEADERS_ON_ALL_LISTS= headers that should be stripped from list
- messages on all lists running under firma
- (space separated case-insensitive entries)
- (may include regexps (e.g., X-.*)
-
- KEYSERVER= default keyserver to import/export keys
- (defaults to keyserver.noreply.org)
-
For a list of all config parameters, type
firma --help config
diff --git a/firma b/firma
index e1c773f..692328f 100755
--- a/firma
+++ b/firma
@@ -2537,22 +2537,22 @@ case "$NUM_OF_ARGS" in
case "$OPTION" in
# valid short option
- -a|-c|-e|-p)
+ -a|-c|-e|-p|-h)
;;
# valid long option
- --admin-task|--create-newlist|--email-admin-task|--process-message)
+ --admin-task|--create-newlist|--email-admin-task|--process-message|--help)
;;
# valid short option called with too many arguments
- -h|-v)
+ -v)
echo >&2 "$BASENAME: too many arguments -- $@"
Usage
EXIT_CODE=1
;;
# valid long option called with too many arguments
- -help|-version)
+ --version)
echo >&2 "$BASENAME: too many arguments -- $@"
Usage
EXIT_CODE=1
@@ -2616,8 +2616,24 @@ if [[ "$EXIT_CODE" == "0" ]]; then
esac
;;
2)
+ # help options
+ if [ "$OPTION" == "--help" ] || [ "$OPTION" == "-h" ]; then
+
+ if [ "$ARG" == "config" ]; then
+
+ ConfigHelp
+ EXIT_CODE=0
+
+ else
+
+ echo >&2 "$BASENAME: invalid help section -- $ARG"
+ Usage
+ EXIT_CODE=1
+
+ fi
+
# if firma.conf exists and can be read
- if [[ ! -r "$FIRMA_CONFIG_FILE" ]]; then
+ elif [[ ! -r "$FIRMA_CONFIG_FILE" ]]; then
LogMessage "FATAL: Cannot source \`$FIRMA_CONFIG_FILE': No such file or directory"
EXIT_CODE=1