Helgrim.com |
Chicken Little only has to be right once.
|
||
|
|
Software » Sendmail » Stress testingUsing a live feed to test a new serverUntil this sentence is removed, this is still a work in progress. I recently had to deploy a new mail system which does full spam and virus scanning. Prior to deployment though, I needed to fully test the system with a realistic sample of traffic. The obvious thing to do was to take our existing mail traffic and copy it to the new server. However, it was important that none of this traffic resulted in no duplicated error messages or, worse still, duplicated delivery. I had to figure out the following:
Initial setupThe test server, which we shall refer to as blackhole.example, consists of a FreeBSD 4.11 server with the default Sendmail 8.13.1 installation, with the following blackhole.example.mc file:VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.19 2003/12/31 17:42:16 gshapiro Exp $') OSTYPE(freebsd4) DOMAIN(generic) FEATURE(access_db, `hash -o -TThe live server, live.example is also running FreeBSD and sendmail. 1. Stop blackhole.example from delivering emails.We add the following local rulesets to blackhole.example.mc file after the MAILER(local) line: LOCAL_RULE_0 R $* $: blackhole<@localhost.> LOCAL_RULESETS SLocal_check_rcpt R $* $#discard $:discard This forces sendmail to select the local delivery agent for all email it receives, and then forces the local delivery agent to discard everything. Blackhole.example is now incapable of delivering email anywhere. 2. Make blackhole.example accept all email without errorsIt is vital that when live.example hands an email over to blackhole.example, blackhole does not give any errors to live.example. We add the following rules to blackhole.example.mc: define(`confREFUSE_LA, 1000') define(`confQUEUE_LA, 1000')There are more options to set here, I'll come back to this. 3. Copy messages from live.example to test.exampleThis is the fun bit. live.example is quite a stressed machine, so I didn't want to hurt it further with tools like MIMEDefang. Instead, I just make sendmail think that it received an extra recipient address for each message, and have that address delivered to test.example. 3.1 Insert an extra recipient into all received messagesSources
|
||
|
Updated: 2005-02-03
|
|||
|
|||