--On 6 April 2009 13:09:05 +0200 Søren Dam <[email protected]> wrote:
> Im a newbie to exim and i have this urgent problem > We have som comstumers that insist to send mail to your symstem as bcc. We > have a backend system that wil have to use the To: header to process the > mail. They send to alle kinds of aderesses and we,ve set up a catch-all > e-mail to handle that. I need to take the adress from the recieved header > and rewrite: > > from: > ".. > > Return-path: [email protected] > Received: from [****] (helo=domain.com) > by localhost.localdomain > with esmtp (Exim 4.63) (envelope-from <[email protected]>) > id 1LqmYP-0006bg-E6 for [email protected]; > Mon, 06 Apr 2009 12:59:49 +0200 > Received: from [***] (unknown [***]) > by sender.com (Postfix) with ESMTP id D795816A95C > *for <[email protected]>*; Mon, 6 Apr 2009 12:59:49 +0200 (CEST) > Message-ID: <[email protected]> > Date: Mon, 06 Apr 2009 12:59:49 +0200 > From: kasper <[email protected]> > User-Agent: Thunderbird 1.5.0.12 (X11/20090114) > *To: undisclosed-recipients:;* > Subject: (no subject) > MIME-Version: 1.0 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: 7bit > > > .." > to > ".. > > Return-path: [email protected] > Received: from [****] (helo=domain.com) > by localhost.localdomain > with esmtp (Exim 4.63) (envelope-from <[email protected]>) > id 1LqmYP-0006bg-E6 for [email protected]; > Mon, 06 Apr 2009 12:59:49 +0200 > Received: from [***] (unknown [***]) > by sender.com (Postfix) with ESMTP id D795816A95C > *for <[email protected]>*; Mon, 6 Apr 2009 12:59:49 +0200 (CEST) > Message-ID: <[email protected]> > Date: Mon, 06 Apr 2009 12:59:49 +0200 > From: kasper <[email protected]> > User-Agent: Thunderbird 1.5.0.12 (X11/20090114) > *To: [email protected]* > Subject: (no subject) > MIME-Version: 1.0 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: 7bit > > > .." > > I've tried to mess around with adress rewriting and got it to work, but i > don't know how to strip the email form the recieved field. Exim can acquire the recipient email address from $local_part and $domain. So you'd need to use headers_remove and headers_add in your transport - and make sure that you're only delivering one message at a time. However, you may wish to take care to preserve the original content of the headers that you're modifying - depending on what you're doing at the back end. I presume that you mean "acquire the email from the received field" rather than "strip" (= remove). Strictly, $local_part and $domain aren't acquired from the received header, rather the received header is built using those variables (I think). > > thanks in advance > > Søren -- Ian Eiloart IT Services, University of Sussex 01273-873148 x3148 For new support requests, see http://www.sussex.ac.uk/its/help/ -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
