Spamassassin: Unterschied zwischen den Versionen

Aus crazylinux.de
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
 
(configs)
Zeile 1: Zeile 1:
siehe [[SendMail]]
siehe auch [[SendMail]]
 
=Qmail/Vpopmail=
<pre>
# /etc/default/spamassassin
# Duncan Findlay
 
# WARNING: please read README.spamd before using.
# There may be security risks.
 
# Change to one to enable spamd
ENABLED=1
 
# Options
# See man spamd for possible options. The -d option is automatically added.
 
# NOTE: version 3.0.x has switched to a "preforking" model, so you
# need to make sure --max-children is not set to anything higher than
# 5, unless you know what you're doing.
 
OPTIONS="-u vpopmail -g vchkpw -v --create-prefs --max-children 5 --helper-home-dir"
 
# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"
 
# Set nice level of spamd
#NICE="--nicelevel 15"
</pre>
 
 
Damit die user-prefs für vpopmail-accounts richtig geschrieben werden kann, muss spamd gepatched werden, da es sonst nicht geht (http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4714):
von http://issues.apache.org/SpamAssassin/attachment.cgi?id=3377
<pre>
1750,1757c1750,1774
<    $dir = `$vpopdir/bin/vuserinfo -d $username`;
<    if ($? != 0) {
<      #
<      # If vuserinfo failed $username could be an alias
<      #
<      $dir = `$vpopdir/bin/valias $username`;
<      if ($? == 0 && $dir !~ /.+ -> &/) {
<        $dir =~ s,.+ -> (/.+)/Maildir/,$1,;
---
>    my $itterations = 0;
>    my $max_itterations = 20;
>    my $found = 0;
>    while(!$found && ( $itterations < $max_itterations ) ) {
>      $itterations++;
>      $dir = `$vpopdir/bin/vuserinfo -d $username`;
>      if ($? != 0) {
>        #
>        # If vuserinfo failed $username could be an alias
>        #
>        $dir = `$vpopdir/bin/valias $username`;
>        chomp($dir);
>        if ($? == 0) {
>          $dir =~ s,.+ -> (.+),$1,;
>          $username = "$1";
>   $username =~ s,&,,g;
>
>          if ("$dir" =~ /\|/) {
>            $dir = $vpopdir;
>            $found = 1;
>          }
>        } elsif("$dir" eq "" || "$dir" eq "invalid domain, not in qmail assign file") {
>          $dir = $vpopdir;
>          $found = 1;
>        }
1759c1776
<        undef($dir);
---
>        $found = 1;
1760a1778
>      chomp($username);
</pre>




==Userinterface==
==Userinterface==
http://www.misak.dk/blog/index.php/archives/category/phpsaadmin/
http://www.misak.dk/blog/index.php/archives/category/phpsaadmin/

Version vom 14. November 2006, 22:16 Uhr

siehe auch SendMail

Qmail/Vpopmail

# /etc/default/spamassassin
# Duncan Findlay

# WARNING: please read README.spamd before using.
# There may be security risks.

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.

# NOTE: version 3.0.x has switched to a "preforking" model, so you
# need to make sure --max-children is not set to anything higher than
# 5, unless you know what you're doing.

OPTIONS="-u vpopmail -g vchkpw -v --create-prefs --max-children 5 --helper-home-dir"

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"

# Set nice level of spamd
#NICE="--nicelevel 15"


Damit die user-prefs für vpopmail-accounts richtig geschrieben werden kann, muss spamd gepatched werden, da es sonst nicht geht (http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4714): von http://issues.apache.org/SpamAssassin/attachment.cgi?id=3377

1750,1757c1750,1774
<     $dir = `$vpopdir/bin/vuserinfo -d $username`;
<     if ($? != 0) {
<       #
<       # If vuserinfo failed $username could be an alias
<       #
<       $dir = `$vpopdir/bin/valias $username`;
<       if ($? == 0 && $dir !~ /.+ -> &/) {
<         $dir =~ s,.+ -> (/.+)/Maildir/,$1,;
---
>     my $itterations = 0;
>     my $max_itterations = 20;
>     my $found = 0;
>     while(!$found && ( $itterations < $max_itterations ) ) {
>       $itterations++;
>       $dir = `$vpopdir/bin/vuserinfo -d $username`;
>       if ($? != 0) {
>         #
>         # If vuserinfo failed $username could be an alias
>         #
>         $dir = `$vpopdir/bin/valias $username`;
>         chomp($dir);
>         if ($? == 0) {
>           $dir =~ s,.+ -> (.+),$1,;
>           $username = "$1";
> 	  $username =~ s,&,,g;
> 
>           if ("$dir" =~ /\|/) {
>             $dir = $vpopdir;
>             $found = 1;
>           }
>         } elsif("$dir" eq "" || "$dir" eq "invalid domain, not in qmail assign file") {
>           $dir = $vpopdir;
>           $found = 1;
>         }
1759c1776
<         undef($dir);
---
>         $found = 1;
1760a1778
>       chomp($username);


Userinterface

http://www.misak.dk/blog/index.php/archives/category/phpsaadmin/