[Mimedefang] Question about limiting size of TMPFS volume

Michael Sims michaels at crye-leike.com
Tue May 27 08:57:01 EDT 2003


Hi,

Quoting Lucas Albers <admin at cs.montana.edu>:

> What were the steps to use tmpfs as your tmp directory in mimedefang?

First you'll need to create a separate directory for your mail quarantine 
because you don't want quarantined emails taking up space in your TMPFS 
volume.  I created a directory called /var/spool/mailquarantine, then I went 
into my MD source directory and did:

make clean
rm config.cache
./configure  --with-quarantinedir=/var/spool/mailquarantine
make

Then I shutdown MD and Sendmail and did a "make install".

Next I moved any quarantined mails out of /var/spool/MIMEDefang into the new 
directory and deleted everything else (but left the directory).

Then I added this entry into my /etc/fstab:

none  /var/spool/MIMEDefang   tmpfs   noatime,nodev,nosuid,defaults,size=500M 0 
0

Then I mounted the TMPFS volume with "mount /var/spool/MIMEDefang", and started 
Sendmail and MD back up.  You'll want to adjust the limit obviously depending 
on how much RAM you have and how many max MD children you are configured for.

> What sort of speed increase have you seen?

It hasn't been miraculous, but it was a nice noticeable boost.  Enough that it 
was definitely worth doing.  The main thing is that the mimedefang.pl processes 
get their work done much faster, and there is less I/O thrashing of the disk 
(which was my bottleneck before I believe).  Since they get done faster, my 
load average stays down and general performance of the machine is much better.

> Will this cause you to lose email if your server dies?
> I would assume yes?

Someone else can correct me if I'm wrong, but I don't actually think it's any 
more likely for you to lose email in this scenario than it is in any other.  
MIMEDefang runs it's filter while the remote MTA is still connected to your 
mail server.  MIMEDefang finishes it's work before the DATA phase of the SMTP 
conversation is over and sendmail says "Message accepted for delivery".  If 
your server were to go down before this OK status is sent to the remote MTA 
then it (the remote MTA) would probably treat that as a temporary failure 
condition and defer the mail for later.  This is just a guess, if anyone else 
has definitive information feel free to share...

___________________________________________
Michael Sims
Project Analyst - Information Technology
Crye-Leike Realtors
Office: (901)758-5648  Pager: (901)769-3722
___________________________________________



More information about the MIMEDefang mailing list