Re: [exim] Pipe mail to script

Pàgina inicial
Delete this message
Reply to this message
Autor: Jan-Piet Mens
Data:  
A: Mail(at)charliesangels.biz
CC: exim-users, Magnus Holmgren
Assumpte: Re: [exim] Pipe mail to script
On Mon Oct 23 2006 at 14:43:14 CEST, Mail(at)charliesangels.biz wrote:

> My script looks like this (just a plain demo as I am still trying out):
>
> #! /bin/bash
> cat $1 | mail user@domain
>


As was explained before, the message is piped by Exim to your script; the
use of $1 above is therefore ignored. (and the space behind the hash/bang
is probably wrong as well)

Ensure your script doesn't produce any output and that it returns zero to
indicate success. For testing, I'd use

    #!/bin/sh


    cat > /tmp/test.datei


Regards,
    -JP