You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Ian Evans <dh...@gmail.com> on 2022/05/26 14:32:35 UTC

Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

File under "questions I think I already know the answer to."

Looking at moving my site to a new host and I'm pondering splitting my
web/email servers which have always shared the same server.

Our email server is five accounts. Just me and the missus. A big day is
receiving 200 emails.

Is it safe to assume that a $5/mth 1gig memory account will laugh at the
resources needed to run a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx
stack and not ever break a sweat?

Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Kris Deugau <kd...@vianet.ca>.
Grant Taylor wrote:
> On 5/26/22 8:32 AM, Ian Evans wrote:
>> Is it safe to assume that a $5/mth 1gig memory account will laugh at 
>> the resources needed to run 
>> a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx stack and not ever 
>> break a sweat?
> 
> Sadly, I found that I needed to quit tilting at the 1GB memory windmill 
> and upgraded my tiny VPSs to 2GB for SpamAssassin + ClamAV + some other 
> milters.
> 
> You /might/ be able to get SpamAssassin in 1GB, but I don't know what 
> else will be on the system.

Clam is the memory hog.  With a bit of tweaking you could run everything 
else for a low-volume mail server in 256M - probably including webmail.

Here's a snapshot of my personal system colocated at work  Notice that 
clamd is third in line to gobble up RAM after a couple of VMs...  and 
that's strictly with stock signatures.  SpamAssassin is also mostly 
stock, although I think I bumped the spamd child limit up from default.

11480 libvirt+  20   0   15.7g   2.9g  24156 S   1.0   9.2   6432:10 
qemu-system-x86
  1262 libvirt+  20   0 6509464   1.7g  21324 S   1.0   5.3   1042:56 
qemu-system-x86
26531 clamav    20   0 1652780   1.2g  10840 S   0.0   4.0  37:14.45 
clamd
  1389 www-data  20   0  504660 301888  30464 S   0.0   0.9  10:19.54 
apache2
[snip ~10 Apache processes]
26020 root      20   0  145152 124852   7812 S   0.0   0.4   1:46.78 
spamd child
  7908 defang    20   0  127212 115944  14756 S   0.0   0.4   1:37.65 
mimedefang.pl
30084 root      20   0  132296 111632   7388 S   0.0   0.3   0:11.91 
spamd child
26233 defang    20   0  119112 108324  13488 S   0.0   0.3   0:01.76 
mimedefang.pl
29297 bind      20   0  707620 104780  11088 S   0.0   0.3  30:05.75 
named
26021 root      20   0  123924 102984   7388 S   0.0   0.3   0:01.46 
spamd child
30101 root      20   0  120960  98164   6008 S   0.0   0.3   0:04.21 
spamd child
27041 root      20   0  116648  89448   6364 S   0.0   0.3  13:19.88 
spamd
27055 root      20   0  116648  85360   1972 S   0.0   0.3   0:00.05 
spamd child
  7744 postgres  20   0  211576  66764  64776 S   0.0   0.2   0:08.76 
postgres

-kgd

Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>> > On 5/26/22 8:32 AM, Ian Evans wrote:
>> > > Is it safe to assume that a $5/mth 1gig memory account will laugh at the
>> > > resources needed to run a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx
>> > > stack and not ever break a sweat?

On 27.05.22 09:54, Ian Evans wrote:
>Since my email traffic is so low, couldn't I leave clamav running on
>the more powerful/larger ram web server and have postfix access clamav
>on that ip? Just did a quick search and some people are running it on
>a separate server. Just a pre-coffee thought.

yes, should work perfectly.
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I'm not interested in your website anymore.
If you need cookies, bake them yourself.

Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Ian Evans <dh...@gmail.com>.
On Fri, May 27, 2022 at 3:00 AM Sean Greenslade <se...@seangreenslade.com> wrote:
>
> On Thu, May 26, 2022 at 02:12:01PM -0600, Grant Taylor wrote:
> > On 5/26/22 8:32 AM, Ian Evans wrote:
> > > Is it safe to assume that a $5/mth 1gig memory account will laugh at the
> > > resources needed to run a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx
> > > stack and not ever break a sweat?
> >
> > Sadly, I found that I needed to quit tilting at the 1GB memory windmill and
> > upgraded my tiny VPSs to 2GB for SpamAssassin + ClamAV + some other milters.
> >
> > You /might/ be able to get SpamAssassin in 1GB, but I don't know what else
> > will be on the system.
>
> You can quite confortably fit SA and a full SMTP + IMAP stack in less
> than 1 GB. My (admittedly low volume) mail server is currently sitting
> at 340 MB of used memory and is running:
> - Postfix
> - Dovecot
> - Spamassassin
> - spamass-milter
> - opendkim milter
> - Various python mail sorting / organizing scripts
> - openssh server
> - BIND9 (master DNS server)
> - Radicale (DAV server)
> - Weave (Firefox sync server)
> - Nginx (reverse proxy)
>
> I haven't found the need for any sort of AV scanner. Some SA rules that
> reject messages with executable attachments have been more than adequate
> for me.
>
> --Sean
>
[Just realized I replied only to Sean, so reposting to the list so
others can chime in.]

Thinking out loud for a sec...

Since my email traffic is so low, couldn't I leave clamav running on
the more powerful/larger ram web server and have postfix access clamav
on that ip? Just did a quick search and some people are running it on
a separate server. Just a pre-coffee thought.

Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Grant Taylor <gt...@tnetconsulting.net>.
On 5/27/22 12:59 AM, Sean Greenslade wrote:
> You can quite confortably fit SA and a full SMTP + IMAP stack in less
> than 1 GB. My (admittedly low volume) mail server is currently sitting
> at 340 MB of used memory and is running:

Interesting.

Thank you for the counter point Sean.



-- 
Grant. . . .
unix || die


Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Sean Greenslade <se...@seangreenslade.com>.
On Thu, May 26, 2022 at 02:12:01PM -0600, Grant Taylor wrote:
> On 5/26/22 8:32 AM, Ian Evans wrote:
> > Is it safe to assume that a $5/mth 1gig memory account will laugh at the
> > resources needed to run a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx
> > stack and not ever break a sweat?
> 
> Sadly, I found that I needed to quit tilting at the 1GB memory windmill and
> upgraded my tiny VPSs to 2GB for SpamAssassin + ClamAV + some other milters.
> 
> You /might/ be able to get SpamAssassin in 1GB, but I don't know what else
> will be on the system.

You can quite confortably fit SA and a full SMTP + IMAP stack in less
than 1 GB. My (admittedly low volume) mail server is currently sitting
at 340 MB of used memory and is running:
- Postfix
- Dovecot
- Spamassassin
- spamass-milter
- opendkim milter
- Various python mail sorting / organizing scripts
- openssh server
- BIND9 (master DNS server)
- Radicale (DAV server)
- Weave (Firefox sync server)
- Nginx (reverse proxy)

I haven't found the need for any sort of AV scanner. Some SA rules that
reject messages with executable attachments have been more than adequate
for me.

--Sean


Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Grant Taylor <gt...@tnetconsulting.net>.
On 5/26/22 8:32 AM, Ian Evans wrote:
> Is it safe to assume that a $5/mth 1gig memory account will laugh at the 
> resources needed to run a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx 
> stack and not ever break a sweat?

Sadly, I found that I needed to quit tilting at the 1GB memory windmill 
and upgraded my tiny VPSs to 2GB for SpamAssassin + ClamAV + some other 
milters.

You /might/ be able to get SpamAssassin in 1GB, but I don't know what 
else will be on the system.



-- 
Grant. . . .
unix || die


Re: [SPAM?] Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>>    Am 26.05.22 um 16:32 schrieb Ian Evans:
>>    > File under "questions I think I already know the answer to."
>>    >
>>    > Looking at moving my site to a new host and I'm pondering splitting 
>>    > my web/email servers which have always shared the same server.
>>    >
>>    > Our email server is five accounts.  Just me and the missus.  A big 
>>    > day is receiving 200 emails.
>>    >
>>    > Is it safe to assume that a $5/mth 1gig memory account will laugh at 
>>    > the resources needed to run 
>>    > a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx stack and not ever 
>>    > break a sweat?

>>On Thu, May 26, 2022, 10:36 AM Reindl Harald, 
>><h....@thelounge.net> wrote:
>>    when you add clamav later it will be clamav who laughs about 1 GB
>>    memory
>>    after it has sucked it completly

>On 26/05/2022 16:49, Ian Evans wrote:
>>Just looked at clamav's memory usage. Ouch. :)

On 26.05.22 17:00, Bert Van de Poel wrote:
>If you want to save on memory usage, just having amavis filter out exe 
>files or exe-like files (screensavers, exes in archives, etc.) is much 
>more efficient than using clamav. Of course this doesn't filter out 
>Office macros/OLE, but there's a plugin in SA related to that, I 
>believe.

there are also many signatures for JS and other kinds of malicious content 
in clamav...

however, with clamav, 2G of RAM is not enough. Especially when using 
ConcurrentDatabaseReload (default on)

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"They say when you play that M$ CD backward you can hear satanic messages."
"That's nothing. If you play it forward it will install Windows."

Re: [SPAM?] Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Bert Van de Poel <be...@ulyssis.org>.
If you want to save on memory usage, just having amavis filter out exe 
files or exe-like files (screensavers, exes in archives, etc.) is much 
more efficient than using clamav. Of course this doesn't filter out 
Office macros/OLE, but there's a plugin in SA related to that, I believe.


On 26/05/2022 16:49, Ian Evans wrote:
> On Thu, May 26, 2022, 10:36 AM Reindl Harald, <h....@thelounge.net> 
> wrote:
>
>
>
>     Am 26.05.22 um 16:32 schrieb Ian Evans:
>     > File under "questions I think I already know the answer to."
>     >
>     > Looking at moving my site to a new host and I'm pondering
>     splitting my
>     > web/email servers which have always shared the same server.
>     >
>     > Our email server is five accounts. Just me and the missus. A big
>     day is
>     > receiving 200 emails.
>     >
>     > Is it safe to assume that a $5/mth 1gig memory account will
>     laugh at the
>     > resources needed to run
>     a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx
>     > stack and not ever break a sweat?
>
>     when you add clamav later it will be clamav who laughs about 1 GB
>     memory
>     after it has sucked it completly
>
>
> Just looked at clamav's memory usage. Ouch. :)
>

Re: Memory requirement for SpamAssassin/Postfix/Roundcube/Dovecot stack

Posted by Ian Evans <dh...@gmail.com>.
On Thu, May 26, 2022, 10:36 AM Reindl Harald, <h....@thelounge.net>
wrote:

>
>
> Am 26.05.22 um 16:32 schrieb Ian Evans:
> > File under "questions I think I already know the answer to."
> >
> > Looking at moving my site to a new host and I'm pondering splitting my
> > web/email servers which have always shared the same server.
> >
> > Our email server is five accounts. Just me and the missus. A big day is
> > receiving 200 emails.
> >
> > Is it safe to assume that a $5/mth 1gig memory account will laugh at the
> > resources needed to run a SpamAssassin/Postfix/Roundcube/Dovecot/Nginx
> > stack and not ever break a sweat?
>
> when you add clamav later it will be clamav who laughs about 1 GB memory
> after it has sucked it completly
>

Just looked at clamav's memory usage. Ouch. :)

>