Current time: 11-30-2024, 09:24 PM Hello There, Guest! (LoginRegister)


Post Reply 
enable spamassassin?
Author Message
tedeu Offline
Newbie
*

Posts: 5
Joined: May 2009
Reputation: 0
Post: #41
RE: enable spamassassin?
(02-22-2009 06:08 AM)rbtux Wrote:  This is how I would enable spamassassin, along with amavis and clamav. Unlike the amavis configuration with maia or the one that partially comes with ispcp, this method uses amavis as pre-queue filter. That makes it possible to reject spam mails instead of only tagging them...


Code:
apt-get install amavisd-new clamav spamassassin clamav-daemon lzop rpm pax unrar zoo arj p7zip-full lha arc cabextract ripole

add the following lines to /etc/postfix/master.cf after:
Code:
smtp      inet  n       -       -       -       -       smtpd
Code:
-o smtpd_proxy_filter=localhost:10024
    -o content_filter=
localhost:10025 inet n  -       n       -       -       smtpd
    -o content_filter=
    -o smtpd_proxy_filter=
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_data_restrictions=
    -o mynetworks=127.0.0.0/8
    -o reveive_override_options=no_unknown_recipient_checks

remove the following from /etc/postfix/master.cf:
Code:
amavis    unix  -       -       n       -       2       smtp
   -o smtp_data_done_timeout=1200
   -o smtp_send_xforward_command=yes
   -o disable_dns_lookups=yes

localhost:10025 inet  n -       n       -      -        smtpd
   -o content_filter=
   -o local_recipient_maps=
   -o relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o smtpd_override_options=no_address_mappings
   -o mynetworks=127.0.0.0/8
   -o strict_rfc821_envelopes=yes

/etc/master.cf will look like:
Code:
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
    -o smtpd_proxy_filter=localhost:10024
    -o content_filter=
localhost:10025 inet n  -       n       -       -       smtpd
    -o content_filter=
    -o smtpd_proxy_filter=
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_data_restrictions=
    -o mynetworks=127.0.0.0/8
    -o reveive_override_options=no_unknown_recipient_checks
#submission inet n       -       -       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# For AOL-Accounts
587       inet  n       -       -       -       -       smtpd
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject_unauth_destination
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
    -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache      unix    -    -    -    -    1    scache
# ====================================================================
# ispCP ω (OMEGA) a Virtual Hosting Control System
#
# @copyright    2001-2006 by moleSoftware GmbH
# @copyright    2006-2008 by ispCP | http://isp-control.net
# @version        SVN: $Id$
# @link            http://isp-control.net
# @author        ispCP Team
# ====================================================================
# AMaViS => Antivir / Antispam

# ispCP autoresponder
ispcp-arpl unix  -      n       n       -       -       pipe
  flags=O user=vmail argv=/var/www/ispcp/engine/messager/ispcp-arpl-msgr

# TLS - Activate, if TLS is avaiable/used
smtps     inet  n       -       -       -       -       smtpd
   -o smtpd_tls_wrappermode=yes
   -o smtpd_sasl_auth_enable=yes
#   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix    -    n    n    -    2    pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

change /etc/amavis/conf.d/01-debian:
uncomment
Code:
#$lha    = 'lha'; #disabled (non-free, no security support)
#$unrar  = ['rar', 'unrar']; #disabled (non-free, no security support)
comment
Code:
$lha    = undef;
$unrar  = undef;

change /etc/amavis/conf.d/20-debian_defaults:
Code:
$sa_tag2_level_deflt = 5.8;
$sa_kill_level_deflt = 6.41;
$final_virus_destiny      = D_REJECT;  # (data not lost, see virus quarantine)
$final_banned_destiny     = D_REJECT;   # D_REJECT when front-end MTA
$final_spam_destiny       = D_REJECT;
$final_bad_header_destiny = D_PASS;     # False-positive prone (for spam)

change /etc/amavis/conf.d/15-content_filter_mode:
uncomment
Code:
@bypass_virus_checks_maps = (
   \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);

@bypass_spam_checks_maps = (
   \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);

change /etc/amavis/conf.d/50-user:
Code:
$max_servers = 5;

change in /etc/group:
amavis:x:112:
to
amavis:x:112:clamav

to uid may be different

/etc/init.d/clamav-daemon restart
/etc/init.d/amavis restart
/etc/init.d/postfix restart

EDIT: Consider using a ramdisk for the amavis temporary directory... this will boost performance... and let you use a higher $max_servers count...

Hello ...
I did exactly as you told us to do ...
But then SMTP didn't worked (couldn't send mails ... but i could receive) and in the ispc pannel, at Server Status, SMTP was down...
I went to
Code:
/etc/postfix/master.cf
and did this:

you told me to add this, and i deleted (in fact i comented with ##)
Code:
-o smtpd_proxy_filter=localhost:10024
    -o content_filter=
localhost:10025 inet n  -       n       -       -       smtpd
    -o content_filter=
    -o smtpd_proxy_filter=
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_data_restrictions=
    -o mynetworks=127.0.0.0/8
    -o reveive_override_options=no_unknown_recipient_checks

and i putted back this:
Code:
amavis    unix  -       -       n       -       2       smtp
   -o smtp_data_done_timeout=1200
   -o smtp_send_xforward_command=yes
   -o disable_dns_lookups=yes

localhost:10025 inet  n -       n       -      -        smtpd
   -o content_filter=
   -o local_recipient_maps=
   -o relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o smtpd_override_options=no_address_mappings
   -o mynetworks=127.0.0.0/8
   -o strict_rfc821_envelopes=yes

And now it works to send and receive mail, but SPAMASSASSIN in the ispc pannel, at Server Status is still DOWN ...
What to do please ...
I am waiting for an answer if you can give one Smile
thank you verry verry mutch
(This post was last modified: 05-28-2009 01:35 AM by tedeu.)
05-28-2009 01:32 AM
Find all posts by this user Quote this message in a reply
kurgans Offline
Moderator
*****
Moderators

Posts: 1,565
Joined: Feb 2008
Reputation: 23
Post: #42
RE: enable spamassassin?
A change in missing data etc / default / spamassasin
ENABLED = 1 by default comes to 0.

Restart

/etc/init.d/spamassasin
05-28-2009 05:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tedeu Offline
Newbie
*

Posts: 5
Joined: May 2009
Reputation: 0
Post: #43
RE: enable spamassassin?
(05-28-2009 05:47 AM)kurgans Wrote:  A change in missing data etc / default / spamassasin
ENABLED = 1 by default comes to 0.

Restart

/etc/init.d/spamassasin

Please be more specific where to edit and what ...
i am new to debian, and linux in general ...
Thank you for fast response !
05-28-2009 01:26 PM
Find all posts by this user Quote this message in a reply
alecksievici Offline
Junior Member
*
Beta Team

Posts: 112
Joined: May 2008
Reputation: 0
Post: #44
RE: enable spamassassin?
mcedit etc/default/spamassasin

Change ENABLED = 0 to 1
05-28-2009 02:54 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #45
RE: enable spamassassin?
amavisd does not use the spamd daemon, even if it's running, because it spawns it's own spamassassin copies, so you don't need it running. Just remove the spamassassin port from the panel monitored services and forgot about it.
05-28-2009 03:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #46
RE: enable spamassassin?
(05-17-2009 07:37 PM)ashitman Wrote:  now i´m trying to forward the recognized spam to the user in a "spam folder", like gmx.de do.
but how can i handle that. i´m quite new to the linux stuff :-)
i think i have to chane this
Code:
$final_spam_destiny       = D_REJECT;
to this
Code:
$final_spam_destiny       = D_PASS;
but where i specify the destination folder?

please help
timo

is this problem still to be solved? (Sry the thread got a bit crowded and I miss the question...)
06-03-2009 08:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
se2bass Offline
Development Team - Junior
*****
Dev Team

Posts: 133
Joined: May 2009
Reputation: 7
Post: #47
RE: enable spamassassin?
Hey @ all ...
Can someone update this tutorial with the new things from here and for debian lenny ?
(http://www.isp-control.net/documentation...omega_rc3)
(This post was last modified: 08-11-2009 06:32 PM by se2bass.)
06-04-2009 06:21 AM
Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #48
RE: enable spamassassin?
maia won't work with the method described here afaik, because maia comes with its own amavis...
06-04-2009 08:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
se2bass Offline
Development Team - Junior
*****
Dev Team

Posts: 133
Joined: May 2009
Reputation: 7
Post: #49
RE: enable spamassassin?
Oh, ok and add it as own howto ?
(Other Topic can someone update the maia guide ?)
06-06-2009 05:30 AM
Find all posts by this user Quote this message in a reply
Diego Offline
Junior Member
*

Posts: 30
Joined: Sep 2009
Reputation: 0
Post: #50
RE: enable spamassassin?
After doing:
Code:
/etc/init.d/amavis restart

I received this:
Code:
Starting amavisd:   The value of variable $myhostname is "abracadabra-designs", but should have been
  a fully qualified domain name; perhaps uname(3) did not provide such.
  You must explicitly assign a FQDN of this host to variable $myhostname
  in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
  network name!
(failed).
09-13-2009 02:21 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)