changing From in email envelope

changing From in email envelope

am 01.10.2007 15:44:22 von Mtr

Using the mail() function, I can easily change the From address that
appears in an email. But how do I change the From that gets sent in the
SMTP conversation, which results in the address that appears in the
envelope's Return-path: header? That value currently is the
account_name@machine_name, but I don't want to give away my Linux account
name with every single email.

Re: changing From in email envelope

am 01.10.2007 16:16:18 von petersprc

Hi,

Try adding the -f option to sendmail on unix:

mail('to@dest', 'Subject', 'Message',
"From: My Site ", '-finfo@site');

On Oct 1, 8:44 am, Mtr wrote:
> Using the mail() function, I can easily change the From address that
> appears in an email. But how do I change the From that gets sent in the
> SMTP conversation, which results in the address that appears in the
> envelope's Return-path: header? That value currently is the
> account_name@machine_name, but I don't want to give away my Linux account
> name with every single email.

Re: changing From in email envelope

am 01.10.2007 19:36:13 von Mtr

On Mon, 01 Oct 2007 14:16:18 -0000, petersprc wrote:

>Hi,
>
>Try adding the -f option to sendmail on unix:
>
>mail('to@dest', 'Subject', 'Message',
> "From: My Site ", '-finfo@site');

That works just fine, even for Exim. Thank you, Peter.

But still, the first Received: line shows the account name as the
originating host. I've tried the -oMs option, but that fails. (I'll have to
contact the server admin to see about being a "trusted caller".)

However, is there a PHP way to override the HELO/EHLO hostname that calls
Exim (just as there was an Exim way to override what goes into the
envelope's From).?






>
>On Oct 1, 8:44 am, Mtr wrote:
>> Using the mail() function, I can easily change the From address that
>> appears in an email. But how do I change the From that gets sent in the
>> SMTP conversation, which results in the address that appears in the
>> envelope's Return-path: header? That value currently is the
>> account_name@machine_name, but I don't want to give away my Linux account
>> name with every single email.
>

Re: changing From in email envelope

am 02.10.2007 04:57:34 von Jerry Stuckle

Mtr wrote:
> On Mon, 01 Oct 2007 14:16:18 -0000, petersprc wrote:
>
>> Hi,
>>
>> Try adding the -f option to sendmail on unix:
>>
>> mail('to@dest', 'Subject', 'Message',
>> "From: My Site ", '-finfo@site');
>
> That works just fine, even for Exim. Thank you, Peter.
>
> But still, the first Received: line shows the account name as the
> originating host. I've tried the -oMs option, but that fails. (I'll have to
> contact the server admin to see about being a "trusted caller".)
>
> However, is there a PHP way to override the HELO/EHLO hostname that calls
> Exim (just as there was an Exim way to override what goes into the
> envelope's From).?
>

No. And you don't want to. Many MTA's will validate a server is who it
says it is via reverse domain lookup. And they will bounce (or just
delete) any mail from mismatched names.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: changing From in email envelope

am 02.10.2007 06:26:36 von Mtr

On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle
wrote:

>> However, is there a PHP way to override the HELO/EHLO hostname that calls
>> Exim (just as there was an Exim way to override what goes into the
>> envelope's From).?
>>
>
>No. And you don't want to. Many MTA's will validate a server is who it
>says it is via reverse domain lookup.

Hardly true, the name given on HELO is not used much anymore. And it is
called rDNS, not reverse domain lookup.

You might be thinking of how a server will do a lookup on the domain that
is given in the FROM. That is different.

Some MUAs will give the name of any common Windows box in the HELO. We
won't expect a mail agent to lookup those :)

>And they will bounce (or just
>delete) any mail from mismatched names.

Yes, I do. Because I don't want to give away my account name with every
email. Besides, I am calling Exim - I am not connecting via TCP socket, as
is obvious from my post. But thanks anyway.

Re: changing From in email envelope

am 02.10.2007 12:42:07 von Jerry Stuckle

Mtr wrote:
> On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle
> wrote:
>
>>> However, is there a PHP way to override the HELO/EHLO hostname that calls
>>> Exim (just as there was an Exim way to override what goes into the
>>> envelope's From).?
>>>
>> No. And you don't want to. Many MTA's will validate a server is who it
>> says it is via reverse domain lookup.
>
> Hardly true, the name given on HELO is not used much anymore. And it is
> called rDNS, not reverse domain lookup.
>

Actually, quite incorrect. Many sites validate the HELO name - first
for syntax, then do a rdns lookup on it. MTA's on all of the Linux
sites I manage do it, as do many other people I know. You should check
the MTA newsgroups.

Also, it is called both rdns and reverse domain name lookup - and has
been for over 30 years.

> You might be thinking of how a server will do a lookup on the domain that
> is given in the FROM. That is different.
>

No, I'm not thinking of that at all.

> Some MUAs will give the name of any common Windows box in the HELO. We
> won't expect a mail agent to lookup those :)
>

I'm not talking about MUA's.

>> And they will bounce (or just
>> delete) any mail from mismatched names.
>
> Yes, I do. Because I don't want to give away my account name with every
> email. Besides, I am calling Exim - I am not connecting via TCP socket, as
> is obvious from my post. But thanks anyway.

You aren't giving away your account name. Exim is providing your
computer (host) name.

And it doesn't matter if you're calling Exim or not (yes, I use Exim on
all of the Linux systems I manage). This is a configuration parameter
in Exim, not a user-defined parameter. As it should be, according to
the RFC's.

I suggest you follow this up on the Exim mailing list. You'll be told
the same thing - for the same reasons.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: changing From in email envelope

am 02.10.2007 16:36:10 von Mtr

On Tue, 02 Oct 2007 06:42:07 -0400, Jerry Stuckle
wrote:

>Mtr wrote:
>> On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle
>> wrote:
>>
>>>> However, is there a PHP way to override the HELO/EHLO hostname that calls
>>>> Exim (just as there was an Exim way to override what goes into the
>>>> envelope's From).?
>>>>
>>> No. And you don't want to. Many MTA's will validate a server is who it
>>> says it is via reverse domain lookup.
>>
>> Hardly true, the name given on HELO is not used much anymore. And it is
>> called rDNS, not reverse domain lookup.
>>
>
>Actually, quite incorrect. Many sites

that would be a small minority. Else you can post an SMTP conversation from
any well known host that shows email being rejected because of the HELO.
Try privacy-invading google, e.g.

> >for syntax, then do a rdns lookup on it. MTA's on all of the Linux
>sites I manage do it, as do many other people I know. You should check
>the MTA newsgroups.
>
>Also, it is called both rdns and reverse domain name lookup - and has
>been for over 30 years.

I was just pulling your chain.

>
>> You might be thinking of how a server will do a lookup on the domain that
>> is given in the FROM. That is different.
>>
>
>No, I'm not thinking of that at all.
>
>> Some MUAs will give the name of any common Windows box in the HELO. We
>> won't expect a mail agent to lookup those :)
>>
>
>I'm not talking about MUA's.

no, the agent (MTA) doesn't evaluate what the MUA sends

>
>>> And they will bounce (or just
>>> delete) any mail from mismatched names.
>>
>> Yes, I do. Because I don't want to give away my account name with every
>> email. Besides, I am calling Exim - I am not connecting via TCP socket, as
>> is obvious from my post. But thanks anyway.
>
>You aren't giving away your account name.

Do you presume that I don't know what my account name is, and that I don't
see it in the Received: line? This is on shared hosting.

>Exim is providing your
>computer (host) name.
>
>And it doesn't matter if you're calling Exim or not

it does if I'm trying to clue you in that Exim is on the same machine as my
account. Try to pay attention.

>(yes, I use Exim on
>all of the Linux systems I manage). This is a configuration parameter
>in Exim, not a user-defined parameter. As it should be, according to
>the RFC's.
>
>I suggest you follow this up on the Exim mailing list. You'll be told
>the same thing - for the same reasons.

Re: changing From in email envelope

am 02.10.2007 22:06:06 von Jerry Stuckle

Mtr wrote:
> On Tue, 02 Oct 2007 06:42:07 -0400, Jerry Stuckle
> wrote:
>
>> Mtr wrote:
>>> On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle
>>> wrote:
>>>
>>>>> However, is there a PHP way to override the HELO/EHLO hostname that calls
>>>>> Exim (just as there was an Exim way to override what goes into the
>>>>> envelope's From).?
>>>>>
>>>> No. And you don't want to. Many MTA's will validate a server is who it
>>>> says it is via reverse domain lookup.
>>> Hardly true, the name given on HELO is not used much anymore. And it is
>>> called rDNS, not reverse domain lookup.
>>>
>> Actually, quite incorrect. Many sites
>
> that would be a small minority. Else you can post an SMTP conversation from
> any well known host that shows email being rejected because of the HELO.
> Try privacy-invading google, e.g.
>

Actually, it is a great number of sites. It's a first step in stopping
spam.

>> >> for syntax, then do a rdns lookup on it. MTA's on all of the Linux
>> sites I manage do it, as do many other people I know. You should check
>> the MTA newsgroups.
>>
>> Also, it is called both rdns and reverse domain name lookup - and has
>> been for over 30 years.
>
> I was just pulling your chain.
>
>>> You might be thinking of how a server will do a lookup on the domain that
>>> is given in the FROM. That is different.
>>>
>> No, I'm not thinking of that at all.
>>
>>> Some MUAs will give the name of any common Windows box in the HELO. We
>>> won't expect a mail agent to lookup those :)
>>>
>> I'm not talking about MUA's.
>
> no, the agent (MTA) doesn't evaluate what the MUA sends
>

The MUA's (i.e. Outlook, Thunderbird) responsibility is to connect to
your MTA (i.e. sendmail, exim). It doesn't send HELO/EHLO messages;
rather it sends USER and PASS commands (if authentication is required).

The MTA's responsibility is to determine the destination email server
and connect to that server, using a HELO or EHLO command. And in that
command you must have a valid principal host domain name. See RFC 821
and RFC 1869.

MTA's are free to do whatever they wish when an invalid domain name is
sent. Many of them either reject the mail or drop it.

But that's fine. If you don't want your email to go through, it's not
my problem.

>>>> And they will bounce (or just
>>>> delete) any mail from mismatched names.
>>> Yes, I do. Because I don't want to give away my account name with every
>>> email. Besides, I am calling Exim - I am not connecting via TCP socket, as
>>> is obvious from my post. But thanks anyway.
>> You aren't giving away your account name.
>
> Do you presume that I don't know what my account name is, and that I don't
> see it in the Received: line? This is on shared hosting.
>

Is it your account name, or your domain name? If it's your account
name, then your shared hosting is set up wrong.

Why not get yourself a vps or dedicated server. Then you can set it up
the way you want.

>> Exim is providing your
>> computer (host) name.
>>
>> And it doesn't matter if you're calling Exim or not
>
> it does if I'm trying to clue you in that Exim is on the same machine as my
> account. Try to pay attention.
>

No, it makes no difference at all. Whether you're using the executable
interface to Exim or the socket interface is immaterial. Exim is
providing the computer (host) name, not you.

Try to understand plain English.

>> (yes, I use Exim on
>> all of the Linux systems I manage). This is a configuration parameter
>> in Exim, not a user-defined parameter. As it should be, according to
>> the RFC's.
>>
>> I suggest you follow this up on the Exim mailing list. You'll be told
>> the same thing - for the same reasons.
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================