hostname is being appended to the From name

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

hostname is being appended to the From name

lists
I'm trying to understand why this is happening and how to prevent it. I
have a relay where if an email is sent to it with just a name in the
Header From, then the server's hostname is added to the end of it. For
example,  if I telnet to the server and send an email with "From:Test",
then I'll get an email from Test@hostname.

Reply | Threaded
Open this post in threaded view
|

Re: hostname is being appended to the From name

Ralph Seichter
* lists:

> I'm trying to understand why this is happening and how to prevent
> it. I have a relay where if an email is sent to it with just a name in
> the Header From, then the server's hostname is added to the end of it.

See http://www.postfix.org/postconf.5.html#append_at_myorigin

-Ralph
Reply | Threaded
Open this post in threaded view
|

Re: hostname is being appended to the From name

Wietse Venema
In reply to this post by lists
[hidden email]:
> I'm trying to understand why this is happening and how to prevent it. I
> have a relay where if an email is sent to it with just a name in the
> Header From, then the server's hostname is added to the end of it. For
> example,  if I telnet to the server and send an email with "From:Test",
> then I'll get an email from Test@hostname.

See http://www.postfix.org/postconf.5.html#myorigin

myorigin (default: $myhostname)
    The domain name that locally-posted mail appears to come from,
    and that locally posted mail is delivered to. The default,
    $myhostname, is adequate for small sites. If you run a domain
    with multiple machines, you should (1) change this to $mydomain
    and (2) set up a domain-wide alias database that aliases each
    user to [hidden email].

Postfix does not support domain-less addresses.

            Wietse
Reply | Threaded
Open this post in threaded view
|

Re: hostname is being appended to the From name

lists
Thank you. This should only happen for email from "mynetworks", right?


On 2018-11-20 3:34 pm, Wietse Venema wrote:

> [hidden email]:
>> I'm trying to understand why this is happening and how to prevent it.
>> I
>> have a relay where if an email is sent to it with just a name in the
>> Header From, then the server's hostname is added to the end of it. For
>> example,  if I telnet to the server and send an email with
>> "From:Test",
>> then I'll get an email from Test@hostname.
>
> See http://www.postfix.org/postconf.5.html#myorigin
>
> myorigin (default: $myhostname)
>     The domain name that locally-posted mail appears to come from,
>     and that locally posted mail is delivered to. The default,
>     $myhostname, is adequate for small sites. If you run a domain
>     with multiple machines, you should (1) change this to $mydomain
>     and (2) set up a domain-wide alias database that aliases each
>     user to [hidden email].
>
> Postfix does not support domain-less addresses.
>
>    Wietse
Reply | Threaded
Open this post in threaded view
|

Re: hostname is being appended to the From name

Wietse Venema
[hidden email]:

> On 2018-11-20 3:34 pm, Wietse Venema wrote:
> > [hidden email]:
> >> I'm trying to understand why this is happening and how to prevent it.
> >> I
> >> have a relay where if an email is sent to it with just a name in the
> >> Header From, then the server's hostname is added to the end of it. For
> >> example,  if I telnet to the server and send an email with
> >> "From:Test",
> >> then I'll get an email from Test@hostname.
> >
> > See http://www.postfix.org/postconf.5.html#myorigin
> >
> > myorigin (default: $myhostname)
> >     The domain name that locally-posted mail appears to come from,
> >     and that locally posted mail is delivered to. The default,
> >     $myhostname, is adequate for small sites. If you run a domain
> >     with multiple machines, you should (1) change this to $mydomain
> >     and (2) set up a domain-wide alias database that aliases each
> >     user to [hidden email].
> >
> > Postfix does not support domain-less addresses.
> >
> >    Wietse
>
> Thank you. This should only happen for email from "mynetworks", right?

You may want to look up:

    http://www.postfix.org/postconf.5.html#local_header_rewrite_clients

That covers the appearance of mail headers.

        Wietse