Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

email address as LHS in mailertable map?

235 views
Skip to first unread message

Aleksandar Milivojevic

unread,
Apr 18, 2002, 7:37:50 AM4/18/02
to
Is it possible (supported, documented?) to have email address as LHS
in mailertable? So that e-mail for a...@foo.bar is sent to server
kebab.foo.bar and mail for b...@foo.bar is sent to server bureq.foo.bar.

--
Aleksandar Milivojević <al...@fly.srk.fer.hr>
Opinions expressed herein are my own.
Statements included here may be fiction rather than truth.

Andrzej Filip

unread,
Apr 18, 2002, 1:49:00 PM4/18/02
to
Aleksandar Milivojevic wrote:

>Is it possible (supported, documented?) to have email address as LHS
>in mailertable? So that e-mail for a...@foo.bar is sent to server
>kebab.foo.bar and mail for b...@foo.bar is sent to server bureq.foo.bar.
>

It is not supported so it can not be documented :-)

It requires very simple patch in cf/m4/proto.m4

ifdef(`_MAILER_TABLE_', `dnl
# not local -- try mailer table lookup
- R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
+ R$* <@ $+ > $* $: < $1 @ $2 > $1 < @ $2 > $3 extract user@host
R< $+ . > $* $: < $1 > $2 strip trailing dot
R< $+ > $* $: < $(mailertable $1 $) > $2 lookup user@host
dnl it is $~[ instead of $- to avoid matches on IPv6 addresses
R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 check -- resolved?
+ R< $* @ $+ > $* $: < $2 > $3 leave only host name
+ R< $+ > $* $: < $(mailertable $1 $) > $2 lookup host
+ dnl it is $~[ instead of $- to avoid matches on IPv6 addresses
+ R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 check -- resolved?
R< $+ > $* $: $>Mailertable <$1> $2 try domain',
`dnl')

*I HAVE NOT TESTED IT*

--
Andrzej (Andrew) A. Filip an...@box43.pl http://www.polbox.com/a/anfi/
366A 5DD7 7707 379C 9251 32AE C948 0BD2 7D99 688A expires: 2003-01-25
I may disagree with the following *random epigram* :
For every credibility gap, there is a gullibility fill.
-- R. Clopton

Andreas Amann

unread,
Apr 18, 2002, 1:54:49 PM4/18/02
to
On 18 Apr 2002, Aleksandar Milivojevic wrote:

> Is it possible (supported, documented?) to have email address as LHS
> in mailertable? So that e-mail for a...@foo.bar is sent to server
> kebab.foo.bar and mail for b...@foo.bar is sent to server bureq.foo.bar.
>

No. See cf/README: "Using Mailertables" for details.
I'm not an sendmail expert but i think you can put the adresses into
either the alias file or the virtusertable.
The virtusertable is probably the better solution but aliases does also.

--
Best regards / Mit freundlichen Gruessen,
Andreas Amann < andrea...@epost.de >
=========================================

Aleksandar Milivojevic

unread,
Apr 19, 2002, 2:27:53 AM4/19/02
to
Andreas Amann (andrea...@epost.de) wrote:
> I'm not an sendmail expert but i think you can put the adresses into
> either the alias file or the virtusertable.

Both of theese would rewrite recepient addresses in envelope. I need
something that have functionality of mailertable (that will affect
only mail routing without rewriteing addresses). I'll try out what
Andrzej sugessted or try writing rules for custom made map myself.

Aleksandar Milivojevic

unread,
Jun 12, 2002, 4:31:07 AM6/12/02
to
Andrzej (Andrew) A. Filip wrote:
> Aleksandar Milivojevic wrote:
> > Is it possible (supported, documented?) to have email address as LHS
> > in mailertable? So that e-mail for a...@foo.bar is sent to server
> > kebab.foo.bar and mail for b...@foo.bar is sent to server bureq.foo.bar.
>
> It is not supported so it can not be documented :-)
>
> It requires very simple patch in cf/m4/proto.m4
>
> ifdef(`_MAILER_TABLE_', `dnl
> # not local -- try mailer table lookup
> - R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
> + R$* <@ $+ > $* $: < $1 @ $2 > $1 < @ $2 > $3 extract user@host
> R< $+ . > $* $: < $1 > $2 strip trailing dot
> R< $+ > $* $: < $(mailertable $1 $) > $2 lookup user@host
> dnl it is $~[ instead of $- to avoid matches on IPv6 addresses
> R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 check -- resolved?
> + R< $* @ $+ > $* $: < $2 > $3 leave only host name
> + R< $+ > $* $: < $(mailertable $1 $) > $2 lookup host
> + dnl it is $~[ instead of $- to avoid matches on IPv6 addresses
> + R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3 check -- resolved?
> R< $+ > $* $: $>Mailertable <$1> $2 try domain',
> `dnl')
>
> *I HAVE NOT TESTED IT*

It was a long long time since I posted original question. Anyhow, the
project I needed this for was delayed, so I managed to test this patch
just recently. It seems to work very nicely. Is there any chance for
this patch to go into official sendmail distribution? It would add
another useful dimension to mailertable feature.

Andrzej Filip

unread,
Jun 12, 2002, 3:14:00 PM6/12/02
to
Aleksandar Milivojevic wrote:

You can send your "petition" to send...@sendmail.org
[ http://www.sendmail.org/email-addresses.html ]

Sendmail 8.12.4 was released 2002/06/03 - most likely you will have to
wait a few months for 8.12.5.
--
Andrzej [Andrew] A. Filip an...@box43.pl http://www.polbox.com/a/anfi/


366A 5DD7 7707 379C 9251 32AE C948 0BD2 7D99 688A expires: 2003-01-25
I may disagree with the following *random epigram* :

You don't have to be nice to people on the way up if you're not planning on
coming back down.
-- Oliver Warbucks, "Annie"

0 new messages