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

Rewriting the sender address for all outgoing e-mail

4 views
Skip to first unread message

paul....@leicester.gov.uk

unread,
Jul 1, 2005, 10:30:37 AM7/1/05
to
I'm sure this must be a simple task, but we are trying get our mailhub
to re-write all sender addresses from internal mail
hosts(hostname.leicester.gov.uk) to leicester.gov.uk.

Our current topology is that we have several mail servers internally
that interact with the mail hub. The mail hub then passes all of the
outgoing mail to the mail-relay in the DMZ which then sends to other
mail servers on the internet.

For incomming addresses, the mailhub uses the alaises.db to determine
which internal server to deliver to.

We have had a look at the sendmail FAQ which directed us to the manual
page on masquerading. From there we deduced that we should be using the
MASQUERADE_AS() feature.

Our sendmail.mc contains:

MASQUERADE_AS(`leicester.gov.uk')dnl
FEATURE(masquerade_envelope)dnl

We are finding that when the mail reaches the mail-relay it still has
us...@hostname.leicester.gov.uk in the from field.

I have also added MASQUERADE_DOMAIN_FILE(`filename') and created a file
with a list of domains to be re-written, but this had no effect either.

This must be a common problem so can anyone tell me how to resolve it
please?

paul....@leicester.gov.uk

unread,
Jul 1, 2005, 10:30:15 AM7/1/05
to

paul....@leicester.gov.uk

unread,
Jul 1, 2005, 10:30:24 AM7/1/05
to

Matej Vela

unread,
Jul 1, 2005, 11:09:13 AM7/1/05
to
On 2005-07-01, paul....@leicester.gov.uk <paul....@leicester.gov.uk> wrote:
[...]

> Our sendmail.mc contains:
>
> MASQUERADE_AS(`leicester.gov.uk')dnl
> FEATURE(masquerade_envelope)dnl
>
> We are finding that when the mail reaches the mail-relay it still has
> us...@hostname.leicester.gov.uk in the from field.
>
> I have also added MASQUERADE_DOMAIN_FILE(`filename') and created a file
> with a list of domains to be re-written, but this had no effect either.

Is the file owned by root and mode 644?

What do the following commands say?

# echo '$=M' | sendmail -bt
# echo 'canonify,MasqHdr us...@hostname.leicester.gov.uk' | sendmail -bt

julien mills

unread,
Jul 1, 2005, 1:26:53 PM7/1/05
to
> We have had a look at the sendmail FAQ which directed us to the manual
> page on masquerading. From there we deduced that we should be using the
> MASQUERADE_AS() feature.
>
> Our sendmail.mc contains:
>
> MASQUERADE_AS(`leicester.gov.uk')dnl
> FEATURE(masquerade_envelope)dnl

In mine, the FEATURE is first, then the MASQUERADE_AS, I'm
not sure if this makes any difference.

And, this is dumb, but you did install the cf, and maybe then
sendmail needs to be restarted?

--
Julien Mills Amoroso's Baking Company
Tel: (215) 471-4740 IS Dept
email: jul...@amorosobaking.com www.amorosobaking.com

John Chajecki

unread,
Jul 1, 2005, 5:11:06 PM7/1/05
to
The file is owned by root and is chmod 644.

Output from the commands as follows:

# echo '$=M' | sendmail -bt

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>

# echo 'canonify,MasqHdr us...@hostname.leicester.gov.uk' | sendmail -bt

No output.


John Chajecki

unread,
Jul 1, 2005, 5:15:03 PM7/1/05
to
> In mine, the FEATURE is first, then the MASQUERADE_AS, I'm
> not sure if this makes any difference.

I will give this a go.

> And, this is dumb, but you did install the cf, and maybe then
> sendmail needs to be restarted?

Not at all dumb, just obvious - which we sometimes miss. We did restart sendmail though.

Matej Vela

unread,
Jul 3, 2005, 7:24:33 AM7/3/05
to
On 2005-07-01, John Chajecki <jc...@dsl.pipex.com> wrote:
> The file is owned by root and is chmod 644.
>
> Output from the commands as follows:
>
> # echo '$=M' | sendmail -bt
>
> ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> Enter <ruleset> <address>

This means that the list of domains doesn't get read for some reason,
perhaps an incorrect path... Try listing them explicitly in sendmail.mc:

MASQUERADE_DOMAIN(`hostname1.leicester.gov.uk')dnl
MASQUERADE_DOMAIN(`hostname2.leicester.gov.uk')dnl
...

Joe Creel

unread,
Jul 6, 2005, 9:24:06 AM7/6/05
to
Try
MASQUERADE_AS(`leicester.gov.uk')dnl
FEATURE(`masquerade_entire_domain')dnl
Message has been deleted

Joe Creel

unread,
Jul 7, 2005, 11:38:20 AM7/7/05
to
Look at the FEATURE(ALLMASQUERADE)

Hans Spaans wrote:
> Joe Creel wrote in comp.mail.sendmail:


>
>>Try
>>MASQUERADE_AS(`leicester.gov.uk')dnl
>>FEATURE(`masquerade_entire_domain')dnl
>
>

> I would like to, but then I would break what I try to accomplish like
> below. This is also the reason I started to look at the generictable.
>
> user1@domaina -> user1@domainc
> user2@domaina -> user1@domaind
> user3@domainb -> user1@domainc
>
> Hans
>

Message has been deleted

Ingo Freund

unread,
Jul 8, 2005, 5:57:56 AM7/8/05
to
paul....@leicester.gov.uk schrieb:
I use
define(`confDOMAIN_NAME', `domain.com')dnl
MASQUERADE_AS(`domain.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`always_add_domain', `domain.com')dnl <- this made it work

Bye - Ingo.

0 new messages