Bluehost.com Web Hosting $6.95

Modifying the username part of the Return-Path: header

This is a discussion on Modifying the username part of the Return-Path: header within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; I am using postfix as MTA on my machine, but using my ISP's relayhost for all out-going mail. ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-22-2005
Colin Brough
 
Posts: n/a
Default Modifying the username part of the Return-Path: header

I am using postfix as MTA on my machine, but using my ISP's relayhost
for all out-going mail. My local username is AAA, but my ISP username
is BBBBB...

In main.cf I've got:

mydomain = blueyonder.co.uk
myorigin = $mydomain

So the Return-Path: header ends up as:

Return-Path: AAA@blueyonder.co.uk

I've got a sender_canonical map with the following line:

AAA@localhost BBBBB@blueyonder.co.uk

This works fine for the 'From' header, but I get 'AAA' in the
generated Return-Path: when I really should have 'BBBBB'. Any ideas on
how I can achieve that?

postfix is version 2.1.4 as shipped with Mandrake 10.1 Official.

Cheers

Colin

--

----------------------------------------------------------------------
Colin Brough Colin.Brough@blueyonder.invalid
(Replace .invalid with .co.uk to reply)
Reply With Quote
  #2 (permalink)  
Old 02-23-2005
Nils Gehrig
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

Colin.Brough@blueyonder.invalid (Colin Brough) wrote in <puhse2-ahe.ln1@brough.bd>:

>
>
> AAA@localhost BBBBB@blueyonder.co.uk
>
>This works fine for the 'From' header, but I get 'AAA' in the
>generated Return-Path: when I really should have 'BBBBB'. Any ideas on
>how I can achieve that?
>Colin
>


Hi,

I didn't use canonical_map but virtual instead. There I have per user following entry

ISPmail.address@ISP.com localmai.addressl@local.net

Regards,
Nils
Reply With Quote
  #3 (permalink)  
Old 02-23-2005
Colin Brough
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

On Wed, 23 Feb 2005 18:26:20 +0100, Nils Gehrig wrote:
> Colin.Brough@blueyonder.invalid (Colin Brough) wrote in <puhse2-ahe.ln1@brough.bd>:
>>
>> AAA@localhost BBBBB@blueyonder.co.uk
>>
>>This works fine for the 'From' header, but I get 'AAA' in the
>>generated Return-Path: when I really should have 'BBBBB'. Any ideas on
>>how I can achieve that?
>>Colin
>>

>
> Hi,
>
> I didn't use canonical_map but virtual instead. There I have per
> user following entry
>
> ISPmail.address@ISP.com localmai.addressl@local.net


Nils

Thanks for the suggestion, but I've still ended up with
'AAA@blueyonder.co.uk' as the generated Return-Path:

Cheers

Colin

--

----------------------------------------------------------------------
Colin Brough Colin.Brough@blueyonder.invalid
(Replace .invalid with .co.uk to reply)
Reply With Quote
  #4 (permalink)  
Old 02-24-2005
Jan G
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

> generated Return-Path: when I really should have 'BBBBB'. Any ideas on
> how I can achieve that?


i´m not quite sure, but i think the return-path is not generated by
postfix, it comes from the mail client you use...try to change the
settings there.

regards
jan
Reply With Quote
  #5 (permalink)  
Old 02-24-2005
Colin Brough
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

On Thu, 24 Feb 2005 10:41:43 +0100, Jan G wrote:
>> generated Return-Path: when I really should have 'BBBBB'. Any ideas on
>> how I can achieve that?

>
> i´m not quite sure, but i think the return-path is not generated by
> postfix, it comes from the mail client you use...try to change the
> settings there.


It is definitely being generated by postfix.

If I don't set one in the mailer, postfix sets it. If I modify the
'myorigin' setting in 'main.cf' the generated Return-Path: changes in
line with the modifications made. I used to have a Return-Path: that
looked like: 'AAA@CCCCCCCCC.blueyonder.co.uk', where CCCCCCCCC is my
local hostname, not exposed to the wider net at all!! Then I changed
main.cf to include:

mydomain = blueyonder.co.uk
myorigin = $mydomain

and now the Return-Path: is AAA@blueyonder.co.uk. I still want it to
be BBBBB@blueyonder.co.uk...

For my MUA, I'm using mutt, and I think the way I can generate extra
headers is:

my_hdr X-Operating-System: `uname;gen_savehooks`
my_hdr Return-Path: Colin.Brough@blueyonder.co.uk

The first one works fine, the second one makes not the blindest bit of
difference!!

I've just spotted that the 'pipe' delivery agent has the option of
setting the Return-Path, but to the envelope sender address - I think
this is the problem - at whatever point the Return-Path is being added
the envelope sender is AAA, the username on the localhost...

Cheers

Colin

--

----------------------------------------------------------------------
Colin Brough Colin.Brough@blueyonder.invalid
(Replace .invalid with .co.uk to reply)
Reply With Quote
  #6 (permalink)  
Old 02-24-2005
Jan G
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

there is a posting in the german suse maillinglist:
http://lists.suse.com/archive/suse-l...-Jun/0773.html

it says you should set the "set envelope_from=yes"
i don´t know if this works but you could give it a try

jan
Reply With Quote
  #7 (permalink)  
Old 02-24-2005
Nils Gehrig
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

Colin.Brough@blueyonder.invalid (Colin Brough) wrote in
<b29ve2-cpj.ln1@brough.bd>:

>On Wed, 23 Feb 2005 18:26:20 +0100, Nils Gehrig wrote:
>> Colin.Brough@blueyonder.invalid (Colin Brough) wrote in
>> <puhse2-ahe.ln1@brough.bd>:
>>>
>>> AAA@localhost BBBBB@blueyonder.co.uk
>>>
>>>This works fine for the 'From' header, but I get 'AAA' in the
>>>generated Return-Path: when I really should have 'BBBBB'. Any ideas on
>>>how I can achieve that?
>>>Colin
>>>

>>
>> Hi,
>>
>> I didn't use canonical_map but virtual instead. There I have per
>> user following entry
>>
>> ISPmail.address@ISP.com localmai.addressl@local.net

>
>Nils
>
>Thanks for the suggestion, but I've still ended up with
>'AAA@blueyonder.co.uk' as the generated Return-Path:
>
>Cheers
>
>Colin
>


Hi Colin

I have mydomain = local.net and myorigin=$mydomain

and use

virtual_alias_maps = hash:/etc/postfix/virtual the way I explained in the last MSG.
That way I always have the ISP's address as return path.
You did restart postfix?
In mut there is
my_hdr From: Nils <mail.address@ISP.com>

Cheers,
Nils
Reply With Quote
  #8 (permalink)  
Old 02-24-2005
Colin Brough
 
Posts: n/a
Default Re: Modifying the username part of the Return-Path: header

Finally sorted - inject mail using 'sendmail -f BBBBB@blueyonder.co.uk',
so in mutt change the 'sendmail' setting in .muttrc - see also mutt's
envelope_from setting.

Cheers

Colin

--

----------------------------------------------------------------------
Colin Brough Colin.Brough@blueyonder.invalid
(Replace .invalid with .co.uk to reply)
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0