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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting envelope sender

Status
Not open for further replies.

gurdi

Programmer
Feb 6, 2006
3
FI
I’m running software which allows users to send E-letters to their customers and define “From” and “Reply-to” on every individual E-letter. The problem is that postfix sets apache@mydomain.com as the Envelope Sender. How can I change this, envelope sender should have the same value as “From” –field? Now users don’t get information of bounced messages so I need to find some kind of a solution. What should I change in the postfix config?
 
I would not change the postfix config, but rather the application. What is your app doing to send mail? Calling the mailx command from a script?
 
Application runs on PHP and uses mail() function to send mails. sendmail_path is set as /usr/sbin/sendmail -t -i

Changing the application is the last option since the company which has made the app refuses to change it. I could do the altering manually (since it is PHP) but then I would have to do the same operation all over again after updating the software (and we have many installations of that app).

 
PHP's mail() function lets you specify additional sendmail parameters (5th argument.) You could solve your problem adding ",-f $WHATEVER_SENDER_ADDRESS_VARIABLE_IS" to the invocation of mail(). Talking your vendor into making this change should not be that hard...

Your only other alternative, that I know of, would involve sender_canonical_maps. I believe this would be a much larger headache than the above.
 
I am familiar with PHP's mail() functions 5th argument and I have already used it some projects. This was the way I used it then:

$5th_param = "-F".$sender." -f".$sender;

I indirectly asked the vendor to consider the possibility of adding an option of using this 5th param to their software. Maybe I'll have to be a little bit more direct since they told me to change my postfix configurations. That's why I am lurking around forums to find some kind of answer... :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top