View previous topic :: View next topic |
Author |
Message |
smiffy Apprentice
Joined: 28 Jun 2006 Posts: 259 Location: SA.AU.AP.EARTH
|
Posted: Sat Jul 29, 2006 11:27 am Post subject: Postfix Return-path manipulation - possible? |
|
|
Hi
I am writing a mail responder (think helpdesk software), with Postfix on my system - mainly as an academic exercise.
Is there any way that I can get the Return-path of messages to be the same as the From: that I specify, rather than nobody@mydomain.com (where nobody is the name of the Postfix process owner)?
I tried putting a Return-path line in my code, but it seems to have been over-written.
Cheers
Smiffy _________________ Matthew Smith |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sat Jul 29, 2006 5:44 pm Post subject: |
|
|
Try setting a correct envelope sender address then Postfix will use that. |
|
Back to top |
|
|
smiffy Apprentice
Joined: 28 Jun 2006 Posts: 259 Location: SA.AU.AP.EARTH
|
Posted: Sat Jul 29, 2006 10:02 pm Post subject: |
|
|
Quote: | Try setting a correct envelope sender address then Postfix will use that. |
Thank you! I was trying to get it to work by embedding everything in the message body; didn't realise that this was set by command line arguments. Now I am on the right track.
For posterity, the (Perl) code to open the mail handle is:
Code: | open (MAIL,"|$sendmail -f $msgfrom $msgto") || die($!); |
...where $sendmail is the path to the Postfix/Sendmail executable, $msgfrom is the address required as Return-path and $msgto is the address of the intended recipient.
The appropriate man page for the Sendmail compatibility flags for Postfix is at http://www.postfix.org/sendmail.1.html. _________________ Matthew Smith |
|
Back to top |
|
|
|