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
[email protected]
when what I want is
[email protected]
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 [email protected]
If I send it from the command line with, say, mail -s "blaaaa" address < file, or
senmail user <file it goes off as [email protected]
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
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
Quoted 59 lines · on 3/20/03 6:55 AM, Andrew Kelly at [email protected] 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
[email protected]
when what I want is
[email protected]I'm flying RH 7.2 and Sendmail 8.12.5 (patched) on this particular box, by the way.
Sendmail -d0.1 -bt <
/dev/nullgives 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 [email protected]
If I send it from the command line with, say, mail -s "blaaaa" address < file, or
senmail user <file it goes off as [email protected]In my sendmail.cf
host.domain.name is listed nowhere,
only, domain.nameI'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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Jon Fullmer
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
Quoted 11 lines
Quoted 3 lines · Jon Fullmer
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
Quoted 29 lines · Adam T. Bowen
Quoted 11 lines
Quoted 3 lines · Jon Fullmer
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 7 lines
Andrew Kelly IT Transparency International Otto-Suhr-Allee 97/99 10585 Berlin, Germany Tel: +4930 3438 2026, Fax: +4930 3470 3912 [email protected]
Oops, sorry about that. I'm sick, you know...
Quoted 4 lines · Adam T. Bowen
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
Quoted 2 lines
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.
Quoted 1 line
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
Quoted 6 lines · Andrew Kelly
Quoted 2 lines
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.
Quoted 8 lines
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 [email protected] will get converted to [email protected], 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.
Signature · 1 line
Glynn Clements <[email protected]>
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.
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
Quoted 28 lines · on 3/20/03 7:16 AM, Andrew Kelly at [email protected] wrote:
Quoted 3 lines · Jon Fullmer
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html