bascule said:
>
> i am trying to get postfix to rewrite one of the headers that appears in
> all  the emails i send, in every email i send incl. this one there is:
> Received: from mycroft.excession (localhost.localdomain [127.0.0.1])
>         by host.domain.tld (Postfix)
>
> as one of the first headers, mycroft.excession is the host machine name
> but  obviously doesn't resolve outside my local network
>
> i've tried editing /etc/postfix/main.cf to include:
> canonical_maps = hash:/etc/postfix/canonical
>
> and edited canonical to read:
> #lots of commented text
> @mycroft.excession @test.cxm

mycroft.excession is not generally considered a valid hostname, that I
know of. :-)  Neither is host.domain.tld.  That one is set by postfix
internally.  In main.cf, there's a note:

# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld


Did you comment that out, by any chance?  If not, then your hostname is
set wrong, since gethostname() is returning that value.  You can either
set your host name properly, or add a "myhostname =" line with the
hostname you want to show as that part of the Received: line.  The
"mycroft.excession" part (again, that's not considered correct for outside
use - any connections outside your LAN) is what your machine is sending on
its HELO greeting.  Yea, it's greeting itself, but that's how it works.
:-)  But again, you really need to use something other than that for your
hostname.  A lot of sites out there require a valid hostname on the HELO
greeting or they just say "bye" and close the connection (mine is one
that's configured that way).

The Received: line is showing what the HELO greeting was, what interface
was connected to (in this case, localhost, which will return exactly what
you're seeing there), and then "by" the host name it knows itself as,
either from gethostname() or a "myhostname =" setting (again, you need to
correct that).  If your ethernet card has another IP address on it besides
the loopback address 127.0.0.1 (I'm betting it does :), you *could* tell
kmail to connect to that (I.E. 192.168.1.1 or whatever your address is),
and *that* address will show up instead of the 127.0.0.1.  I'm afraid
there's not much you can do about that, other than giving your 192.168 (or
10. or whatever) address for the ethernet card a name in /etc/hosts, and
then telling kmail to connect to that.  Feel free to contact me off line
if you want further clarification.

Take a look at the headers of *this* message; hopefully it will help
illustrate.  Ignore the bottom-most Received: line, that's stamped by
Squirrelmail (I'm remotely accessing my mail from elsewhere using
Squirrelmail), and it provides that stamp.  The one directly above that
(rhpsfan.org) is what shows up.  Squirrelmail is configured to use
localhost port 25 for it's outgoing SMTP connection.  Since I connected to
localhost, the stamp shows localhost.localdomain 127.0.0.1 as the
interface address, with rhpsfan.org in front of it since I've got postfix
configured to just use my domain and not the FQDN on its HELO greeting. 
Had I configured Squirrelmail to connect to 192.168.0.102 (which is my
address for my Linux machine behind the router), then that address and
host name would have shown up there.  Then there's a "by" part of the line
which shows what my machine is from gethostbyname()(janet.rhpsfan.org).

Hopefully, that was a little bit clearer than mud. :-)  Again, if you want
more clarification on what I'm trying to explain, feel free to contact me
off list if you'd like.

            --Dave




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to