automated mail server stress testing?
Julian Field
MailScanner at ecs.soton.ac.uk
Sat Feb 3 14:18:19 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I do this by using a little milter that a friend (Matt) wrote for me.
You can also use one of the milters on www.snertsoft.com as well, there
is one there that will do it you. What you need is this basically
a) Your real MXs have this filter installed to add (bcc) recipients to
every message. For each recipient you add, you change the domain name to
something made up, so in my case I add
test at alegriatest1.com
test at alegriatest2.com
test at alegriatest3.com
test at alegriatest4.com
test at alegriatest5.com
Then you have a mailertable that directs mail to all those domains to
your test box, likethis:
alegriatest1.com
esmtp:[alegria.ecs.soton.ac.uk]:[karla.ecs.soton.ac.uk]
alegriatest2.com
esmtp:[alegria2.ecs.soton.ac.uk]:[karla.ecs.soton.ac.uk]
alegriatest3.com
esmtp:[alegria3.ecs.soton.ac.uk]:[karla.ecs.soton.ac.uk]
alegriatest4.com
esmtp:[alegria4.ecs.soton.ac.uk]:[karla.ecs.soton.ac.uk]
I use different hostnames for each one so that sendmail cannot possibly
realise that these messages are going to the same place, and therefore
merge them back in 1 message with multiple recipients. Sendmail is very
good at doing that, and you have to try quite hard to stop it.
That gets 5 copies of your incoming mail going to your test server.
You then turn that test server into a dumb relay that MailScanners all
its mail and sends it all to another host, which sinks all incoming mail
to /dev/null, which you can do with a sendmail.mc that includes
define(`LUSER_RELAY', `local:nobody')
and then has an alias in /etc/aliases "nobody" to "/dev/null".
This all means that your test server does not only test the MailScanner
load, but also all the SMTP traffic load of the mail coming in and mail
going out.
This is the best of building a test setup that I have found. Sorry if it
sounds a bit complicated, just build and test it one step at a time.
My incoming feed is about 200k messages and my test server can handle 16
times that with all MailScanner and SpamAssassin options switched on,
using sendmail. That's 3.2m messages per day without the queue building up.
Chris Yuzik wrote:
> Just wondering if there are any programs/scripts/whatever that can put
> an artificial high load on our new server so we can see if anything
> breaks *before* we start moving real users to this new box.
>
> Ideally, I'd like to create a hundred or so (fake) users, then hit
> this box with ridiculous amounts of mail (and artificial spam/viruses
> too) so we can make sure it handles the load without breaking, doesn't
> let viruses through, etc.
>
> Anyone aware of an automated server stress tester such as this?
>
> Thanks,
> Chris
Jules
- --
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.5.3 (Build 5003)
Comment: Fetch my public key foot-print from www.mailscanner.info
Charset: ISO-8859-1
wj8DBQFFxIvJEfZZRxQVtlQRAutSAKCzP+oUYv/ekBotZfHlkLKagsS5+gCeLDDL
5kMjRKyVC/XGFk9VE7VD1oQ=
=MjY+
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk
More information about the MailScanner
mailing list