Current time: 05-18-2024, 11:03 PM Hello There, Guest! (LoginRegister)


Post Reply 
enable spamassassin?
Author Message
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #26
RE: enable spamassassin?
you are completely right...

My assumption is that on a ispcp server there is no high mail load (5 amavis processes means in the worst scenario (assuming each client needs 300s for completing amavis) your mailsystem would still be able to process approx 1500 Mails per day.)

The system will be able to receive 100 mails parallel but only 5 mails are simultanously processed by amavis. Postfix tries to keep the session open until the amavis process is free or until the smtpd timeout (default: 300s). When you under ddos you may want to configure postfix to use stressdependend configuration values (f.e. smtpd_hard_error_limit = ${stress?2}${stress:20}, smtpd_timeout = ${stress?10}${stress:300}, stress dependend configuration is available above v.2.5 and configured per default above v.2.6). This will make your smtpd process being blocked a for shorter times... But don't do configurations like this when you don't understand the concept!

When assuming each mails needs 10 seconds (on my servers overall avarage is about 1s) on amavis, you would be able to process 30 Mails per Minute. (Remember with appropriate filtering 80% of the mails are filtered out before amavis. Autowhitlisted constellations need a much lower processing time).

This leads to the following conclusion: A default installation configured as stated in this small howto is able to process about 100-150 mails per minute that reaches client mailboxes...

On our dedicated Mailrelays (4gig ram and xeon quadcore) we use about 15 processes (amavis on mem disk). This constellation is able to process over 1 million mails per day (according to our lab test with 5kb mail each).

I recommand every person which want to test this by himself to take a small machine (p4 with 2gig ram should be enough) install postfix configure amavis like I stated above and use smtp-source to stress the system. You will be suprised where the problems start. Mail is not as trivial as the "SIMPLE" in SMTP would let assume. You have to deal with I/O, DNS load (when using blacklists), problems with to small process count (smtpd, amavis, clamd etc...). When you come to imap you will have to keep an eye on your memory usage and on disk i/o. (f.e Pop3 with server stored mails is a i/o killer par excellence) This is why I personally never would handle mails on a webserver...


But as we both agree everyone has to find his own "perfect" solution. This post should just underline that 5 processes is not just a value from my imagination, this is a value based on experience in running different sized mail systems (including high load servers) and a compromise which reach out for most of the users here...
(03-05-2009 10:49 AM)meph137 Wrote:  Hi - is there any way to test if this is working? I have checked my mail headers on a received mail and dont see any spam headers, I though spamassassin always added them. if not, is there a way to check spamassassin is working?

thanks for the helpful setup Smile

well it seems I missed to write something in the config (I hate this debian config splitting.. Arghhh ;-))

amavis/spamassassin tags mails only if they are in local_domains... so we have to tell them our virtual domains are local_domains:

in /etc/amavis/conf.d/50-user

add:
Code:
@local_domains_maps = ( [".$mydomain"], read_hash("/etc/postfix/ispcp/domains") );

if you like to enable site-wide bayes add the following to spamassassins local.cf (if you have multiple relays you might want to store it in sql instead of local file):
Code:
use_bayes 1
use_bayes_rules 1

bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam 1
bayes_auto_learn_threshold_spam 7.5

bayes_path /var/spamassassin/bayes/bayes
bayes_file_mode 0777

remember to train sa with at least 200 spammails to enable bayes...
(This post was last modified: 03-10-2009 10:59 AM by rbtux.)
03-10-2009 09:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
enable spamassassin? - pgentoo - 02-22-2009, 04:19 AM
RE: enable spamassassin? - rbtux - 02-22-2009, 04:20 AM
RE: enable spamassassin? - pgentoo - 02-22-2009, 04:31 AM
RE: enable spamassassin? - rbtux - 02-22-2009, 04:48 AM
RE: enable spamassassin? - pgentoo - 02-22-2009, 04:54 AM
RE: enable spamassassin? - rbtux - 02-22-2009, 06:08 AM
RE: enable spamassassin? - juanper - 05-15-2009, 07:13 PM
RE: enable spamassassin? - ashitman - 05-17-2009, 07:37 PM
RE: enable spamassassin? - rbtux - 06-03-2009, 08:24 AM
RE: enable spamassassin? - tedeu - 05-28-2009, 01:32 AM
RE: enable spamassassin? - BeNe - 02-22-2009, 06:40 AM
RE: enable spamassassin? - rbtux - 02-22-2009, 06:42 AM
RE: enable spamassassin? - BeNe - 02-22-2009, 06:48 AM
RE: enable spamassassin? - rbtux - 02-22-2009, 06:52 AM
RE: enable spamassassin? - robbo007 - 04-23-2009, 01:17 AM
RE: enable spamassassin? - Cube - 02-22-2009, 07:07 AM
RE: enable spamassassin? - rbtux - 02-22-2009, 07:14 AM
RE: enable spamassassin? - BeNe - 02-22-2009, 07:08 AM
RE: enable spamassassin? - Cube - 02-22-2009, 07:44 AM
RE: enable spamassassin? - pgentoo - 02-23-2009, 04:23 AM
RE: enable spamassassin? - Cube - 02-23-2009, 05:01 AM
RE: enable spamassassin? - rbtux - 02-23-2009, 05:39 AM
RE: enable spamassassin? - Cube - 02-23-2009, 05:47 AM
RE: enable spamassassin? - pgentoo - 02-24-2009, 07:22 AM
RE: enable spamassassin? - meph137 - 03-05-2009, 10:49 AM
RE: enable spamassassin? - kilburn - 03-07-2009, 03:02 AM
RE: enable spamassassin? - rbtux - 03-07-2009, 03:48 AM
RE: enable spamassassin? - kilburn - 03-10-2009, 02:25 AM
RE: enable spamassassin? - rbtux - 03-10-2009, 02:39 AM
RE: enable spamassassin? - kilburn - 03-10-2009, 09:06 AM
RE: enable spamassassin? - rbtux - 03-10-2009 09:46 AM
RE: enable spamassassin? - meph137 - 03-10-2009, 07:06 PM
RE: enable spamassassin? - alecksievici - 03-21-2009, 09:36 PM
RE: enable spamassassin? - womd - 03-25-2009, 03:20 AM
RE: enable spamassassin? - rbtux - 03-25-2009, 04:09 AM
RE: enable spamassassin? - pgentoo - 05-14-2009, 02:37 PM
RE: enable spamassassin? - kilburn - 05-14-2009, 06:18 PM
RE: enable spamassassin? - pgentoo - 05-15-2009, 04:31 AM
RE: enable spamassassin? - pongraczi - 05-15-2009, 03:21 AM
RE: enable spamassassin? - kilburn - 05-15-2009, 03:29 AM
RE: enable spamassassin? - pongraczi - 05-15-2009, 04:12 AM
RE: enable spamassassin? - pongraczi - 05-15-2009, 07:18 PM
RE: enable spamassassin? - kurgans - 05-28-2009, 05:47 AM
RE: enable spamassassin? - tedeu - 05-28-2009, 01:26 PM
RE: enable spamassassin? - alecksievici - 05-28-2009, 02:54 PM
RE: enable spamassassin? - kilburn - 05-28-2009, 03:44 PM
RE: enable spamassassin? - se2bass - 06-04-2009, 06:21 AM
RE: enable spamassassin? - rbtux - 06-04-2009, 08:37 AM
RE: enable spamassassin? - se2bass - 06-06-2009, 05:30 AM
RE: enable spamassassin? - Diego - 09-13-2009, 02:21 AM
RE: enable spamassassin? - Diego - 09-18-2009, 12:46 PM
RE: enable spamassassin? - Presssack - 10-25-2009, 08:01 PM
RE: enable spamassassin? - stevenbinion - 11-10-2009, 04:01 AM
RE: enable spamassassin? - theprincy - 01-07-2010, 06:58 PM
RE: enable spamassassin? - sunghost - 02-06-2010, 01:09 AM
RE: enable spamassassin? - kilburn - 02-06-2010, 01:14 AM
RE: enable spamassassin? - sunghost - 02-06-2010, 02:18 AM
RE: enable spamassassin? - kilburn - 02-06-2010, 12:02 PM
RE: enable spamassassin? - sunghost - 02-11-2010, 08:46 PM
RE: enable spamassassin? - kilburn - 02-18-2010, 06:14 PM
RE: enable spamassassin? - sunghost - 02-18-2010, 07:35 PM
RE: enable spamassassin? - NIIcK - 02-21-2010, 03:04 AM
RE: enable spamassassin? - kilburn - 02-22-2010, 03:32 AM
RE: enable spamassassin? - wildufo - 02-27-2010, 01:51 AM
RE: enable spamassassin? - Servera - 06-05-2011, 07:13 PM

Forum Jump:


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