[exim] Help with "Return-Path" modification for Exim 4.41

Top Page
Delete this message
Reply to this message
Author: George Bica
Date:  
To: exim-users
Subject: [exim] Help with "Return-Path" modification for Exim 4.41
Hello all!

My company is using Exim SMTP service to send out emails, a lot of them. We send emails using a Perl script which looks like this, and calls local Sendmail (EXIM):

$mail_prog = '/usr/lib/sendmail';
...
open (MAIL, "|$mail_prog -oi -t");
...
print MAIL qq|Return-Path: <$agent_email>\n|;         
print MAIL qq|Sender: <$FROM_OUR_EMAIL_ID>\n|;        
print MAIL qq|From: $agent_name <$agent_email>\n|;
print MAIL qq|To: $customer_email\n|;
print MAIL qq|Reply-To: $agent_name - $agent_firm <$agent_email>\n|;
...


as you can see I am trying to modify the "Return-Path" to have <> or $agent_email instead of $FROM_OUR_EMAIL_ID which is exim@???. I want to do this to send the bounced emails to the agents not us. Most of the time they input their customer emails wrong in our database, i.e: userY@??? instead of userX@???

Unfortunately the headers ignore the "Return-Path: <$agent_email>" and instead insert Return-Path: exim@???>

A little explanation:

We are a service provider.
Agents are our paying customers
Customers are people that need service from the agents. They receive emails from us branded as if sent by the agents.


I have used these links as my reference to customize my exim4.conf:

http://www.fedoraforum.org/forum/archive/index.php/t-23670.html
http://www.exim.org/pipermail/exim-users/Week-of-Mon-20000410/017535.html
http://www.exim.org/pipermail/exim-users/Week-of-Mon-19970324/001571.html
http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20030526/msg00073.html
http://bob.rasey.net/archives/000187.html

but have not had any luck. Below are pieces of my configuration file. Any help is greatly appreciated:


primary_hostname = domain.com
no_local_from_check
untrusted_set_sender = *
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 30s

# trusted_users = exim:root **** I have commented this line as it interfered with "untrusted_set_sender = *"