[Mimedefang] OT: Sendmail rewrite from address

G. Roderick Singleton gerry at pathtech.org
Fri Sep 26 17:51:01 EDT 2003


On Fri, 2003-09-26 at 16:56, Lucas Albers wrote:
> I am having a problem configuring sendmail to rewrite domains.
> I have spent 2 hours trying to figure out how to do this by looking at my
> sendmail book and on google. Perhaps someone could help me how to figure
> this out...
> 

The easiest way to do this is in sendmail itself. What you want is
GENERICSTABLE re-writing. You may also want to rewrite the ENVELOPE.
Usage et cetera is outlined in cf/README or, if RH, in
/usr/share/doc/sendmail.

> I have 80 linux machines that are configured to smarthost their mail
> through a central relay.  I want to rewrite outgoing mail sent from those
> machines to refer back to the central relay, example:
> 

You put these in your generictable,

> cslab1,cslab2,cslab3
> all mail sent from these machines, which are already smart host relayed
> through cs.montana.edu should have their from address rewritten from
> user at cslab1 to user at cs...
> I want to rewrite the domain, and it is not specific per user.
> 
> 

The content of the table should look somethnig like the following:

george	george at cs.montana.edu

> Explcit example:
> mail from: user at cslab1.csnet.montana.edu which smarthost relayed through
> cs.montana.edu should be rewritten to appear to be
> From: user at cs.montana.edu.
> 
> 
> 
> I have looked at genericstable,genericsdomain, virtusertable,
> masquerade_as, all the standard items in various sendmail documentation,
> and nothing appears to work.

How do you mean doesn't work? When you use generics rewriting it happens
so late in the processing that it's difficult to tell whether it works
or not. The only way I have been able to confirm generics rewriting is
to bounce emails off an external server where I have a shell account and
can put in a .forward. Try this.

BTW, virtuser* are for redirecting inbound emails. It could be useful at
the relay.

> I can't update the configuration files on all of the client machines, so I
> need a way to modify the address on the smarthost relay.
> 
> Would it be better to do this via mimedefang?
> 

I really don't know but I suspect not. Others will answer I'm certain
who know more about MD that I. I a relative newbie with it myself.

All in all considerable work for the relay in any case.
-- 
Gerry Roderick Singleton <gerry at pathtech.org>
416-452-4583




More information about the MIMEDefang mailing list