On Apr 17, 2012, at 06:00, Punit Jain wrote:

> This will send the email to u...@sms.example.com. But my requirement is to 
> send copy of email to SMS program which itself does some processing and finds 
> the recipient and send the sms accordingly.

Read Noel's reply again, specifically the part where he talks about using a 
transport_maps entry to route it to your pipe transport. This pipe transport is 
the SMS program, or whatever intermediate script or daemon is used to call it 
or relay to it.

Also, a lot of people here prefer it if you do not top-post. Reply below the 
original :-)

Cya,
Jona

--

> ----- Original Message -----
> From: "Noel Jones" <njo...@megan.vbhcs.org>
> To: postfix-users@postfix.org
> Sent: Monday, April 16, 2012 11:28:17 PM
> Subject: Re: multiple copies to different destinations
> 
> On 4/16/2012 12:46 PM, Punit Jain wrote:
>> Hi ,
>> 
>> I have a requirement where I need to send a copy of mail to pipe daemon for 
>> some processing, based on if recipient has an attribute set in ldap.
>> 
>> At the same time mail is also delivered to recipient. The pipe daemon can 
>> pass the mail to SMS fateway for sms to be delivered.
>> 
>> Any clues how to achieve in postfix ? 
>> 
>> I searched forums but didnot find any solution to how to achieve this maybe 
>> by ldap table lookups or using pipe daemon.
>> 
>> Regards,
>> Punit
>> 
>> 
> 
> To send multiple copies, you need multiple recipients.
> 
> Use a virtual_alias_maps (NOT virtual_alias_domains) lookup such
> that looking up the original recipient returns the original + an SMS
> recipient if the flag is set.
> 
> lookup key: u...@example.com
> 
> result:  u...@example.com  u...@sms.example.com
> 
> 
> Then use a transport_maps entry to route the sms message to your
> pipe transport.
> 
> #transport_maps entry:
> sms.example.com  sms-pipe:dummy
> 
> 
> 
> 
>  -- Noel Jones

Reply via email to