On Tue, Jul 09, 2002 at 03:00:51PM +1200, Nick Rout wrote:
> Can i do something at the head of the procmail.global file to change
> $CYRUSUSER to all lowercase, like (in pseudocode) CYRUSUSER=lowercase($CYRUSYSER)
Not quite what you asked, but you could lowercase the address in the
email itself, by filtering the message through a shell/awk/perl/something
combination.
Try something like :-
:0fw
| /your/lowercasing/script
which treats the command as a filter - i.e. it makes changes to the mail
message in place.
But that won't affect your pre-set environment variable. Symlinking
uppercase name variations in /var/spool/mail is a nasty hack, but
sometimes usefull.
How about calling deliver directly through a filter, as above, but also
completing procmail processing at the same time, instead of using
procmail to write to the final delivery destination itself? That way,
your script can compensate for the case problem ...
Ah, just re-reading the procmailrc man page ... filters can be preceded
with variable= , capturing the stdout ...
:0fw
CYRUSUSER=|grep [A-Z]@|tr [:upper:] [:lower:]
-jim