Weblog entry #38 for lee

An exim4 router to freeze incoming mail
Posted by lee on Wed 17 Sep 2008 at 11:31
Tags:

Mail for a specific domain is passed into a external app via a custom router. When the external app fails the router delays the delivery, but for the case where we need to do a live test on a new installation or configuration we want to freeze any incoming mails and then selectively deliver them from the command line.

A custom router to freeze mail based on the existence of a specific file (in this example "/etc/exim4/eh-freeze") should be placed before the router.

externalhandler_test_freeze:
   debug_print = "R: externalhandler_test_freeze for $local_part_prefix$local_part@$domain"
   condition = "${if exists{CONFDIR/eh-freeze}{true}{false}}"
   driver = redirect
   domains = +eh_domains
   user = www-data
   allow_filter
   allow_freeze 
   data = "#Exim filter \n freeze"

The freezing only works once. A mail manually thawed on the command line will bypass this router regardless of the "eh-freeze" config file existing.

 

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search