Feature Requests item #3392096, was opened at 2011-08-15 20:36
Message generated for change (Comment added) made by sbajic
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126468&aid=3392096&group_id=250683

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Tom Hendrikx (whyscream)
>Assigned to: Stevan Bajic (sbajic)
Summary: Move contents of DSPAM_HOME/txt to configuration

Initial Comment:
The contents of DSPAM_HOME/txt (templates for sending e-mail and tagging 
scanned messages) are no application data but configuration directives. As such 
they should either be moved to the dspam configuration directory (which does 
not exist currently), or to a configuration directive in dspam.conf

I see a few options here:
- pass location of txt directory as an option to configure script (possible but 
kludgy)
- set location of txt directory in dspam.conf
- set location of each file in txt directory in dspam.conf
- put contents of each file in txt directory into a directive in dspam.conf 
(very messy)

----------------------------------------------------------------------

>Comment By: Stevan Bajic (sbajic)
Date: 2011-10-30 13:00

Message:
Hello Tom, thanks for the patch. I moved the bug report to a feature
request (since it is not strictly a bug). Anyway... your patch is now in
GIT.

----------------------------------------------------------------------

Comment By: Tom Hendrikx (whyscream)
Date: 2011-08-18 18:19

Message:
I looked into the problem with using a config directory. Currently,
dspam.conf is simply found by using the value of --sysconfdir as sent to
the configure script.: CONFIG_DEFAULT="$(sysconfdir)/dspam.conf".

Usually sysconfdir is set to /etc or /usr/local/etc, which means dspam is
expected at /etc/dspam.conf. Some people seem to disagree on this, and
various distros set sysconfdir to "/etc/dspam" to overcome this (observed
on debian and gentoo), others don't (fedora, freebsd).

When moving the txt files to /etc, an /etc/dspam directory is preferable,
so we can place everything in one place. We could change CONFIG_DEFAULT to
"$(sysconfdir)/dspam/dspam.conf", and then use the "(sysconfdir)/dspam" for
the other files. Not sure how this would be handled by the distros that
don't use this path now.

----------------------------------------------------------------------

Comment By: Tom Hendrikx (whyscream)
Date: 2011-08-15 22:24

Message:
I attached a patch that creates a new config directive
NotificationsDirectory, and uses this path for Notifications and
tagSpam/tagnonspamdirectives when it is set.

Note that since DSPAM currently has no such thing as a config directory
(only a config file location), there is no way to default to something like
@config_dir@/txt, so I defaulted to the current location in
@dspam_home@/txt.

To use a default location in /etc, we should change the way dspam finds
its config file.

(Note: this is my first patch in C ever that does more than change log
output strings, so an additional set of eyes is very advisable).

----------------------------------------------------------------------

Comment By: Julien Valroff (valroff)
Date: 2011-08-15 21:14

Message:
For the record, Debian ships these files into /etc/dspam/txt/. This is done
to comply with the Debian Policy which ensures configuration files are all
in /etc
 
All the conf files are then in /etc/dspam/ thanks to the --sysconfdir
configure option, and here is the patch we use to retrieve the right
location: 
http://anonscm.debian.org/gitweb/?p=pkg-dspam/dspam.git;a=blob;f=debian/patches/004_where-to-find-txt-files.diff

The path is actually hardcoded, I would however prefer setting the
location in dspam.conf (your 2nd proposal).

Cheers,
Julien

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126468&aid=3392096&group_id=250683

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to