On Wed, 1 Oct 2003, Ask Bj�rn Hansen wrote:

> A few comments since you were soliciting them:

Indeed I was.

> You should write the documentation as POD!  :-)

Hmmm. I'll have to look into that, because I've never done that before...

> In the docs maybe mention:
>       How to "compile" the file.
>       That the module only gets run when RELAYCLIENT is set.

Yeah. I need to work on it so it's more general. I'd just put it together
to work for our site and then posted it to the list. I just wanted some
quick confirmation that I wasn't messing with something that I shouldn't
before I continued to improve it. I expected, "no, no, no you shouldn't
be modifying those structures" :) The modular nature of qpsmtpd is really
sweet.
  I have already written a module to reject email to non-valid users at
our site. I think with that and this module qpsmtpd will provide most of
the functionality that academic sites, at least, must have. I suppose the
only other would be SMTP-AUTH which would be nice here.

> "\"$comment\" <$email>"  is more elegantly written as qq["$comment"
> <$email>].

Thanks. Elegance is not my strong point when programming in perl :(

> Maybe add an extension to only rewrite the address but not the name in
> the From header.

Well it's there already if the comment in the cdb file is empty then just
the address is used. You mean rewrite the address, but leave any existing
comment field untouched? That's possible although one of the main reasons
we rewrite the comment field is because of problems we have had with
students realising that our old system of just rewriting the address
allowed them to still put whatever they wanted into the comment field.
Some clients like Outlook will just display the comment field, if it
exists, not showing the actual address at all. Thus it was easy for them
to pretend to be someone else to Outlook users; asking for passwords,
other student's grades, etc. Forcing both cuts out this avenue of abuse.

> Is it duplicating ofmipd to only rewrite if the sender matches?  (I.e.
> not rewrite just the From: header if the envelope sender doesn't match
> but the header does).

You mean just rewrite the From: header, but not touch the env-sender?
Doesn't seem much point in that. The env-sender is *the* address that the
mail is from. That alone should be used in determining who the mail came
from?

> If always having the config in $qmaildir/control/ or $qpsmtpd/config/
> is okay, then you should consider using something like:
>
>    my $ofmipname = $self->qp->config('ofmipname', 'map');
>    if (my $found = $ofmipname && $ofmipname->{lc $sender}) {
>       my ($comment, $email) = split ....
>    }

That looks more elegant, but I'm not exactly sure how it maps the
ofmipname.cdb file into a hash. Could you explain?
  Many thanks Ask. I'll start implementing those suggestions.
  Cheers.

-- 
Mark Powell - UNIX System Administrator - The University of Salford
Information Services Division, Clifford Whitworth Building,
Salford University, Manchester, M5 4WT, UK.
Tel: +44 161 295 4837  Fax: +44 161 295 5888  www.pgp.com for PGP key

Reply via email to