How to use equals sign in rewrite

In sendmail.cf, how can I get the From: address to have equal signs as
text, like sentfrom=domainname=username [at] localdomain.tld?

If I use this:

R$* < [at] $*. > $* $: sentfrom=$2=$1 < [at] $j. > $3

I get sentfrom.=.domainname.=.username [at] localdomain.tld with the dots!

While this works for the plus sign:

R$* < [at] $*. > $* $: sentfrom+$2+$1 < [at] $j. > $3

I get sentfrom+domainname+username [at] localdomain.tld

Thanks.

Jim
jimhermann [ Do, 04 Oktober 2007 06:38 ] [ ID #1836948 ]

Re: How to use equals sign in rewrite

jimherm... [at] yahoo.com wrote:
> In sendmail.cf, how can I get the From: address to have equal signs as
> text, like sentfrom=domainname=username [at] localdomain.tld?
>
> If I use this:
>
> R$* < [at] $*. > $* $: sentfrom=$2=$1 < [at] $j. > $3
>
> I get sentfrom.=.domainname.=.username [at] localdomain.tld with the dots!
>
> While this works for the plus sign:
>
> R$* < [at] $*. > $* $: sentfrom+$2+$1 < [at] $j. > $3
>
> I get sentfrom+domainname+username [at] localdomain.tld
>
> Thanks.
>
> Jim

Why do you want this? I've seen an equals sign in the username
portion only from intrusion attempts by spammers.
kd6lvw [ Do, 04 Oktober 2007 20:53 ] [ ID #1836955 ]

Re: How to use equals sign in rewrite

In article <1191472710.073085.282960 [at] n39g2000hsh.googlegroups.com>
jimhermann [at] yahoo.com writes:
>In sendmail.cf, how can I get the From: address to have equal signs as
>text, like sentfrom=domainname=username [at] localdomain.tld?
>
>If I use this:
>
>R$* < [at] $*. > $* $: sentfrom=$2=$1 < [at] $j. > $3
>
>I get sentfrom.=.domainname.=.username [at] localdomain.tld with the dots!

You can

1) Add '=' to OperatorChars (confOPERATORS in .mc), though that may have
undesirable side effects (probably not though). It has the probably
desirable side effect that you can parse the rewritten form into its
'='-separated components in a rule.

Or

2) Use something like (untested)

$(dequote "sentfrom=" $2 "=" $1 $)

in the RHS. This will glue the '=' and the two tokens on either side
of it together into a single token as far as sendmail.cf is
concerned - i.e. sentfrom=example.com=bill is 3 tokens, not 7.

--Per Hedeland
per [at] hedeland.org
per [ Fr, 05 Oktober 2007 00:12 ] [ ID #1836957 ]

Re: How to use equals sign in rewrite

On Oct 4, 1:53 pm, "D. Stussy" <kd6... [at] yahoo.com> wrote:
> jimherm... [at] yahoo.com wrote:
> > In sendmail.cf, how can I get the From: address to have equal signs as
> > text, like sentfrom=domainname=usern... [at] localdomain.tld?
>
> Why do you want this? I've seen an equals sign in the username
> portion only from intrusion attempts by spammers.
>

The equals sign is becoming the standard substitute characters for the
AT sign when rewriting email addresses. For example, the Sender
Rewriting Scheme (SRS) uses it. See http://www.openspf.org/SRS

So does the Bounce Address Tag Validation (BATV) scheme, like
prvs=john.levine=01083b66a5 [at] gmail.com
See http://tools.ietf.org/html/draft-levine-mass-batv-02

Yahoo.com is using it in the Envelop Recipient, like
sentto-8245160-3627-1127921781-
janbruch=idirect.com [at] returns.groups.yahoo.com

Jim
jimhermann [ Fr, 05 Oktober 2007 01:15 ] [ ID #1836958 ]

Re: How to use equals sign in rewrite

On Oct 4, 5:12 pm, p... [at] hedeland.org (Per Hedeland) wrote:
> In article <1191472710.073085.282... [at] n39g2000hsh.googlegroups.com>
>
> jimherm... [at] yahoo.com writes:
> >In sendmail.cf, how can I get the From: address to have equal signs as
> >text, like sentfrom=domainname=usern... [at] localdomain.tld?
>
> You can
>
> 1) Add '=' to OperatorChars (confOPERATORS in .mc), though that may have
> undesirable side effects (probably not though). It has the probably
> desirable side effect that you can parse the rewritten form into its
> '='-separated components in a rule.
>
> Or
>
> 2) Use something like (untested)
>
> $(dequote "sentfrom=" $2 "=" $1 $)
>

Great.

I used solution 2 for the outgoing email and solution 1 to rewrite
back to the original email address..

Thanks.

Jim
jimhermann [ Sa, 06 Oktober 2007 22:55 ] [ ID #1838381 ]

Re: How to use equals sign in rewrite

In article <1191704128.283921.267430 [at] k79g2000hse.googlegroups.com>
jimhermann [at] yahoo.com writes:
>On Oct 4, 5:12 pm, p... [at] hedeland.org (Per Hedeland) wrote:
>> In article <1191472710.073085.282... [at] n39g2000hsh.googlegroups.com>
>>
>> jimherm... [at] yahoo.com writes:
>> >In sendmail.cf, how can I get the From: address to have equal signs as
>> >text, like sentfrom=domainname=usern... [at] localdomain.tld?
>>
>> You can
>>
>> 1) Add '=' to OperatorChars (confOPERATORS in .mc), though that may have
>> undesirable side effects (probably not though). It has the probably
>> desirable side effect that you can parse the rewritten form into its
>> '='-separated components in a rule.
>>
>> Or
>>
>> 2) Use something like (untested)
>>
>> $(dequote "sentfrom=" $2 "=" $1 $)
>>
>
>Great.
>
>I used solution 2 for the outgoing email and solution 1 to rewrite
>back to the original email address..

Hm, OK, but if it's in the same sendmail.cf there's no need for 2)
(though it still works) when you have done 1), you can just concatenate
the stuff directly in the RHS like you tried originally.

--Per Hedeland
per [at] hedeland.org
per [ So, 07 Oktober 2007 05:53 ] [ ID #1838879 ]

Re: How to use equals sign in rewrite

jimherm... [at] yahoo.com wrote:
> On Oct 4, 1:53 pm, "D. Stussy" <kd6... [at] yahoo.com> wrote:
> > jimherm... [at] yahoo.com wrote:
> > > In sendmail.cf, how can I get the From: address to have equal signs as
> > > text, like sentfrom=domainname=usern... [at] localdomain.tld?
> >
> > Why do you want this? I've seen an equals sign in the username
> > portion only from intrusion attempts by spammers.
> >
>
> The equals sign is becoming the standard substitute characters for the
> AT sign when rewriting email addresses. For example, the Sender
> Rewriting Scheme (SRS) uses it. See http://www.openspf.org/SRS

So the percent sign is depreciated?
kd6lvw [ So, 07 Oktober 2007 09:42 ] [ ID #1838880 ]
Miscellaneous » comp.mail.sendmail » How to use equals sign in rewrite

Vorheriges Thema: NOQUEUE: connect from (null)
Nächstes Thema: Looking for a rule to send user@domain.com via SMART_HOST