View Single Post

  #2 (permalink)  
Old 06-16-2004
Chris Severn
 
Posts: n/a
Default Re: always_bcc and aliases file size problems

Skip to the end to see where I answer my own question ...............


On Wed, 16 Jun 2004 23:48:44 +0800, Chris Severn <severn@iinet.net.au> wrote:

>I wanted to save a copy of all mails passing through the company mail server
>(yes, everybody knows I'm logging, and it's for legitimate reasons).
>
>So, I put inside postfix's main.cf :
>always_bcc = allmailbackup
>
>Then, in my aliases file, I put a line :
>allmailbackup: /var/spool/mail/backup/allmail
>
>And, I configured logrotate to rotate that file every day.
>
>That got me a copy of every mail received or sent by anyone in the company,
>logged to that file, so I could examine it with mutt or elm, or extract
>messages with grepmail etc..
>
>No problem so far. It's been running fine for a week now, until tonight.
>
>I just found that file has grown to 50MB, when it's usually only half that or
>less, which is possible due to normal circumstances, but suspicious.
>
>The big problem was that there was mail stuck in the mailq which was refusing
>to save mail to that file because the file was too big.
>
>Is there a 50MB limit on the size of files which will be delivered to using
>the aliases method ?
>
>I know an alternate method would be to have a real user set up as
>allmailbackup, but I've got a system wide spamassassin set up which I don't
>want to trigger on those mails. There's probably a way around that, but I want
>to understand what's wrong with my existing method first.
>
>Thanks,
>
>Chris


OK, I managed to find the answer, and it's this line in
/usr/doc/postfix-2.0.19/defaults :
mailbox_size_limit = 51200000

According to "man 8 local",
mailbox_size_limit
Limit the size of a mailbox etc. file (any file that is written
to upon delivery). Set to zero to disable the limit.

So, that's answers my question.

Oh, and I found why my file had doubled in size - because someone decided to
send an email with a 5MB attachment to 5 separate people inside the company.
Now I'm off to search for the option for limiting attachment sizes........

Thanks,

Chris
Reply With Quote