Mailing List Archive

Regular expressions Help
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hi,

I'm running exim 3.2x in quite a custom environment.

I have the following directors and transport :

DIRECTORS
=========
# This director matches local user mailboxes.
AddressChange:
driver = smartuser
new_address = HPS+$local_part@$domain
new_director = LocalDomainUser


# Local domain user
LocalDomainUser:
driver = localuser
transport = local_delivery

TRANSPORTS
===========

local_delivery:
driver = appendfile
file = /var/spool/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
group = exim
user = $local_part
mode = 0660

As you can see my director, AddressChange mangles the local_part to have the text 'hps+' prepended. At the moment, the transport is correctly generating mail box files all in lower case, ie :
/var/spool/mail/hps+pmiles

I need exim to generate mail box files in mixed case, where the 'hps' is always in upper case. ie :
/var/spool/mail/HPS+pmiles

Is this possible, and if so how?

Many thanks in advance,

Paul
--
RE: Regular expressions Help [ In reply to ]
On Wed, 24 Jul 2002 17:40:26 +0100 "Paul Miles" wrote:

(...)

> As you can see my director, AddressChange mangles the local_part to have the text 'hps+' prepended. At the moment, the transport is correctly generating mail box files all in lower case, ie :
> /var/spool/mail/hps+pmiles

> I need exim to generate mail box files in mixed case, where the 'hps' is always in upper case. ie :
> /var/spool/mail/HPS+pmiles

> Is this possible, and if so how?

have you tried setting

locally_caseless = false

in the main configuration? The value defaults to true.

HTH,

Bernard Stern, SWITCH

______S_W_I_T_C_H___The Swiss Education_______________________________________
mail: SWITCH Head Office a Tel: +41 1 268 1520
Limmatquai 138 n Fax: +41 1 268 1568
CH-8001 Zurich d e-mail: stern@switch.ch
________________________________________Reseach Network_______________________
RE: Regular expressions Help [ In reply to ]
On Thu, 25 Jul 2002, Bernard Stern wrote:

> > As you can see my director, AddressChange mangles the local_part to have the text 'hps+' prepended. At the moment, the transport is correctly generating mail box files all in lower case, ie :
> > /var/spool/mail/hps+pmiles
>
> > I need exim to generate mail box files in mixed case, where the 'hps' is always in upper case. ie :
> > /var/spool/mail/HPS+pmiles
>
> > Is this possible, and if so how?
>
> have you tried setting
>
> locally_caseless = false
>
> in the main configuration? The value defaults to true.


Alternatively, if you want to force all characters preceding + to
uppercase at the time the mailbox name is generated, you could use
something like this (untested):

file = /var/spool/mail/\
${if match{$local_part}{^([a-z])+\\+(.*)}\
{${uc:$1}+$2}{$local_part}}

--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.