Re: [exim] Pipe mail to script

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mail(at)charliesangels.biz
Fecha:  
A: Jan-Piet Mens
Cc: exim-users, Mailcharliesangels.biz, Magnus Holmgren
Asunto: Re: [exim] Pipe mail to script
Jan-Piet: You are my hero ;)

Thanks, that worked like a charme.

Kind regards
Sascha

> 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

>