[Exim] Rewriting From with comment addes

Top Page
Delete this message
Reply to this message
Author: F.F. Jacot-Guillarmod
Date:  
To: exim-users
Subject: [Exim] Rewriting From with comment addes
Hi there,

We're using Cyrus IMAP on a sealed server (no home directories) and
doing validation/authentication out of a MySQL database. A cosmetic
problem is that when our student users send mail using IMP, the From:,
Reply-to:, Sender: and Return-path: headers turn out to be along the
lines of the somewhat spartan:

    Header: g00a4091@???


(obviously the Return-path _needs_ to be spartan...)

I've already got a rewrite rule that creates the above headers that says:

^([gG][567890]......)@terrapin.ru.ac.za     $local_part@??? bcfrF


What I'd like to do is use the real name information available in MySQL
to create:

    From: Joe Bloggs <g00a4091@???>


I've tried the rewrite rule:

^([gG][1234567890]......)@terrapin.ru.ac.za     \
${lookup mysql{select fullname from authentication where username='${quote_mysql:$local_part}'}{$value}fail}\
 <$local_part@???> bcfrF


but firing up exim -bt whines about:

2000-01-22 08:15:06 Exim configuration error
unknown rewrite flag character (m) in line 504

While it could be argued that it is the responsibility of the MUA to
produce a chatty From: header, I'm concerned that the default
configurations mostly don't do it, or else that people land up becoming
the non-obvious and less than accountable "KnightOrc" or "LaserBlaster".
Creative mail forgery is endemic at an institution crawling with
undergraduates having unfettered Internet access, and I'd like to
minimise such things happening, or at least provide an audit trail -
something that becomes a bit tenuous with IMAP and clients such as IMP.

I'm sorry that what started out as a technical question has turned into
a philosophical one, but I'd be grateful for comments as to:

    - whether this is an "acceptable" case for rewriting
    - whether I should rather add an X-header of some sort
    - whether I'm on the right track
    - what the heck I've missed!  I've tried permutations of this
      with similar result.


Many thanks,
--
F.F. Jacot Guillarmod - IT Division - Rhodes University - Grahamstown
Internet: Jacot@??? Phone: +27 46 603 8284 Fax: +27 46 622 7764
The views expressed above are not necessarily those of Rhodes University