pcre.virtual.first:/^(.*)-plus-(.*)\@(domain\.com)$/ $1+$2@$3
is there anyway to emulate this in the virtusertable, I'm thinking no.
If so am I forced to use a rewrite rule? Any pointers on where to go
for that, because what I've found doing a few searches has not
inspired me to take this on.
You can use regex map (regular expressions) after LOCAL_RULE_0 to rewrite
user-plu...@local.domain into user+...@local.domain.
1) Check if your sendmail supports regular expressions
sendmail -d0.1 -bv root | grep MAP_REGEX
2) Add the following lines in your *.mc file
[put tab between $* and $: in R line]:
LOCAL_CONFIG
Kplus regex -s1,2 -d+ ^([0-9a-z]{1,32})-plus-([0-9a-z]{1,16})$
LOCAL_RULE_0
R$+ <@$=w.> $* $: $(plus $1 $: $1 $) <@$2.> $3
P.S.
You may consider using less restrictive regular expressions.
The one I posted limits user part to 32 alphanumerics and detail to 16
alphanumerics.
--
Andrzej [pl>en: Andrew] Adam Filip http://www.polbox.com/a/anfi/
an...@priv.onet.pl an...@xl.wp.pl [former: an...@Box43.pl]
*Random Epigram* :
A prediction is worth twenty explanations.
-- K. Brecher