haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 661 forks source link

Modifying of transaction.header value is not working #1595

Closed ajay-psd closed 8 years ago

ajay-psd commented 8 years ago

Haraka version1.2

Hi
In Haraka how can we reset the email headers value. such as header "Return-Path" By default it is taking as From: Header.

I have tried modifing in my custom plugin txn = connection.transaction; txn.remove_header('Return-Path'); txn.add_header('Return-Path', 'bounces+1334878-91d1-ajaypsd=gmail.com@gmail.com');

It seems worked, verified using txn.header.get('Return-Path') in same plugin, it showed updated value.
But when I checked headers of delivered email from inbox, it shows as default Return-Path same as from mail.

I am assuming connection object scope is limited to plugin only. It did not modified the original header. or do I need call particular hook to modify original header.

Can any one suggest how can we reset Return-Path header in haraka. It will be really helpful!

baudehlo commented 8 years ago

See my reply to your other issue.