Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail setting sender header 1

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
I've switched from a windows box to a linux box... I'm down to my last 2 steps to finish the switchover.

I'm currently sending mail.

Woohoo, it works... both my functions which use the mail() function and the ones which use phpmailer

Buuuut.... it's sending the Sender: header, which my windows box didn't, so all my mail is coming through as

apacheUser@newbox on behalf of skiflyer [skiflyer@example.com]

Whereas it used to just come through as
skiflyer [skiflyer@example.com]

These are as interpreted by outlook... using a more simple program like mail in linux, I see that the from header is set as I like, but there's this extra Sender header.

Anyone know how to turn this off, or am I off base and need to do something with my MTA?
 
exim4 (default MTA installed with Debian)

I'm looking at my auto config script now and I get this screen
Your "mail name" is the hostname portion of the address to be shown on outgoing news and mail messages (following the username and @ sign) unless hidden with rewriting.

This name will also be used by other programs; it should be the single, full domain name (FQDN) from which mail will appear to originate.

This name won't appear on From: lines of outgoing mails if you enable rewriting.

So I'm thinking maybe that's it... altho, the name i have here is not exactly what's showing up (it is jsut the newbox portion in my first message), and it's also not showing up in the from field, but the sender field.
 
Looks like I found the answer in a FAQ, now to find how to do what they say...

Q0056: We are using Exim to send mail from our web server. However, whenever a user sends an email it gets sent with the return path (envelope sender) apache@server_name.com because the PHP script is running as apache.

A0056: You need to include apache in the trusted_users configuration option. Only trusted users are permitted to specify senders when mail is passed to Exim via the command line.
 
There should be a trusted_users entry in your exim configuration file. That line should read (at least in part):

trusted_users = <user as which Apache runs>


I'm not that hip to exim, so I don't know what that configuration file's name is. You might try a "man exim" on your system to start tracking it down.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
It's apparently

/etc/exim/update-exim4.conf.conf

where you set it.

Not going so smoothly for me at the moment however. But I'll track it down, at least now I know what I'm looking for.

Thanks.
 
Of course, exactly how you set that header is a good question, too.

Again, I'm not that familiar with exim, as I mostly use postfix. But I do know that there are multiple ways of specifying the sender, from setting an environment variable (qmail) to using the additional parameters of PHP's mail() function (sendmail, postfix).

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Yeah, it's a drop in replacement for sendmail, so it's the -f parameter I'm interested in.

Right now, before the end of my week, the goal is to get it working command line style (it works as root, but not as my appache user, so obviouslly it's this trusted users business)... and I'll worry abou the PHP details on monday.
 
Finally... in case someone else stumbles on this issue... the key is that even though all the documentation tells you to modify

update-exim4.conf

you have to actually modify

exim4.conf.template (yeah I know, who modifies a template file to make an actual change...)

This is for the single file configuration method anyway... it actually would be more straightforward I imagine with the multiple file method.

Thanks for helping me work through it sleipnir.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top