LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-24-2008, 06:44 AM   #1
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Rep: Reputation: 30
Postfix change return-path and writing own script for master.cf


Hi,

I've two questions.

Q1) Changing return-path to from-address in postfix
I have dovecot installed on my server with IMAP. With fetchmail I download all my POP3. So I mail through my IMAP server with different "From"-address.

In outlook I type the from-address of one of the domains I own.

But the receiver gets a mail with my "main" address in the "Return-Path". Is there a way to make the Return-Path become the same as From address?


Q2) How can I write my own script that I can put in master.cf?
And how can I decide that my script only should be used for outgoing mail (or only incoming mail...)

Greetz,
Ali
 
Old 07-25-2008, 01:36 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
1) There is nothing wrong with a Return-Path being different than the From address - it is common, in fact. What problem are you trying to solve? Also, see:

http://groups.google.com/group/list....1937898d37bfaf

2) What do you mean "your own script"? Your own script for doing what? Again, what are you trying to solve?
 
Old 07-25-2008, 01:53 AM   #3
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
Sorry for my poor questions and explaing the problems I'm having.

1) I login on my IMAP. There I have multiple dirs with emails of different domains of mine. I like this way too have all my mails under one account.
The problem is (with Outlook), when I send a email with my IMAP I can fill a domain in the 'From'-field in Outlook. Outlook doesn't have a problem with that, BUT when you add a account, you have too tell Outlook for what mail this account is supposed. Atm I filled in alitrix@alitrix.nl

Outlook adds MAIL FROM: alitrix@alitrix.nl to the email and postfix translate this too Return-Path. But the From-field is, let say, alitrix@myotheralitrixdomain.nl.
When somebody else opens the email, he sees:
alitrix@myotheralitrixdomain.nl behalf of alitrix@alitrix.nl

I don't want that. It's less professional and a bit annoying. PLUS some clients try too reply with the Return-Path, instead of the From-address.

Hopefully this explains my problem.

2) I want to write my own script and "link" it with postfix through pipe.
I'm a programmer, so I'd like to learn what the best is to do that. I've have some ideas of a email-ticket system, which I'm planning too build.

Greetz,

Ali

Last edited by alitrix; 07-25-2008 at 01:57 AM.
 
Old 07-25-2008, 02:05 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
1) http://www.postfix.org/ADDRESS_REWRITING_README.html
http://tech.groups.yahoo.com/group/p...message/213963

2) http://www.postfix.org/pipe.8.html

Last edited by Mr. C.; 07-25-2008 at 02:12 AM.
 
Old 07-25-2008, 02:30 AM   #5
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
1) I can't find anything about the Return-Path.
And make rewrite rule for every mail address would be a lot of work

Btw, is it possible too make a script and put it in master.cf that makes the return-path the same as the from address?

2) I've checked the PIPE manual already, not that I've understand everything of it, but I don't give it. I will look for examples too understand the system.
 
Old 07-25-2008, 08:37 AM   #6
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Maybe one of these will help you.
 
Old 07-25-2008, 08:39 AM   #7
alitrix
Member
 
Registered: Jun 2003
Location: Netherlands, The
Distribution: Ubuntu, Kernel 2.6.7
Posts: 169

Original Poster
Rep: Reputation: 30
I've checked that already.
As far as I could find outlook doesn't have the option too disable it.

I'm going to fix it with a script atm. When a mail is send, I first check if the From-address is one of my domains.
Incase it is and the From-address != Return-Path, replace Return-Path and continue mailing it.
 
Old 07-25-2008, 12:49 PM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
The Return-Path is set from the envelope sender. The client sets the envelope sender.

The Return-Path is added by Postfix's cleanup agent just before final delivery. It will not look at the From header and make the envelope sender and hence Return-Path the same. Unless you plan on rewriting cleanup, that's the way it is.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure postfix to reject mails having invalid return path badboynick21 Linux - Server 17 09-14-2010 12:28 PM
SLES 10 - Postfix mailer config - Return Path overwritten HuffmanT Linux - Enterprise 1 05-26-2008 10:12 PM
Sendmail re-writing return path hammer65 Linux - Software 1 02-01-2007 10:59 AM
Postfix: why is 'Return-Path' of bounce message empty Chowroc Linux - Networking 1 12-28-2005 03:52 AM
php mail script return path richard22 Linux - Software 1 08-22-2003 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration