[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Amavis



Am Sonntag, 24. August 2008 00:50:50 schrieb Kamill Sokol:
> Am Sonntag, 24. August 2008 00:12:45 schrieb Kamill Sokol:
> > Am Mittwoch, 16. Juli 2008 15:42:26 schrieb Boris Höffgen:
> > > Matthias Haegele schrieb:
> > > > Boris Höffgen schrieb:
> > > >> Matthias Haegele schrieb:
> > > >>> Boris Höffgen schrieb:
> > > >>>> Hallo,
> > > >>>
> > > >>> Was sagt denn dein amavis.log (oder syslog je nachdem wohin du
> > > >>> logst).
> > > >>
> > > >> ........
> > > >> Jul 16 12:41:28 mail.xyz.de /usr/sbin/amavisd-new[7173]: (07173-03)
> > > >> lookup_acl(heinz@test.de), no match
> > > >> Jul 16 12:41:28 mail.xyz.de /usr/sbin/amavisd-new[7173]: (07173-03)
> > > >> lookup (local_domains) => undef, "heinz@test.de" does not match
> > > >
> > > > Da ist irgendwas faul imho ...
> > >
> > > Ich finde, er kennt die Domain nicht.
> > >
> > > >>> Die tag_level sind entsprechend gesetzt?
> > > >>
> > > >> Jepp:
> > > >> $sa_spam_subject_tag = '***SPAM*** ';
> > > >> $sa_tag_level_deflt  = -999;  # add spam info headers if at, or
> > > >> above
> > > >
> > > > afaik funktioniert das nicht mehr? Ich hab es jetzt so gesetzt:
> > >
> > > Jepp, hast recht.
> > >
> > > >> $sa_tag_level_deflt  = undef; # add spam info headers if at, or
> > > >> above that level
> > > >> diff 50-user 50-user.orig
> > > >> 9,24d8
> > > >> < $mydomain = 'domain1.tld', 'domain2.tld';
> > > >> < @local_domains_maps = ( [".$mydomain"] );  # $mydomain and its
> > > >> subdomains
> > >
> > > Wenn ich die lokalen Domains in @local_domains_maps eintrage,
> > > funktioniert es.
> > > Jetzt kommt mein Problem, auf dem Server werden ca. 5000 Domains
> > > gehostet. Das wäre ja irre, wenn ich alle per Hand ein- und austragen
> > > muss. Geht das nicht leichter? Kann er sie vielleicht aus einer
> > > MySQL-DB lesen?
> >
> > /etc/amavis/conf.d/50-user
> >
> > use DBI;
> >
> > my $dbh = DBI->connect('DBI:mysql:mail','postfix','postfix')
> >                 or die "Couldn't connect to database: " . DBI->errstr;
> >
> > my $sth = $dbh->prepare('SELECT * FROM relay_domains')
> >                 or die "Couldn't prepare statement: " . $dbh->errstr;
> > $sth->execute();
> >
> > while(my @data = $sth->fetchrow_array()) {
> >        push(@local_domains_acl,$data[1]);
> > }
> >
> > $sth->finish();
> > $dbh->disconnect();
>
> Wenn die Finger schneller als das Gehirn ist:
>
> [...]
> my $dbh = DBI->connect('dsn:database','username','pass')
>                 or die "Couldn't connect to database: " . DBI->errstr;
>
> my $sth = $dbh->prepare('your sql-statement')
> [...]
>            push(@local_domains_acl,entsprechender_index_in_$data);
> [...]

...als das Gehirn sind.... :-(

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: