Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix Return-path manipulation - possible?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
smiffy
Apprentice
Apprentice


Joined: 28 Jun 2006
Posts: 259
Location: SA.AU.AP.EARTH

PostPosted: Sat Jul 29, 2006 11:27 am    Post subject: Postfix Return-path manipulation - possible? Reply with quote

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
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Jul 29, 2006 5:44 pm    Post subject: Reply with quote

Try setting a correct envelope sender address then Postfix will use that.
Back to top
View user's profile Send private message
smiffy
Apprentice
Apprentice


Joined: 28 Jun 2006
Posts: 259
Location: SA.AU.AP.EARTH

PostPosted: Sat Jul 29, 2006 10:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum