Re: [exim] Hints needed to run forwarded messages through a …

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Erik Schorr
Dátum:  
Címzett: 'exim-users@exim.org'
Tárgy: Re: [exim] Hints needed to run forwarded messages through a pipe
David S. Madole wrote:
>> From Erik Schorr on Tuesday, June 26, 2007 10:51 PM
>>
>> What I'd like to do is send messages with recipients that are
>> "forward users" (as picked up by the sql_aliases router shown
>> below) through a pipe, so the pipe can check and add some
>> headers, and then re-inject into the queue as a new outbound
>> message. Procmail will NOT be used for local deliveries
>> (there should be no local deliveries on this system, as it's
>> only used to forward mail)
>>
>>    command = "forward_prog -f '$header_from' -r 
>> '${local_part}@${domain}' -t '${lookup mysql {SELECT alias 
>> FROM email_virtuser WHERE user='$local_part' AND 
>> domain='$domain' AND is_alias='Y' AND active='Y'}{$value}}'"

>
> I don't really know the direct answer to your question, but what does forward_prog actually do? You might be able to do the same thing within Exim without calling an external program. Exim can add, remove, and change headers. If it's just rewriting addresses, it can do that too, very easily.


David: Rewriting headers is one part of it. What I explained above
is actually slightly simplified. We have a cluster of about 10
mailservers, hosting mail for approximately 12,000 domains. Some
get delivered locally, some get forwarded to new addresses, some get
relayed as-is. We're adding options now to selectively change the sender
address (envelope FROM address) based on per-customer and per-forward-
domain rulesets, for messages that traverse our mailservers only to be
forwarded to a third party.

For example, for any messages coming into a user's
account who's forwarding the message to Yahoo, AND where the sending
address is a Yahoo address, we want to copy the original Envelope FROM
address into the new "Reply-to", "Bounces-to", and From headers, and
use the forwarding (local) account's email address as the new Envelope
FROM address, while leaving the From header in the email intact. This
is just one case, and something that I initially want to do in an
external program. It will certainly eventually made into a router or
transport that includes sql lookups to accomplish the same thing, but
for development and testing of forwarding deliverability under the
different circumstances, I want to do this in an external program.