On Oct 1, 2003, at 5:13 AM, Mark Powell wrote:
Thanks to everyone for not helping as it made me get off my arse and learn
more about the internals of qpsmtpd :)
Can people please comment on whether I'm doing things right/wrong here
as I've not really done much object orientated perl before?
A few comments since you were soliciting them:
You should write the documentation as POD! :-)
In the docs maybe mention:
How to "compile" the file.
That the module only gets run when RELAYCLIENT is set."\"$comment\" <$email>" is more elegantly written as qq["$comment" <$email>].
Maybe add an extension to only rewrite the address but not the name in the From header.
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).
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 ....
}:-)
- ask
-- http://www.askbjoernhansen.com/
