$OpenBSD: patch-src_pop3_client_c,v 1.3 2005/02/12 12:17:07 brad Exp $
--- src/pop3/client.c.orig	Wed Sep  1 10:28:02 2004
+++ src/pop3/client.c	Fri Oct  1 02:40:01 2004
@@ -108,6 +108,7 @@ static int init_mailbox(struct client *c
 struct client *client_create(int hin, int hout, struct mail_storage *storage)
 {
 	struct client *client;
+	enum mailbox_open_flags flags;
 
 	client = i_new(struct client, 1);
 	client->input = i_stream_create_file(hin, default_pool,
@@ -124,7 +125,9 @@ struct client *client_create(int hin, in
 
 	storage->set_callbacks(storage, &mail_storage_callbacks, client);
 
-	client->mailbox = storage->open_mailbox(storage, "INBOX", FALSE, FALSE);
+	flags = getenv("MMAP_INVALIDATE") != NULL ?
+		MAILBOX_OPEN_MMAP_INVALIDATE : 0;
+	client->mailbox = storage->open_mailbox(storage, "INBOX", flags);
 	if (client->mailbox == NULL) {
 		i_error("Couldn't open INBOX: %s",
 			storage->get_last_error(storage, NULL));
