Anyone following RELENG_5_2?

Freddie Cash fcash-ml at sd73.bc.ca
Wed Jul 21 14:08:16 PDT 2004


> Jesse Guardiani wrote:
>> Freddie Cash wrote:
>> Would you mind sharing snippets of your maildroprc?  I've only been
>> testing Maildrop and using a very minimal amount of features.  The
>> one thing I'm most interested in is using maildrop to provide
>> per-user quotas with Maildir quotas.  I have not been able to do so.
>> No matter what I try, even using if and nested if, the last QUOTA
>> line in the file is the one that gets used.  I've searched around on
>> the maildrop lists but have never been able to find a solution to
>> this one.

>> I haven't tried yet with per-user maildroprc files, hoping there was
>> a way to do this with just a central maildroprc and "if $USER ==
>> soandso, $QUOTA = XKB" structures, with a default QUOTA set for
>> everyone else.

> No, I don't mind sharing snippets. I don't use the QUOTA features,
> just the if, to, and exit features. 99% of my mailfilter file follows
> this template:

> # Cron
> if ( /^From: root at chortos.wingnet.net.*/ )
> {
>         # Now filter on subject
>         if ( /^Subject: Cron.*/ )
>         {
>                 to "$MAILHOME/.Work.Servers.Chortos.Cron"
>                 exit
>         }
> }

Hmmm, that's similar to what we use.  Here's a snippet of ours:
# Set the default Maildir location
DEFAULT=$HOME/Maildir

# Default quota for all users is 150 MB
MAILDIRQUOTA=150000000S


#### Configure individual quotas and/or mail filters ####
# Defaults are listed at the end of the file

if ($LOGNAME == "fcash")
{
   # Set quota to 1 GB
   MAILDIRQUOTA=1000000000S

   if (/maint_workorders at sd73.bc.ca/:h)
   {
     to "$DEFAULT/.SD73.Workorders - Maint"
   }

   if (/Comp WO/:h)
   {
     to "$DEFAULT/.SD73.Workorders - Comp"
   }
# End if block for fcash
}

There are blocks like the above for a couple different users, mainly
just to change their MAILDIRQUOTA setting.  But, no matter what I set
the MAILDIRQUOTA to, and no matter how many layer of if statements I
wrap it in, it will always be set to the largest value in the file. 
Very bizarre.  If I set the default to 1 MB, then set it to 100 MB in
a 5-layer nested if statement, everybody gets a 100 MB limit.

> Unfortunately, I haven't found a good web interface to these files
> yet, so we're limited to offering server-side filtering to staff
> accounts only. I plan to remedy that soon though.

SquirrelMail has a plugin that allow for maildroprc manipulation in
the Options page.  It requires FTP support, though, to copy the new
maildroprc to the user's home directory.

>> What IMAP server are you using and what OS?  I tried Courier-IMAP
>> running on FreeBSD 5.2.1 and I could consistently crash the server
>> when trying to access folders with 10,000 messages in them.  (I also
>> save 90% of my mail.)

> Currently the mail server setup is as follows:

> courier-imap 2.2.1
> maildrop 1.5.3
> sqwebmail 3.5.3
> qmail 1.03 (with like 30 patches!)
> clamav-0.74

> plus a huge number of custom scripts and programs running on FreeBSD
> 4.8.

Similar to our setup, except we use Postfix instead of QMail, and
running on FreeBSD 5.2.1.

> I pieced the server together by hand over the course of about 4 months
> as my primary UNIX learning experience back in 2002 when I first came
> to WingNET. I've been maintaining and developing it ever since, and
> I'm long overdue for another round of massive upgrades.

> ClamAV and sqwebmail are the thorns in my flesh. ClamAV hangs
> constantly, and I had to setup a monit daemon to check on it every 30
> seconds and restart it if necessary. sqwebmail, while an excellent and
> extremely high performance webmail interface, lacks polish in it's UI.
> In addition, sqwebmail tends to go insane and spawn multiple CPU
> hungry child processes. I have to watch it constantly.

Really?  We've never had problems with ClamAV (currently running
0.72). clamdscan has been running almost non-stop for about 4 months
now.  The only time it's stopped is for upgrades, or when I do
something stupid and crash the server.  :)  The daemon is started via
rc.d and messages are passed to it via amavisd-new.  Between ClamAV
and SpamAssassin, the mail server blocks about 30,000 messages a week.

> Having said all that, the server itself is a 500Mhz Dell PIII running
> rather slow hardware RAID 5. The CPU is more than adaquate for
> everything but virus scanning, which I may break off into a higher
> horsepower box someday.

Currently, our mail filtering server is a dual-AthlonMP 2200+ with 3.5
GB RAM with 3x200 GB HD in a RAID5 array (3Ware Escalade 7506).  It's
very much overkill since all it does nowadays is virus and spam
filterng, but it was originally supposed to be our IMAP, webmail, and
SMTP server.  :)

> As for 10,000 messages, I currently have a vpopmail mailing list
> folder that has 10474 messages. I can check it with no problems, but
> it's access times are bordering on what I consider "slow". I mainly
> use GMANE and KNode for mailing list reading these days.

Never could narrow it down to either a FreeBSD issue or a Courier-IMAP
issue, or a combination of both.  Running with SCHED_ULE, I could
never get KMail or SquirrelMail to scan a folder with 10,000+ messages
in it.  The server would crash due to not enough KVA errors or
spinlock errors.  Running with SCHED_4BSD, I would get hardlocks when
accessing large folders.

Switching to Cyrus, though, allows me to access, view, and even move
around, folders with 25,000+ messages in it without affecting the CPU
load too much.

Since we won't be using Courier or Cyrus for IMAP anymore, I never
really investigated too deeply.  We're moving to IBM's Workplace2
environment for e-mail next month.

-- 
Freddie Cash, CCNT CCLP        Helpdesk / Network Support Tech.
School District 73             (250) 377-HELP [377-4357]
fcash-ml at sd73.bc.ca


More information about the freebsd-mobile mailing list