On Wed, Oct 21, 2009 at 11:04:44AM +0500, rihad wrote: > in the myprog shell script, after it has done its job, how to pass > control to virtual(8)? Something like echo "OK virtual"? You're > talking to a postfix newbie facing too close a deadline, please bear > with me ;-)
You can't. Postfix has a limited set of documented interfaces between Postfix internal processes and external processes. "pipe" is one of them, "virtual" is not. Once postfix hands off the mail to "pipe", it's in your hands. In your case (SMS notifications) however, I would keep things simple and not try to integrate it so tightly into the delivery process, but just fork your incoming mails to two transports: "virtual" for actual delivery (handled by Postfix) and your own transport for the SMS notifications. You can do this with virtual aliases: f...@yourdomain.net f...@yourdomain.net f...@sms.yourdomain.net b...@yourdomain.net b...@yourdomain.net b...@sms.yourdomain.net ... yourdomain.net would be configured as a regular virtual domain, and for sms.yourdomain.net you'd have to setup a separate transport: sms.yourdomain.net smsnotif: Where you define smsnotif in master.cf with "pipe" to a script of your own. Be careful about error handling here, so you don't start bouncing mails to senders when the sms script doesn't work. For something non- essential as SMS notifications, I'd just log and ignore errors, and always return 0. Geert -- Geert Hendrickx -=- g...@telenet.be -=- PGP: 0xC4BB9E9F This e-mail was composed using 100% recycled spam messages!