Question : how to forward email from pipe alias

I am using sendmail on Linux. I have an alias set up to route mail for an address to a bash script. The script will basically be a dynamic alias function that will look up the destination email addresses at runtime and is supposed to forward the message accordingly. I've tested and the script gets the message via stdin, but I'm not quite sure what to do at that point. How do I substitute recipeints? How do I preserve attachments?

Thanks!

Answer : how to forward email from pipe alias

Hi,

Wil lyou tell me what is your final aim? May be we could find better a solution instead for forwarding a mail via a bash script?

Cheers,
K
Random Solutions  
 
programming4us programming4us