I have recently had to re-name some accounts on our system, and have set
up a second alias file to handle these. What I want is for it to behave
as a normal alias file, but also to send a message back to the originator
stating that this user's ID has changed. I have achieved a working setup,
but it seems horribly inefficient - for each delivery by this route it
performs a lookup on the new alias file three times, and twice for all
other messages. How can this be improved? The relevant bits of the
configuration are as follows:
old_id:
driver = autoreply;
text = "Dear Sir/Madam,\n\nThis is an automatic message.\n\n\
Your mail to $local_part@$domain has been delivered successfully.\n\n\
Please note, however, that $local_part is this user's old identifier,\n\
and that you should use ${lookup{$local_part}lsearch{/etc/rename-aliases}\
{$value}} in future.\n",
from = "postmaster@$primary_hostname",
to = "$sender_address",
subject = "Obsolete address: User ID has changed.",
user = exim
.
.
.
renamed_usersa:
driver = aliasfile,
transport = old_id,
unseen;
file = /etc/rename-aliases,
search_type = lsearch
renamed_usersb:
driver = aliasfile;
file = /etc/rename-aliases,
search_type = lsearch
Many thanks for suggestions of better ways to do this!
Tim.
--
--------------------------------------------------------------------------
T J R Cutts Tel: +44 1223 333596
Dept. of Biochemistry, Tennis Court Rd., Fax: +44 1223 766002
Cambridge, CB2 1QW, UK