diff -Naur cgi-bin-original/openwebmail/etc/openwebmail.conf cgi-bin-v2.1/openwebmail/etc/openwebmail.conf
--- cgi-bin-original/openwebmail/etc/openwebmail.conf 2006-05-02 20:38:14.000000000 -0300
+++ cgi-bin-v2.1/openwebmail/etc/openwebmail.conf 2007-02-07 15:11:23.000000000 -0200
@@ -23,6 +23,11 @@
enable_spamcheck no
enable_learnspam no
+# OSBF-Lua changes
+# Diego Aguirre - aguirre@iltc.br
+# uncomment to enable global config
+#enable_osbflua yes
+
default_iconset Default
default_fscharset none
diff -Naur cgi-bin-original/openwebmail/etc/users.conf/SAMPLE cgi-bin-v2.1/openwebmail/etc/users.conf/SAMPLE
--- cgi-bin-original/openwebmail/etc/users.conf/SAMPLE 2005-01-17 09:00:00.000000000 -0300
+++ cgi-bin-v2.1/openwebmail/etc/users.conf/SAMPLE 2007-02-07 15:11:23.000000000 -0200
@@ -15,6 +15,11 @@
global_filterbook %ow_etcdir%/filter.book
global_calendarbook %ow_etcdir%/calendar.book
+# OSBF-Lua changes
+# Diego Aguirre - aguirre@iltc.br
+# uncomment to enable per user config
+#enable_osbflua yes
+
error_with_debuginfo no
allowed_serverdomain all
allowed_clientdomain all
diff -Naur cgi-bin-original/openwebmail/openwebmail-read.pl cgi-bin-v2.1/openwebmail/openwebmail-read.pl
--- cgi-bin-original/openwebmail/openwebmail-read.pl 2005-05-01 09:00:00.000000000 -0300
+++ cgi-bin-v2.1/openwebmail/openwebmail-read.pl 2007-02-07 15:11:23.000000000 -0200
@@ -527,6 +527,17 @@
my $gif="right-grey.s.gif"; $gif="left-grey.s.gif" if ($ow::lang::RTL{$prefs{'language'}});
$temphtml .= iconlink($gif, "-", "");
}
+
+ # OSBF-Lua changes
+ # Diego Aguirre - aguirre@iltc.br
+ if ($config{'enable_osbflua'})
+ {
+ my $replyOsbf = "$send_url_with_id&action=composemessage&composetype=reply&convfrom=$convfrom";
+ $temphtml .= " ";
+ $temphtml .= " ";
+ $temphtml .= " ";
+ }
+
$html =~ s/\@\@\@MESSAGECONTROL\@\@\@/$temphtml/g;
$temphtml = iconlink("gotop.gif", "^", qq|href="#"|);
@@ -1157,6 +1168,13 @@
"action=composemessage&message_id=$escapedmessageid&compose_caller=read");
}
$temphtml = ow::htmlrender::html2table($temphtml);
+
+ # OSBF-Lua train_form
+ if ($temphtml =~ m/OSBF-Lua/ && $temphtml =~ m/text\/plain/)
+ {
+ $temphtml =~ s/text\/plain/application\/x-www-form-urlencoded/;
+ }
+
($temphtml)=iconv($attcharset, $readcharset, $temphtml);
return($temphtml);
diff -Naur cgi-bin-original/openwebmail/openwebmail-send.pl cgi-bin-v2.1/openwebmail/openwebmail-send.pl
--- cgi-bin-original/openwebmail/openwebmail-send.pl 2005-07-26 09:00:00.000000000 -0300
+++ cgi-bin-v2.1/openwebmail/openwebmail-send.pl 2007-03-01 10:02:48.000000000 -0300
@@ -642,6 +642,27 @@
$to = $message{'from'} || '';
}
+ # OSBF-Lua openwebmail-send.pl line 642
+ my $osbflua = param('osbflua') || '';
+ if ($osbflua)
+ {
+ my $osbfpasswd = "";
+ open (SFC, "$homedir/osbf-lua/spamfilter_config.lua");
+ my @sfclines = ;
+ close(SFC);
+
+ foreach my $sfcline (@sfclines)
+ {
+ if ($sfcline =~ /^osbf.cfg_pwd.*\"(.*)\"/)
+ {
+ $osbfpasswd = $1;
+ }
+ }
+ $osbflua =~ s/$user/$osbfpasswd/;
+ $subject = "$osbflua";
+ $to = $prefs{'email'};
+ }
+
if ($composetype eq "replyall") {
my $toaddr=(ow::tool::email2nameaddr($to))[1];
my @recv=();
@@ -998,6 +1019,20 @@
my $n="\n"; $n="
" if ($msgformat ne 'text');
$body.=$n.$n.str2str((iconv($prefs{'charset'}, $composecharset, $prefs{'signature'}))[0], $msgformat).$n if ($prefs{'signature'}=~/[^\s]/);
+ ## OSBF-Lua train_form
+ if ($subject =~ m/^batch_train/)
+ {
+ my @ids;
+ foreach my $key (param())
+ {
+ if ($key =~ m/^sfid-/)
+ {
+ push(@ids, $key . "=" . param($key));
+ }
+ }
+ $body = join("\n", @ids);
+ $msgformat = 'text';
+ }
}
# remove tail blank line and space
diff -Naur cgi-bin-original/openwebmail/shares/ow-shared.pl cgi-bin-v2.1/openwebmail/shares/ow-shared.pl
--- cgi-bin-original/openwebmail/shares/ow-shared.pl 2006-05-02 20:20:12.000000000 -0300
+++ cgi-bin-v2.1/openwebmail/shares/ow-shared.pl 2007-02-07 15:11:23.000000000 -0200
@@ -42,7 +42,7 @@
enable_autoreply enable_strictfoldername
enable_stationery enable_savedraft enable_backupsent
enable_globalfilter enable_userfilter enable_smartfilter smartfilter_bypass_goodmessage
- enable_viruscheck enable_spamcheck enable_learnspam enable_saprefs
+ enable_viruscheck enable_spamcheck enable_learnspam enable_osbflua enable_saprefs
has_virusfolder_by_default has_spamfolder_by_default
enable_pop3 pop3_delmail_by_default pop3_delmail_hidden pop3_usessl_by_default
authpop3_getmail authpop3_delmail authpop3_usessl