473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

changing From in email envelope

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.
Oct 1 '07 #1
7 3923
Hi,

Try adding the -f option to sendmail on unix:

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

On Oct 1, 8:44 am, Mtr <M...@no.spamwrote:
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.

Oct 1 '07 #2
Mtr
On Mon, 01 Oct 2007 14:16:18 -0000, petersprc <pe*******@gmail.comwrote:
>Hi,

Try adding the -f option to sendmail on unix:

mail('to@dest', 'Subject', 'Message',
"From: My Site <info@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 <M...@no.spamwrote:
>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.
Oct 1 '07 #3
Mtr wrote:
On Mon, 01 Oct 2007 14:16:18 -0000, petersprc <pe*******@gmail.comwrote:
>Hi,

Try adding the -f option to sendmail on unix:

mail('to@dest', 'Subject', 'Message',
"From: My Site <info@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.
js*******@attglobal.net
==================
Oct 2 '07 #4
Mtr
On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle <js*******@attglobal.net>
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.
Oct 2 '07 #5
Mtr wrote:
On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle <js*******@attglobal.net>
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.
js*******@attglobal.net
==================
Oct 2 '07 #6
Mtr
On Tue, 02 Oct 2007 06:42:07 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:
>Mtr wrote:
>On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle <js*******@attglobal.net>
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.
><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.
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.
Oct 2 '07 #7
Mtr wrote:
On Tue, 02 Oct 2007 06:42:07 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:
>Mtr wrote:
>>On Mon, 01 Oct 2007 22:57:34 -0400, Jerry Stuckle <js*******@attglobal.net>
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.
><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.

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.
js*******@attglobal.net
==================
Oct 2 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen Chell | last post by:
I'm using SAAJ 1.2 (from jwsdp-1.3) and JDK 1.4.2_03. I've written a client application that uses the SAAJ api to send a SOAP message to a servlet. The servlet successfully receives the message...
3
by: mark.greenbank | last post by:
Hi, I'm writing a small script that generates email and I've noticed that: 1) one should add the 'To' and 'CC' headers to the email message 2) one needs to specify the recipients in the...
0
by: Markus Stehle | last post by:
Hi all! I need to create an soap envelope that will be sent to an external service using HTTP POST. I created the required classes which are serialized using XmlSerializer. The envelope should...
3
by: Munish | last post by:
hi there, I am a student and developing a new application using C#. I need advice on developing a control which flashs out emails to users as per settings during setup stage; I mean when they...
2
by: lprisr | last post by:
Hi, I have double byte characters in the content that I am returning using Web Services. However, the encoding in the xml file returned by Web Services is utf-8 and I am unable to read the...
2
by: groups2 | last post by:
This is a simplified example of an html email, including the header. It seems to render fine in most situations but for some people it is just code. (it seems to be happening with bellsouth...
2
by: Slippy | last post by:
Hi, python newbie, struggling to learn here. I'm trying to write a simple program which posts messages to my google group (via email). I'm using smtplib, email and email.message to build and send a...
0
by: Patrick Brunmayr | last post by:
Hello I have a big Problem with validating a Soap Envelope. I have downloaded the xsd for a soap envelope from http://schemas.xmlsoap.org/soap/envelope/ The validation succeeds as lonng as i...
0
by: broersen | last post by:
Hello, Does someone know how to create manually the header for an SOAP message, without having an WSDL? I also use an X509 certificate for connecting to the webservice. Can anyone help me to get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.