I put my blacklist inside postfix, that way the mails never
reach the queue!
Here is part of my config, please adapt for your:
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
# reject_unauth_destination -> must match
relay_domains or any
of the local destiation (mydestination, $inet_interfaces,
$proxy_interfaces, $virtual_alias_do
mains, or $virtual_mailbox_domains)
reject_unauth_destination,
# reject_unlisted_recipient -> useless because
all "maps" are
empty (local_recipient_maps, virtual_alias_maps.
virtual_mailbox_maps,
relay_recipient_maps)
reject_unlisted_recipient,
check_client_access
pcre:$config_directory/reject_client,
check_sender_access
pcre:$config_directory/reject_sender,
check_recipient_access
pcre:$config_directory/reject_recipient,
check_recipient_access
hash:$config_directory/domain_rbl,
check_recipient_access
hash:$config_directory/domain_greylist,
# I dont want to use the kolabpolicy
# check_policy_service unix:private/kolabpolicy,
permit
The magic is "check_sender_access
pcre:$config_directory/reject_sender,"
And here is my reject_sender with some smaples:
# /kolab/etc/postfix_front/reject_sender
# This file is static (not automaticaly generated)
# it can be used to reject any email where
# the sender, the recipient or the smtp client match
# one of the pattern. For pattern syntax look at:
# http://www.p
ostfix.org/pcre_table.5.html
# http://en.wikipedia
.org/wiki/PCRE
# http://www.pcre.org/
# For possible actions look at
# http://www.postf
ix.org/access.5.html
# Only use: 5nn, REJECT, WARN
# Never use: OK
# If you know what you are doing: 4nn, DEFER_IF_REJECT
# For expert only: DISCARD, FILTER, HOLD
# when updating this file dont forget to run
# > postfix -c /kolab/etc/postfix_front/ reload
# You dont need to run postmap, because this is a PCRE file
#
# for pattern testing, use
# python -c "import re ; print re.match('.+ spammer.domain.com$',
'spammer spammer.domain.com')"
#
# some sender/recipient samples:
#
#/^spammer spammer.domain.com$/ REJECT
#/^spammer / REJECT
#/.+ spammer.domain.com$/ REJECT
#/^(?!owner-)(.*)-outgoing (.*)/ 550 Use $ $
instead
#
# some client samples:
#
#/^1.2.3.4$/ REJECT
#/^1.2.3.+$/ REJECT
#
Regards
On Jan 14, 2008 10:34 AM, Alessio Cecchi <alessio skye.it> wrote:
> Hello,
>
> I must add some e-mail to blacklist on a kolab server.
> I changed the configuration of amavisd like this:
>
> from :
/kolab/etc/kolab/templates/amavisd.conf.template
>
> ...
> $final_spam_destiny = D_BUONCE; # (defaults to
D_REJECT)
> ...
> map { $blacklist_sender{lc($_)}=1 } (qw(
> alessio test.com
> ));
>
> and in a second test like this:
>
> read_hash(%blacklist_sender,
'/kolab/etc/amavisd/blacklist');
>
>
> groupware:~# cat /kolab/etc/amavisd/blacklist
> alessio test.com
>
> but after running kolabconf (so restart amavisd) the
e-mail is always marked
> as clean:
>
> /kolab/var/amavisd/amavisd.log:Jan 14 10:22:14
> groupware.test.lan /kolab/sbin/amavisd[3329]:
(03329-10) Passed CLEAN,
> <alessio test.com> -> <rita test.lan>, Hits: 1.719, tag=3, tag2=6.3,
> kill=6.3, L/0/0/0
>
> Where is the mistake?
> Thanks
> --
> Alessio Cecchi is:
> ILS -> http://www.linux.it/~a
lessice/
> Assistenza Sistemi GNU/Linux -> http://www.cecchi.biz/
> PLUG -> ex-Presidente, adesso senatore a vita, http://www.prato.linux.it
a>
>
> _______________________________________________
> Kolab-users mailing list
> Kolab-users kolab.org
> https:
//kolab.org/mailman/listinfo/kolab-users
>
--
Alain Spineux
aspineux gmail com
May the sources be with you
_______________________________________________
Kolab-users mailing list
Kolab-users kolab.org
https:
//kolab.org/mailman/listinfo/kolab-users
|