* Here's an easy one
@ 2003-03-20 13:55 Andrew Kelly
2003-03-20 14:06 ` Jon Fullmer
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Kelly @ 2003-03-20 13:55 UTC (permalink / raw)
To: Linux Admin
..or at least I assume it is and I just can't thinks straight
with this head cold.
Hi all; quick hostname question:
When mail is sent to a local user (mail -s "bla" user < file)
it's passed to the MTA as user@localhost. The same is passed
as the From address when the vacation program is run by user.
So where does the localhost expansion take place?
My problem here is that I'm getting
user@host.domain.name
when what I want is
user@domain.name
I'm flying RH 7.2 and Sendmail 8.12.5 (patched) on this
particular box, by the way.
Sendmail -d0.1 -bt </dev/null gives me these responses
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = host
(canonical domain name) $j = host.domain.name
(subdomain name) $m = domain.name
(node name) $k = host
========================================================
which I keep reading as exactly what I want.
When I send mail from an application, be it Pine from a
console or Netscape from a GUI, everything is as I'd hope.
My mail goes off as me@domain.name
If I send it from the command line with, say,
mail -s "blaaaa" address < file, or
senmail user <file it goes off as
me@host.domain.name
In my sendmail.cf
host.domain.name is listed nowhere,
only, domain.name
I'm choking on this one and I know I shouldn't be. It's
like wondering why $var = 1 is not doing what it should
and 2 days of debugging hasn't helped and it only takes
a fresh pair of eyes 5 seconds to see that you really
meant $var == 1
...making me crazy.
Can anybody hold my hand?
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Here's an easy one
@ 2003-03-20 14:04 Tim Gildersleeve
0 siblings, 0 replies; 11+ messages in thread
From: Tim Gildersleeve @ 2003-03-20 14:04 UTC (permalink / raw)
To: 'Andrew Kelly', Linux Admin
If you are using Sendmail, then this can be sorted out using the
masquerading options. You can tell the sendmail server to masquerade
certain domains (or hosts) as a different one. For example,
Host1.domain.com
Host2.domain.com
Can both be masqueraded as domain.com.
I cant remember the options you need to use in the /etc/mail/sendmail.cf
file, but if you have webmin installed then you can set it from there - its
much easier.
-----Original Message-----
From: Andrew Kelly [mailto:akelly@transparency.org]
Sent: 20 March 2003 13:55
To: Linux Admin
Subject: Here's an easy one
..or at least I assume it is and I just can't thinks straight
with this head cold.
Hi all; quick hostname question:
When mail is sent to a local user (mail -s "bla" user < file)
it's passed to the MTA as user@localhost. The same is passed
as the From address when the vacation program is run by user.
So where does the localhost expansion take place?
My problem here is that I'm getting
user@host.domain.name
when what I want is
user@domain.name
I'm flying RH 7.2 and Sendmail 8.12.5 (patched) on this
particular box, by the way.
Sendmail -d0.1 -bt </dev/null gives me these responses
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = host
(canonical domain name) $j = host.domain.name
(subdomain name) $m = domain.name
(node name) $k = host
========================================================
which I keep reading as exactly what I want.
When I send mail from an application, be it Pine from a
console or Netscape from a GUI, everything is as I'd hope.
My mail goes off as me@domain.name
If I send it from the command line with, say,
mail -s "blaaaa" address < file, or
senmail user <file it goes off as
me@host.domain.name
In my sendmail.cf
host.domain.name is listed nowhere,
only, domain.name
I'm choking on this one and I know I shouldn't be. It's
like wondering why $var = 1 is not doing what it should
and 2 days of debugging hasn't helped and it only takes
a fresh pair of eyes 5 seconds to see that you really
meant $var == 1
...making me crazy.
Can anybody hold my hand?
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 13:55 Here's an easy one Andrew Kelly
@ 2003-03-20 14:06 ` Jon Fullmer
2003-03-20 14:16 ` Andrew Kelly
0 siblings, 1 reply; 11+ messages in thread
From: Jon Fullmer @ 2003-03-20 14:06 UTC (permalink / raw)
To: Andrew Kelly, Linux Admin
It sounds to me like you would want to masquerade your domain in your
sendmail configuration. If you add these lines to your mc file:
MASQUERADE_AS(domain.name)dnl
FEATURE(`masquerade_envelope')dnl
And build a new sendmail.cf file, that should do it. The thing to remember
here then is that ALL e-mail being sent by sendmail on this host will send
mail as "@domain.name". That sounds like what you want, though.
Hope this helps.
- Jon
on 3/20/03 6:55 AM, Andrew Kelly at akelly@transparency.org wrote:
>
> ..or at least I assume it is and I just can't thinks straight
> with this head cold.
>
> Hi all; quick hostname question:
>
> When mail is sent to a local user (mail -s "bla" user < file)
> it's passed to the MTA as user@localhost. The same is passed
> as the From address when the vacation program is run by user.
>
> So where does the localhost expansion take place?
>
> My problem here is that I'm getting
> user@host.domain.name
> when what I want is
> user@domain.name
>
> I'm flying RH 7.2 and Sendmail 8.12.5 (patched) on this
> particular box, by the way.
>
> Sendmail -d0.1 -bt </dev/null gives me these responses
> ============ SYSTEM IDENTITY (after readcf) ============
> (short domain name) $w = host
> (canonical domain name) $j = host.domain.name
> (subdomain name) $m = domain.name
> (node name) $k = host
> ========================================================
>
> which I keep reading as exactly what I want.
>
> When I send mail from an application, be it Pine from a
> console or Netscape from a GUI, everything is as I'd hope.
> My mail goes off as me@domain.name
> If I send it from the command line with, say,
> mail -s "blaaaa" address < file, or
> senmail user <file it goes off as
> me@host.domain.name
>
> In my sendmail.cf
> host.domain.name is listed nowhere,
> only, domain.name
>
> I'm choking on this one and I know I shouldn't be. It's
> like wondering why $var = 1 is not doing what it should
> and 2 days of debugging hasn't helped and it only takes
> a fresh pair of eyes 5 seconds to see that you really
> meant $var == 1
>
> ...making me crazy.
>
>
> Can anybody hold my hand?
>
> Andrew
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:06 ` Jon Fullmer
@ 2003-03-20 14:16 ` Andrew Kelly
2003-03-20 14:51 ` Adam T. Bowen
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Andrew Kelly @ 2003-03-20 14:16 UTC (permalink / raw)
To: Linux Admin
Jon Fullmer wrote:
>
> It sounds to me like you would want to masquerade your domain in your
> sendmail configuration. If you add these lines to your mc file:
My thanks to you and to Tim Gildersleeve who answered much
as you did. I appreciate your help, both of you.
Unfortunately, I forgot to mention that I also already have
masquerading in place and it seems to be working fine, at
least as long as I use an application to send mail.
That's what's got me so baffled. Everything I'm looking at tells
me I've configured what's supposed to be configured and
it even functions. Until I start sending from a bit closer
to the command line.
I could really just let it all slide but for the mail
being sent from the vacation program.
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:16 ` Andrew Kelly
@ 2003-03-20 14:51 ` Adam T. Bowen
2003-03-20 14:59 ` Andrew Kelly
2003-03-20 15:04 ` Andrew Kelly
2003-03-20 20:55 ` Glynn Clements
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Adam T. Bowen @ 2003-03-20 14:51 UTC (permalink / raw)
To: Andrew Kelly; +Cc: Linux Admin
> Jon Fullmer wrote:
> >
> > It sounds to me like you would want to masquerade your domain in your
> > sendmail configuration. If you add these lines to your mc file:
>
> My thanks to you and to Tim Gildersleeve who answered much
> as you did. I appreciate your help, both of you.
>
> Unfortunately, I forgot to mention that I also already have
> masquerading in place and it seems to be working fine, at
[snip]
Are you sending the test mails from the mail server or from a nullclient
style machine? If not from the server, what is the configuration of
sendmail on this machine? Does it use a 'smart host'? Does it handle
local mail differently?
Could you post the full headers of a correctly and incorrectly masqueraded
email?
Cheers
Adam Bowen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:51 ` Adam T. Bowen
@ 2003-03-20 14:59 ` Andrew Kelly
2003-03-20 15:04 ` Andrew Kelly
1 sibling, 0 replies; 11+ messages in thread
From: Andrew Kelly @ 2003-03-20 14:59 UTC (permalink / raw)
To: Linux Admin
"Adam T. Bowen" wrote:
>
> > Jon Fullmer wrote:
> > >
> > > It sounds to me like you would want to masquerade your domain in your
> > > sendmail configuration. If you add these lines to your mc file:
> >
> > My thanks to you and to Tim Gildersleeve who answered much
> > as you did. I appreciate your help, both of you.
> >
> > Unfortunately, I forgot to mention that I also already have
> > masquerading in place and it seems to be working fine, at
> [snip]
>
> Are you sending the test mails from the mail server or from a nullclient
> style machine? If not from the server, what is the configuration of
> sendmail on this machine? Does it use a 'smart host'? Does it handle
> local mail differently?
>
> Could you post the full headers of a correctly and incorrectly masqueraded
> email?
>
> Cheers
>
> Adam Bowen
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Andrew Kelly
IT
Transparency International
Otto-Suhr-Allee 97/99
10585 Berlin, Germany
Tel: +4930 3438 2026, Fax: +4930 3470 3912
AKelly@transparency.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:51 ` Adam T. Bowen
2003-03-20 14:59 ` Andrew Kelly
@ 2003-03-20 15:04 ` Andrew Kelly
2003-03-20 15:51 ` Adam T. Bowen
1 sibling, 1 reply; 11+ messages in thread
From: Andrew Kelly @ 2003-03-20 15:04 UTC (permalink / raw)
To: Linux Admin
Oops, sorry about that. I'm sick, you know...
"Adam T. Bowen" wrote:
> Are you sending the test mails from the mail server or from a nullclient
> style machine? If not from the server, what is the configuration of
> sendmail on this machine? Does it use a 'smart host'? Does it handle
> local mail differently?
I'm sending from the server itself, and at the moment I'm
starting to wonder if it's a my hosts file getting in the
way.
I even tried to fix things with a domaintable but it's
not playing.
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 15:04 ` Andrew Kelly
@ 2003-03-20 15:51 ` Adam T. Bowen
0 siblings, 0 replies; 11+ messages in thread
From: Adam T. Bowen @ 2003-03-20 15:51 UTC (permalink / raw)
To: Andrew Kelly; +Cc: Linux Admin
> I'm sending from the server itself,
Are you using the MUAs on the server too? Those headers would really
help. If you don't want to send them to the list (faffing around masking
ips and hostnames) you can send them direct.
> it's a my hosts file getting in the way.
Tee-hee. That reminds me of a song :
What's a matta you, hey!
Gotta no respect, hey!
What do you think you do, hey!
Why you look-a so sad, hey!
It's a my hosts file, hey!
Getting in the way!
Ah, shaddap you face
Remember? Joe Dolce? Er ... right then ... neither do I, honest. Must
have been a seizure or something.
Adam
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:16 ` Andrew Kelly
2003-03-20 14:51 ` Adam T. Bowen
@ 2003-03-20 20:55 ` Glynn Clements
2003-03-20 21:41 ` davidgn
2003-03-21 3:33 ` Jon Fullmer
3 siblings, 0 replies; 11+ messages in thread
From: Glynn Clements @ 2003-03-20 20:55 UTC (permalink / raw)
To: Andrew Kelly; +Cc: Linux Admin
Andrew Kelly wrote:
> > It sounds to me like you would want to masquerade your domain in your
> > sendmail configuration. If you add these lines to your mc file:
>
> My thanks to you and to Tim Gildersleeve who answered much
> as you did. I appreciate your help, both of you.
>
> Unfortunately, I forgot to mention that I also already have
> masquerading in place and it seems to be working fine, at
> least as long as I use an application to send mail.
>
> That's what's got me so baffled. Everything I'm looking at tells
> me I've configured what's supposed to be configured and
> it even functions. Until I start sending from a bit closer
> to the command line.
Masquerading only converts specific domains, so user@host.domain.name
will get converted to user@domain.name, but user@localhost won't.
Try using:
MASQUERADE_DOMAIN(`localhost')
However, the real issue is: why is mailx (or whatever) creating names
of the form user@localhost? Is the box using "localhost" as its
hostname (what does the "hostname" command say)? It shouldn't be.
--
Glynn Clements <glynn.clements@virgin.net>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:16 ` Andrew Kelly
2003-03-20 14:51 ` Adam T. Bowen
2003-03-20 20:55 ` Glynn Clements
@ 2003-03-20 21:41 ` davidgn
2003-03-21 3:33 ` Jon Fullmer
3 siblings, 0 replies; 11+ messages in thread
From: davidgn @ 2003-03-20 21:41 UTC (permalink / raw)
To: Andrew Kelly; +Cc: Linux Admin
Then try a little closer to sendmail. Do a telnet to sendmail's port, read
SMTP's rfc, as i dont know it by heart, and that may show whats going on.
just my two coins.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Here's an easy one
2003-03-20 14:16 ` Andrew Kelly
` (2 preceding siblings ...)
2003-03-20 21:41 ` davidgn
@ 2003-03-21 3:33 ` Jon Fullmer
3 siblings, 0 replies; 11+ messages in thread
From: Jon Fullmer @ 2003-03-21 3:33 UTC (permalink / raw)
To: Andrew Kelly, Linux Admin
The command line really shouldn't make any difference. I've got
masquerading configured on a couple of servers and I can manually send
e-mails using either the "mail" command or even the "sendmail" command, and
it successfully masquerades them.
I can offer you this, though. Are you sending these command line messages
as "root"? If so, there is a default setting on most sendmail
configurations to masquerade every host and every user EXCEPT root. I
haven't figured out where to add this to the sendmail.mc file, but I can
tell you what to do with the sendmail.cf file. It's a line that typically
reads:
C{E}root
This line tells sendmail to masquerade everything except mail sent from the
root user. You can simply comment this line out:
#C{E}root
You might also check to see if you have any "EXPOSED_USER" settings in your
sendmail.cf file. This function defines specific users that should NOT be
masqueraded.
Hope that helps.
- Jon
on 3/20/03 7:16 AM, Andrew Kelly at akelly@transparency.org wrote:
>
>
> Jon Fullmer wrote:
>>
>> It sounds to me like you would want to masquerade your domain in your
>> sendmail configuration. If you add these lines to your mc file:
>
> My thanks to you and to Tim Gildersleeve who answered much
> as you did. I appreciate your help, both of you.
>
> Unfortunately, I forgot to mention that I also already have
> masquerading in place and it seems to be working fine, at
> least as long as I use an application to send mail.
>
> That's what's got me so baffled. Everything I'm looking at tells
> me I've configured what's supposed to be configured and
> it even functions. Until I start sending from a bit closer
> to the command line.
>
> I could really just let it all slide but for the mail
> being sent from the vacation program.
>
> Andrew
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-03-21 3:33 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-20 13:55 Here's an easy one Andrew Kelly
2003-03-20 14:06 ` Jon Fullmer
2003-03-20 14:16 ` Andrew Kelly
2003-03-20 14:51 ` Adam T. Bowen
2003-03-20 14:59 ` Andrew Kelly
2003-03-20 15:04 ` Andrew Kelly
2003-03-20 15:51 ` Adam T. Bowen
2003-03-20 20:55 ` Glynn Clements
2003-03-20 21:41 ` davidgn
2003-03-21 3:33 ` Jon Fullmer
-- strict thread matches above, loose matches on Subject: below --
2003-03-20 14:04 Tim Gildersleeve
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).