diff --git a/ql-web/trunk/lang/de.hdf b/ql-web/trunk/lang/de.hdf index 28d2719..046b4e8 100644 --- a/ql-web/trunk/lang/de.hdf +++ b/ql-web/trunk/lang/de.hdf @@ -41,14 +41,17 @@ Lang { Misc { NewForwardAddress = Neue Weiterleitungsadresse VacationText = Benachrichtigungstext - Password = Mailaccount-Passwort - OldPassword = Altes Passwort - NewPassword = Neues Passwort + Password = Mailaccount-Passwort + OldPassword = Altes Passwort + NewPassword = Neues Passwort NewPasswordAgain = Neues Passwort wiederholen - FooterText = eine Web-Oberflaeche fuer - Filter_None = keine Spam-Kontrolle - Filter_Mark = markiere Spam-Nachrichten - Filter_Move = Verschiebe Spam-Nachrichten + FooterText = eine Web-Oberflaeche fuer + Filter_None = keine Spam-Pruefung + Filter_Mark = markiere Spam + Filter_Move = verschiebe Spam in das Spam-Verzeichnis + StatusSpamNone = eingehende Nachrichten werden nicht auf Spam geprueft + StatusSpamMark = Spam wird markiert + StatusSpamMove = Spam wird in das Spam-Verzeichnis verschoben } ErrorMessage { @@ -59,6 +62,7 @@ Lang { WarningMessage { FilterConnfig = Die Filterungseinstellungen konnten nicht gespeichert werden! + WrongPassword = Das angegebene Passwort war nicht korrekt! } @@ -76,6 +80,9 @@ Lang { Legend { + StatusFilter = Spam-Filterung + StatusForward = Weiterleitungen + StatusVacation = Abwesenheitsbenachrichtigungen Password = Passwort aendern Forward = Weiterleitungen verwalten Filter = Spam-Filterung einrichten diff --git a/ql-web/trunk/ql-web.conf b/ql-web/trunk/ql-web.conf index c6a8e9f..80d3078 100644 --- a/ql-web/trunk/ql-web.conf +++ b/ql-web/trunk/ql-web.conf @@ -1,8 +1,8 @@ -$CSS_URL = '/ql-web/css/default.css'; +$CSS_URL = '/admin/ql-web/css/default.css'; $HTML_TITLE = 'QL-Web - Entwicklung'; -$QL_WEB_DIR = '/home/lars/subversion/admin-tools/ql-web/trunk'; +$QL_WEB_DIR = '/data/ql-web'; $TEMPLATE_DIR = "$QL_WEB_DIR/template"; $LANGUAGE_DIR = "$QL_WEB_DIR/lang"; @@ -11,8 +11,8 @@ $HTML_LANGUAGE = 'de'; $LDAP_HOST = 'ldap.sao'; # the string '_USERNAME_' will be replaced by the real username -$LDAP_USER_DN = "cn=_USERNAME_,ou=People,o=neofaxe,dc=systemausfall,dc=org"; +$LDAP_USER_DN = "cn=_USERNAME_,sc=mailAccount,ou=People,o=neofaxe,dc=systemausfall,dc=org"; -$LDAP_SPAM_MOVE = "| ifspam spam-_USERNAME_ || true"; -$LDAP_SPAM_MARK = "| ifspam spam-_USERNAME_"; +$LDAP_SPAM_MOVE = "| /usr/local/bin/ifspam spam-_USERNAME_"; +$LDAP_SPAM_MARK = "| /usr/local/bin/ifspam spam-_USERNAME_ || /bin/true"; diff --git a/ql-web/trunk/ql-web.pl b/ql-web/trunk/ql-web.pl index d8cdb4c..ea22c3b 100755 --- a/ql-web/trunk/ql-web.pl +++ b/ql-web/trunk/ql-web.pl @@ -138,7 +138,7 @@ sub update_filter { $user_dn =~ s/_USERNAME_/$mail_user/g; $ldap = Net::LDAP->new($LDAP_HOST); - $result = $ldap->bind($mail_user, password => $password); + $result = $ldap->bind($user_dn, password => $password); if ($result->is_error) { $warning = 'WrongPassword'; return (0==1); @@ -181,12 +181,33 @@ sub update_filter { # --------------------------------------------------------------------------- sub is_spam_move { - + return &compare_ldap_attr('deliveryProgramPath', $LDAP_SPAM_MOVE); } # --------------------------------------------------------------------------- + sub is_spam_mark { + return &compare_ldap_attr('deliveryProgramPath', $LDAP_SPAM_MARK); +} + +# --------------------------------------------------------------------------- + +sub compare_ldap_attr { + my ($attr, $value) = @_; + my $ldap = Net::LDAP->new($LDAP_HOST); + my $result; + + my $user_dn = $LDAP_USER_DN; + $user_dn =~ s/_USERNAME_/$mail_user/g; + $value =~ s/_USERNAME_/$mail_user/g; + + $ldap->bind; + $result = $ldap->compare($user_dn, + attr => $attr, + value => $value); + $ldap->unbind; + return ($result->code eq Net::LDAP::Constant->LDAP_COMPARE_TRUE); } # --------------------------------------------------------------------------- diff --git a/ql-web/trunk/template/filter_form.cs b/ql-web/trunk/template/filter_form.cs index e052d43..69c1d48 100644 --- a/ql-web/trunk/template/filter_form.cs +++ b/ql-web/trunk/template/filter_form.cs @@ -7,11 +7,18 @@
diff --git a/ql-web/trunk/template/forward_form.cs b/ql-web/trunk/template/forward_form.cs index 899495e..996ba72 100644 --- a/ql-web/trunk/template/forward_form.cs +++ b/ql-web/trunk/template/forward_form.cs @@ -7,7 +7,7 @@ + + + +
+ +