On Sat, 17 Apr 2010 11:04:35 +0200
Julien Valroff <jul...@kirya.net> wrote:

[...]
> 
> For my own knowledge, would you please explain why you have chosen this
> license for this script?
> 
Ach. I have a template/skeleton that automatically adds a structure for Bash 
scripts and some time ago I just changed the template/skeleton to have that 
license.


[...]

> I do not think it is necessary if the packages all use the
> dspam_maintenance script for all the backends, do you confirm it will
> replace all the existing scripts?
> 
Yes.


> I haven't yet tested dspam_maintenance.sh, but I think the best is to
> include it in the main dspam package (with the hash driver). However, I
> see there's a command line option to purge all backends, what happens if
> one fails (ie. I use the MySQL driver, what will happen when it comes to
> the pgsql purge?).
>
The script will handle that condition. It will just continue to process the 
other storage backends.


> Also, the sql purge files are included in the respective packages, can I
> specify several DSPAM_PURGE_SCRIPT_DIR?
> 
No. Only one. But you could add multiple directories inside that variable. Aka:
DSPAM_PURGE_SCRIPT_DIR="/etc/dspam/sql/mysql /etc/mail/sql/pgsql 
/etc/mail/sql/whatever"


[...]

> This would also be fixed if switching to dspam_mainenance, right?
> 
Yes.


[...]

> > If you want to automate the creation of the splitted config files then
> > you could use something like this:
> > ----------------------
> > for foo in ExtLookup=extlookup SQLite=sqlite MySQL=mysql
> > PostgreSQL=pgsql;
> > do
> >     sed -n -e "/^# \-\- ${foo%=*} \-\-[\t ]*$/,/^# \-\- [^-]\{1,99
> > \}\-\-[\t ]*$/p" src/dspam.conf.in > debian/config/${foo#*=}.conf;
> >     sed -i -e '$d' debian/config/${foo#*=}.conf;
> > done;
> > ----------------------
> 
> Great, that would indeed be perfect!
> However, it does only seem to work for the ExtLookup options (and also
> include the # -- Profiles -- line)
> Would you please explain this script as I am unfortunately not able to
> fix it!
> 
I am an idiot! I did not looked properly how the dspam.conf file is separating 
each section. The script from below should work better and will modify the 
created files to be like the one you have in that archive I downloaded from 
your page:
----------------------
for foo in Hash=hash ExtLookup=extlookup SQLite=sqlite MySQL=mysql 
PostgreSQL=pgsql;
do
        sed -n -e "/^#[\t ]\{1,99\}\-\{2,3\}[\t ]\{1,99\}${foo%=*}[\t 
]\{1,99\}\-\{2,3\}[\t ]*$/,/^#[\t ]\{1,99\}\-\{2,3\}[\t 
]\{1,99\}[^-]\{1,99\}\-\{2,3\}[\t ]*$/p" src/dspam.conf.in > 
debian/config/${foo#*=}.conf;
        sed -i -e '$d' debian/config/${foo#*=}.conf;
        if [ "${foo%=*}" == "MySQL" ];
        then
                # Activate MySQL database configuration
                sed -e "s:^#*\(MySQLServer[\t 
]\{1,\}\).*:\1/var/run/mysqld/mysqld.sock:gI" \
                        -e "s:^#*\(MySQLPort[\t ]\{1,\}\).*:#\13306:gI" \
                        -e "s:^#*\(MySQLUser[\t ]\{1,\}\).*:\1_DBC_DBUSER_:gI" \
                        -e "s:^#*\(MySQLPass[\t ]\{1,\}\).*:\1_DBC_DBPASS_:gI" \
                        -e "s:^#*\(MySQLDb[\t ]\{1,\}\).*:\1_DBC_DBNAME_:gI" \
                        -e "s:^#*\(MySQLCompress[\t ]\{1,\}\).*:\1true:gI" \
                        -e "s:^#*\(MySQLReconnect[\t ]\{1,\}\).*:\1true:gI" \
                        -i debian/config/${foo#*=}.conf;
        elif [ "${foo%=*}" == "PostgreSQL" ];
        then
                # Activate PostgreSQL database configuration
                sed -e "s:^#*\(PgSQLServer[\t ]\{1,\}\).*:\1127.0.0.1:gI" \
                        -e "s:^#*\(PgSQLPort[\t ]\{1,\}\).*:\15432:gI" \
                        -e "s:^#*\(PgSQLUser[\t ]\{1,\}\).*:\1_DBC_DBUSER_:gI" \
                        -e "s:^#*\(PgSQLPass[\t ]\{1,\}\).*:\1_DBC_DBPASS_:gI" \
                        -e "s:^#*\(PgSQLDb[\t ]\{1,\}\).*:\1_DBC_DBNAME_:gI" \
                        -i debian/config/${foo#*=}.conf;
        fi;
done;
----------------------


[...]

> That's what I thought, but you have already noticed a lot of things
> which need to be improved/fixed, and this is very important.
> 
What would that be?


> I think I will work on these improvements ASAP, test the packages myself
> in a virtual environment, then upload to my personal repo to get a
> slightly larger board of testers, then request the package to be
> uploaded to the official archive, targeted to the experimental
> distribution (this will allow more people test the packages, and after
> some time, I will be glad to upload it to the unstable distribution so
> that it can hopefully be part of the next stable version).
> This will however (I think) have to wait until 3.9.1 is released.
>
:)

[...]

-- 
Kind Regards from Switzerland,

Stevan Bajić

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to