I have read the README.cf and the
http://www.sendmail.org/virtual-hosting.html page
I have now 2 domains (I have changed DNS)
...
domain2.com. IN MX 10 domain1.com.
...
Also I have created virtual user table (/etc/mail/virtusertable) and
/etc/mail/genericstable, and I have
added domain1.com and domain2.com to /etc/mail/local-host-names
The problem is when us...@domain2.com sends a message to
som...@domain1.com
it comes to someone user as us...@domain1.com instead as
us...@domain1.com
1. is it a dns or a sendmail configuration problem?
I suppose the second one.
Rules?
I am running sendmail-8.9.3-20 under Red Hat 6.2
Any help will be appreciated
--
Evelio Martínez
If you insist on munging names, at least do it consistently - the above
description doesn't make any sense at all.
>1. is it a dns or a sendmail configuration problem?
>I suppose the second one.
>Rules?
If you're using masquerading including FEATURE(`allmasquerade') you
might need to use (from cf/README):
limited_masquerade
Normally, any hosts listed in class {w} are masqueraded. If
this feature is given, only the hosts listed in class {M} (see
below: MASQUERADE_DOMAIN) are masqueraded. This is useful
if you have several domains with disjoint namespaces hosted
on the same machine.
--Per Hedeland
p...@bluetail.com
> In article <3AA91C2E...@testanet.com> Evelio Martinez
> <evelio....@testanet.com> writes:
> >
> >I have read the README.cf and the
> >http://www.sendmail.org/virtual-hosting.html page
> >I have now 2 domains (I have changed DNS)
> >...
> >domain2.com. IN MX 10 domain1.com.
> >...
> >
> >Also I have created virtual user table (/etc/mail/virtusertable) and
> >/etc/mail/genericstable, and I have
> >added domain1.com and domain2.com to /etc/mail/local-host-names
> >
> >The problem is when us...@domain2.com sends a message to
> >som...@domain1.com
> >it comes to someone user as us...@domain1.com instead as
> >us...@domain1.com ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^
>
> If you insist on munging names, at least do it consistently - the above
> description doesn't make any sense at all.
I am sorry I meant "... us...@domain1.com instead of as us...@domain2.com ..."
>
>
> >1. is it a dns or a sendmail configuration problem?
> >I suppose the second one.
> >Rules?
>
> If you're using masquerading including FEATURE(`allmasquerade') you
> might need to use (from cf/README):
>
> limited_masquerade
> Normally, any hosts listed in class {w} are masqueraded. If
> this feature is given, only the hosts listed in class {M} (see
> below: MASQUERADE_DOMAIN) are masqueraded. This is useful
> if you have several domains with disjoint namespaces hosted
> on the same machine.
>
> --Per Hedeland
> p...@bluetail.com
I attach sendmail.mc
TIA
--
Evelio Martínez
>I attach sendmail.mc
>################################################## Pasado al final segun README
># MAILER(procmail)
># MAILER(smtp)
>################################################## Pasado al final segun README
You can't comment out things with a leading '#' in the .mc file - use
'dnl' if you want to have the text still there (can't see the point in
this case though).
>################################################## Comentado 12-3-01
># MASQUERADE_AS(domain1.com)dnl
>################################################## Fin Comentado 12-3-01
Ditto here - MASQUERADE_AS is still active.
>MASQUERADE_DOMAIN(domain1.com)dnl
>MASQUERADE_DOMAIN(domain2.com)dnl
And here you explicitly request that domain2.com should be masqueraded -
so you shouldn't be surprised that it is... (this overrides
limited_masquerade, of course).
># Define our userdb file for FQDN rewrites
>Kuserdb btree -o /etc/users.db
>define(confUSERDB_SPEC, /etc/users.db)
>FEATURE(notsticky)
>LOCAL_RULE_1
>#########################################################
>### Local ruleset 1, rewrite sender header & envelope ##
>#########################################################
># Thanks to Bjart Kvarme <bjart....@usit.uio.no>
>S1
>R$- $1 < @ $j . > user => user@localhost
>R$- < @ $=w . > $* $: $1 < @ $2 . > $3 ?? $1 user@localhost?
>R$+ ?? $+ $: $1 ?? $(userdb $2 : mailname $: @ $)
>R$+ ?? @ $@ $1 Not found
>R$+ ?? $+ $>3 $2 Found, rewrite
I seriously doubt that you want/need any of that - see FAQ 3.2, 3.3.
>MAILER(procmail)
>MAILER(smtp)
You're missing
MAILER(local)
--Per Hedeland
p...@bluetail.com
In article <3AACC6CE...@testanet.com> Evelio Martinez
<evelio....@testanet.com> writes:
>Per Hedeland escribió:
>
>> In article <3AA91C2E...@testanet.com> Evelio Martinez
>> <evelio....@testanet.com> writes:
>> >
>> >it comes to someone user as us...@domain1.com instead as
>> >us...@domain1.com ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> ^^^^^^^^^^^^^^^^^
>>
>> If you insist on munging names, at least do it consistently - the above
>> description doesn't make any sense at all.
>
>I am sorry I meant "... us...@domain1.com instead of as
>us...@domain2.com ..."
>I attach sendmail.mc
>################################################## Pasado al final segun README
># MAILER(procmail)
># MAILER(smtp)
>################################################## Pasado al final segun README
You can't comment out things with a leading '#' in the .mc file - use
'dnl' if you want to have the text still there (can't see the point in
this case though).
you are right.
>MASQUERADE_DOMAIN(domain1.com)dnl
>MASQUERADE_DOMAIN(domain2.com)dnl
you are right
>MAILER(procmail)
>MAILER(smtp)
You're missing
you are perfectly right
MAILER(local)
ok, I will start againg from the beggining.
The system I am working with was already set up when I came here.
As you did realized I haven't got much idea about sendmail. Iwill have to buy the
Sendmail 2nd ed. by B. Costales
0. I am using IP aliasing for www and need the same for e-mail.
1. I assume that steps 1 to 3 concerning DNS Configuration are ok.
(http://www.sendmail.org/virtual-hosting.html )
;
; Define the hosts in this zone
;
domain2.com. IN A a.b.c.d where
a.b.c.d is IP alias
domain2.com IN MX 10 domain1.com.
2. In the Sendmail configuration part, I started from step 4 because I already had
the sendmail rpm.
I do not know if it is the correct decision. Step 1 of instructions assume
version 8.10.0 or higher and I have
8.9.3-20
Of course I have read the /usr/doc/sendmail/README.cf
3. Step 4. Create a virtual user table (/etc/mail/virtusertable)
4. Step 5. Build the virtual user table (makemap hash /etc/mail/virtusertable.db <
/etc/mail/virtusertable)
5. Step 6. Reverse-map local users for out-bound mail
FEATURE(`genericstable', `hash /etc/mail/genericstable')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
create (/etc/mail/genericstable) like /etc/mail/virtusertable but with the
columns reversed
6. Step 7. Add domain name to sendmail's class w.
Add 2 lines to /etc/mail/local-host-names
domain1.com
domain2.com
I do not know if this is correct. domain2 is other host in the LAN (www
server), not the one having the
sendmail.
I have also included this 2 lines in /etc/mail/generics-domains
7. Restart sendmail. /etc/rc.d/init.d/sendmail stop ... start
ok after doing all this when I send mail from us...@domain2.com to
anoth...@domain1.com I receive mail
as sent by
us...@domain1.com and what I want is to receive it as us...@domain2.com
Suppose I will have another problem when this one is fix it.
What happen if I add another domain and someone from this domain want to use the
same username?
Is there any way of having the same names for different domains in the same machine?
By the way where can I find more on-line doc about sendmail -bt commands
Thanks for the light ... :-)
--
Evelio Martínez
You should start from step 3 in that case.
> I do not know if it is the correct decision. Step 1 of instructions assume
>version 8.10.0 or higher and I have
>8.9.3-20
So it would be a good idea to upgrade - current version is 8.11.3.
>6. Step 7. Add domain name to sendmail's class w.
> Add 2 lines to /etc/mail/local-host-names
> domain1.com
> domain2.com
>
> I do not know if this is correct.
8.9.3 uses a different filename (/etc/sendmail.cw IIRC).
> I have also included this 2 lines in /etc/mail/generics-domains
That's generally wrong - it should list the domains you want to
reverse-map (if any), not the result of the reverse-mapping.
>ok after doing all this when I send mail from us...@domain2.com to
>anoth...@domain1.com I receive mail
>as sent by
>us...@domain1.com and what I want is to receive it as us...@domain2.com
I already gave you the solution for this in an earlier article in the
thread, see:
http://groups.google.com/groups?ic=1&q=msgid:%3c98c105$308r$5...@hedeland.org%3e
- you already had that in your .mc file, but also a
MASQUERADE_DOMAIN(domain2.com) that overrode it.
>What happen if I add another domain and someone from this domain want to use the
>same username?
>Is there any way of having the same names for different domains in the
>same machine?
Sure, just do it - that's the primary reason to use a virtusertable at
all.
>By the way where can I find more on-line doc about sendmail -bt commands
Try the '?' command while in -bt mode.
--Per Hedeland
p...@bluetail.com
The only thing pending is ...
Do you know if there is a way to mask the message id to show
<2001030717...@domain2.com> instead of
<2001030717...@host.domain1.com> ??
P.S.: I already have ordered the Sendmail 2nd ed. by Costales book?
--
Evelio Martínez
> Thanks for all. It is almost already working as I wanted.
> The only thing pending is ...
> Do you know if there is a way to mask the message id to show
> <2001030717...@domain2.com> instead of
> <2001030717...@host.domain1.com> ??
That's the job of your mail client.
-s
--
Suresh Ramasubramanian + Wallopus Malletus Indigenensis
mallet @ cluestick.org + Lumber Cartel of India, tinlcI
EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
Yes, you must under no circumstances change a Message-Id that is already
present in a message - not that sendmail easily lets you, but anyway...
You *could* change (but not easily either) the format that sendmail uses
for the Message-Ids that it generates for messages that don't have one,
but doing it the way you're thinking would be a Really Bad Idea, since
it would increase the risk that two messages get the same Message-Id
(you might have multiple servers doing masquerading with the same domain
name). Just think of the Message-Id as an unique but opaque identifier,
the fact that it uses the hostname is just a way to ensure maximum
probability of uniqueness.
--Per Hedeland
p...@bluetail.com