#!/usr/bin/perl -wT =head1 NAME removereturnreceiptto =head1 DESCRIPTION Plugin that remove "Return-receipt-to" header =head1 AUTHOR Daniel Berteaud =head1 LICENSE GNU GPL (GNU General Public License) =cut sub register { my ($self, $qp, %arg) = @_; $self->register_hook("data_post", "remove_return_receipt_to"); } sub remove_return_receipt_to { my ($self, $transaction) = @_; my $return = $self->get_return_addr($transaction) or return DECLINED; $self->log(LOGDEBUG, "Removing Return-Receipt-To: $return"); $transaction->header->delete('Return-receipt-to'); return DECLINED; } sub get_return_addr { my ($self, $transaction) = @_; my $addr = $transaction->header->get('Return-receipt-to') or return; return $addr; }