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. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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) |
|
|||
|
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 |
|
|||
|
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) |
|
|||
|
> 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 |
|
|||
|
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) |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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) |