# deal with plussed users so aliases work nicely
R$+ - * $#local $@ $&h $: $1
R$+ - $* $#local $@ + $2 $: $1 + *
original
# deal with plussed users so aliases work nicely
R$+ + * $#local $@ $&h $: $1
R$+ + $* $#local $@ + $2 $: $1 + *
Is this the only change I have to make? Does this break anything else?
The next paragraph in ruleset 5 deals with relay of hub and looks like
it works with plussed users. Do I have to change it too?
thanks
bob
>Hi I want to change the delimiter character for plussed user from "+" to
>"-". The reason is that many sites strip the plus. For example yahoo
>travel strips the plus.
>I think I have to change the the cf file ruleset 5. Here is the change I
>think I have to make:
># deal with plussed users so aliases work nicely
>R$+ - * $#local $@ $&h $: $1
>R$+ - $* $#local $@ + $2 $: $1 + *
>original
># deal with plussed users so aliases work nicely
>R$+ + * $#local $@ $&h $: $1
>R$+ + $* $#local $@ + $2 $: $1 + *
>Is this the only change I have to make? Does this break anything else?
That won't work unless you add "-" to OperatorChars . And changing
OperatorChars might break something.
Bob,
You can use regex map in rule set 0 to rewrite user-...@local.email.domain
to user+...@local.email.domain loved by sendmail.
AFAIR I posted an example how to dot it some time ago.
--
Andrzej [pl>en: Andrew] Adam Filip http://www.polbox.com/a/anfi/
an...@priv.onet.pl an...@xl.wp.pl [former: an...@Box43.pl]
I am proud I am not a bushman. *Random Epigram* :
It's like deja vu all over again.
-- Yogi Berra
LOCAL_CONFIG
Ksubm regex -s1 ^([^-_.+]+)[-_.][^+]+$
SLocal_localaddr
R$* $: < $(subm $1 $: $) > $1
R< $+ > $+ $# local $: $1
R$* $# ok
So this basically takes aaaaaaa-bbb and makes it aaaaaaabbb but
aaaaaaa+bbb is left alone. I know how to do a regex in perl to change
all "-" to "+". It would be s/-/+/g and I would be done.
thanks for any help
bob
A brief description is provided in doc/op/op.me file in sendmail distribution.
I know it may be "a little bit" cryptic for somebody without some sendmail
experience.
> I have guessed -a does append -s1 does substring match
> availability. I have from a previous post of yours:
>
> LOCAL_CONFIG
> Ksubm regex -s1 ^([^-_.+]+)[-_.][^+]+$
> SLocal_localaddr
> R$* $: < $(subm $1 $: $) > $1
> R< $+ > $+ $# local $: $1
> R$* $# ok
>
> So this basically takes aaaaaaa-bbb and makes it aaaaaaabbb but
> aaaaaaa+bbb is left alone. I know how to do a regex in perl to change
> all "-" to "+". It would be s/-/+/g and I would be done.
* Unless you use FEATURE(`preserve_local_plus_detail') sendmail handles
user+detail itself.
* The above code replaces aaaaaaa-bbb by aaaaaaa
* if you want to replace aaaaaaa-bbb by aaaaaaa+bbb use
Ksubm regex -d+ -s1,2 ^([^-_.+]+)[-_.]([^+]+)$
* FYI: the above rewriting in Local_localaddr takes place AFTER virtusertable
lookups and after alias expansion. If you want the rewtite before
virtusertable lookups then slightly different R lines are required/
* If you want to test such maps use
echo "/map subm aaaa-bbbb" | sendmail -bt -C test.cf
--
Andrzej [pl>en: Andrew] Adam Filip http://www.polbox.com/a/anfi/
an...@priv.onet.pl an...@xl.wp.pl [former: an...@Box43.pl]
I am proud I am not a bushman. *Random Epigram* :
God help those who do not help themselves.
-- Wilson Mizner
A couple of questions:
1. Is this rule applied recursively if successful? I thought the $: a
the beginning of the rhs meant to stop after the first time.
2. Does the second $: mean default of spaces?
3. What does the pair of <> in the rhs do?
change
bob-dated-105...@bobsbits.net
to
<bob+dated+1056745552+43361d> bob-dated-105...@bobsbits.net
Any other doc references?
thanks
Ksubm regex -d+ -s1,2,3 ^([^-]+)[-]([^-]+)[-]?([^+]+)$
Why would you want to change more than one? Sendmail will only pay
attention to one '+' - I think it's the first one, but if you only have
one '+' there is no room for confusion/uncertainty about that...
--Per Hedeland
p...@hedeland.org
No
> I thought the $: a
> the beginning of the rhs meant to stop after the first time.
Exactly.
As Per wrote in another reply only forst + is treated specially by sendmail.
> 2. Does the second $: mean default of spaces?
$: in $(subm $1 $: $) specifies what lookup should return on "no match".
In this case it is nothing (empty string).
> 3. What does the pair of <> in the rhs do?
> change
> bob-dated-105...@bobsbits.net
> to
> <bob+dated+1056745552+43361d> bob-dated-105...@bobsbits.net
<> are used to "mark" data returned by the lookup for second R line.
Another way to write it:
LOCAL_CONFIG
Ksubm regex -s1 ^([^-_.+]+)[-_.][^+]+$
SLocal_localaddr
R$* $: $(subm $1 $: $) $| $1
R$+ $| $+ $# local $: $1
R$* $| $* $# ok
> Any other doc references?
> [...]
--
Andrzej [pl>en: Andrew] Adam Filip http://www.polbox.com/a/anfi/
an...@priv.onet.pl an...@xl.wp.pl [former: an...@Box43.pl]
I am proud I am not a bushman. *Random Epigram* :
To lead people, you must follow behind.
-- Lao Tsu