user+detail -> user_detail

user+detail -> user_detail

am 04.11.2007 16:50:03 von matt

With my current configuration I am using a wildcard in virtusertable for
my domain. And then in procmail I forward all mail of the form
[user]_[random]@crazylogic.net to the [user]@otherdomain.com. I set
this up a long time ago, so that I (and all my users) could use
different addresses for different purposes. I'm having a problem now
because alot of spammers are using my domain as a from address, with
[random]@crazylogic.net. I guess they like this because I treat all
crazylogic addresses as valid. I'd like to now report an error for all
unknown addresses, but still maintain [user]_[random]@crazylogic.net
support. I would tell my users to use [user]+[random]@crazylogic.net
instead, but the + isn't treated as a valid user by alot of online forms.

How do I make sendmail use an _ instead of a + be a seperator? I've
looked at sendmail.cf and see some virtuser voodoo that could possibly
be tweaked to accomplish what I want. I've tried playing around with it
a bit, keep getting 5.1.1 when I try to send an email to an addr with an
_ seperator. Does anyone know that good enough to give me some advice?
Or perhaps there is an easier solution?

Thanks for your help
Matt.

Re: user+detail -> user_detail

am 04.11.2007 22:01:09 von gtaylor

On 11/4/2007 9:50 AM, matt@crazylogic.net wrote:
> How do I make sendmail use an _ instead of a + be a seperator? I've
> looked at sendmail.cf and see some virtuser voodoo that could possibly
> be tweaked to accomplish what I want. I've tried playing around with it
> a bit, keep getting 5.1.1 when I try to send an email to an addr with an
> _ seperator. Does anyone know that good enough to give me some advice?
> Or perhaps there is an easier solution?

I'm not sure how to do it off hand (I'll have to look it up) but I know
there is a way to alter the "+" in user+detail to be a different character.



Grant. . . .

Re: user+detail -> user_detail

am 05.11.2007 19:56:55 von Matt Gostick

The section in sendmail.cf that I'm editing is below:

1: # handle virtual users
2: R$+ $: $1 Mark for lookup
3: R $+ < @ $={VirtHost} . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $)
> $1 < @ $2 . >
4: R $+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 <
@ $2 . >
5: R<@> $+ + $+ < @ $* . >
6: $: < $(virtuser $1 + + @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 +
$2 < @ $3 . >
7: R<@> $+ + $* < @ $* . >
8: $: < $(virtuser $1 + * @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 +
$2 < @ $3 . >
9: R<@> $+ _ $* < @ $* . >
10: $: < $(virtuser $1 _ * @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1
_ $2 < @ $3 . >
11: R<@> $+ + $* < @ $* . >
12: $: < $(virtuser $1 @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2
< @ $3 . >
13: R<@> $+ + $+ < @ $+ . > $: < $(virtuser + + @ $3 $@ $1 $@ $2 $@ +
$2 $: @ $) > $1 + $2 < @ $3 . >
14: R<@> $+ + $* < @ $+ . > $: < $(virtuser + * @ $3 $@ $1 $@ $2 $@ +
$2 $: @ $) > $1 + $2 < @ $3 . >
15: R<@> $+ _ $* < @ $+ . > $: < $(virtuser _ * @ $3 $@ $1 $@ $2 $@ +
$2 $: @ $) > $1 _ $2 < @ $3 . >
16: R<@> $+ + $* < @ $+ . > $: < $(virtuser @ $3 $@ $1 $@ $2 $@ +$2
$: ! $) > $1 + $2 < @ $3 . >
17: R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @
$2 . >
18: R<@> $+ $: $1
20: R $+ $: $1
21: R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
22: R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
23: R< $+ > $+ < @ $+ > $: $>Recurse $1


I've added lines 9,10,15, but after restarting sendmail, I still get
'User unknown'. I don't really understand the syntax of the above
code, so I'm really just stabbing in the dark. If anyone can correct
what I have above, or point me in the direction of figuring it out,
I'd be very appreciative.

Thanks
Matt


On Nov 4, 4:01 pm, Grant Taylor wrote:
> On 11/4/2007 9:50 AM, m...@crazylogic.net wrote:
>
> > How do I make sendmail use an _ instead of a + be a seperator? I've
> > looked at sendmail.cf and see some virtuser voodoo that could possibly
> > be tweaked to accomplish what I want. I've tried playing around with it
> > a bit, keep getting 5.1.1 when I try to send an email to an addr with an
> > _ seperator. Does anyone know that good enough to give me some advice?
> > Or perhaps there is an easier solution?
>
> I'm not sure how to do it off hand (I'll have to look it up) but I know
> there is a way to alter the "+" in user+detail to be a different character.
>
> Grant. . . .

Re: user+detail -> user_detail

am 05.11.2007 20:01:03 von Matt Gostick

Ew, that chunk looks awful when wordwrapped.
If you wanna see it online its here:
http://www.crazylogic.net/virtuser.html

On Nov 5, 1:56 pm, Matt Gostick wrote:
> The section in sendmail.cf that I'm editing is below:
>
> 1: # handle virtual users
> 2: R$+ $: $1 Mark for lookup
> 3: R $+ < @ $={VirtHost} . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $)> $1 < @ $2 . >
>
> 4: R $+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 <
> @ $2 . >
> 5: R<@> $+ + $+ < @ $* . >
> 6: $: < $(virtuser $1 + + @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 +
> $2 < @ $3 . >
> 7: R<@> $+ + $* < @ $* . >
> 8: $: < $(virtuser $1 + * @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 +
> $2 < @ $3 . >
> 9: R<@> $+ _ $* < @ $* . >
> 10: $: < $(virtuser $1 _ * @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1
> _ $2 < @ $3 . >
> 11: R<@> $+ + $* < @ $* . >
> 12: $: < $(virtuser $1 @ $3 $@ $1 $@ $2 $@ +$2 $: @ $) > $1 + $2
> < @ $3 . >
> 13: R<@> $+ + $+ < @ $+ . > $: < $(virtuser + + @ $3 $@ $1 $@ $2 $@ +
> $2 $: @ $) > $1 + $2 < @ $3 . >
> 14: R<@> $+ + $* < @ $+ . > $: < $(virtuser + * @ $3 $@ $1 $@ $2 $@ +
> $2 $: @ $) > $1 + $2 < @ $3 . >
> 15: R<@> $+ _ $* < @ $+ . > $: < $(virtuser _ * @ $3 $@ $1 $@ $2 $@ +
> $2 $: @ $) > $1 _ $2 < @ $3 . >
> 16: R<@> $+ + $* < @ $+ . > $: < $(virtuser @ $3 $@ $1 $@ $2 $@ +$2
> $: ! $) > $1 + $2 < @ $3 . >
> 17: R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @
> $2 . >
> 18: R<@> $+ $: $1
> 20: R $+ $: $1
> 21: R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
> 22: R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
> 23: R< $+ > $+ < @ $+ > $: $>Recurse $1
>
> I've added lines 9,10,15, but after restarting sendmail, I still get
> 'User unknown'. I don't really understand the syntax of the above
> code, so I'm really just stabbing in the dark. If anyone can correct
> what I have above, or point me in the direction of figuring it out,
> I'd be very appreciative.
>
> Thanks
> Matt
>
> On Nov 4, 4:01 pm, Grant Taylor wrote:
>
> > On 11/4/2007 9:50 AM, m...@crazylogic.net wrote:
>
> > > How do I make sendmail use an _ instead of a + be a seperator? I've
> > > looked at sendmail.cf and see some virtuser voodoo that could possibly
> > > be tweaked to accomplish what I want. I've tried playing around with it
> > > a bit, keep getting 5.1.1 when I try to send an email to an addr with an
> > > _ seperator. Does anyone know that good enough to give me some advice?
> > > Or perhaps there is an easier solution?
>
> > I'm not sure how to do it off hand (I'll have to look it up) but I know
> > there is a way to alter the "+" in user+detail to be a different character.
>
> > Grant. . . .