[exim-dev] Re: [Bug 3037] Broken pipe in transport filter

Pàgina inicial
Delete this message
Reply to this message
Autor: Andrew C Aitchison
Data:  
A: Exim Bugzilla
CC: exim-dev
Assumpte: [exim-dev] Re: [Bug 3037] Broken pipe in transport filter
On Thu, 12 Oct 2023, Exim Bugzilla via Exim-dev wrote:

> https://bugs.exim.org/show_bug.cgi?id=3037
>
> --- Comment #4 from Zakaria <hi@???> ---
> Oh, more points, I think they could be helpful for anyone else who wants to
> find resolve to this issue.
>
> As Jeremy suggested, running cat in transport filter like the following:-
>
> transport_filter = /bin/bash -c '/bin/cat'
>
> renders no point for me of using transport filter since it doesn't modify nor
> offer me any ability to filter anything, and yet it works fine and the broken
> pipe issue doesn't happen but if I run it from inside bash script with certain
> or identical email content, it throws broken pipe error.
>
> Lastly, it seems EXIM takes limited segment from the cat or echo content or
> it's not just the first call to cat if it was outputted from bash script since
> I tested calling cat only once for concatenated content, and anyways ends with
> throwing broken pipe? other ways to mitigate this?
>
> Also, in case anyone wants to review my bash script, this is it's content, and
> not sure if I can run it from inside EXIM configuration file directly given I
> use several commands and all are being executed when ran from bash as I tested
> if it reaches exit 0.


Can we see /usr/prependpng.sh too please ?

> #!/bin/sh
>
> msgid=$1
> bpath=$(/usr/bin/find /var/spool/exim/input -name "*$msgid*-D")
> hpath=$(/usr/bin/find /var/spool/exim/input -name "*$msgid*-H")
> result=$(/usr/prependpng.sh "$bpath" "$hpath")
> if [[ $result != "isntchunked" ]]; then
> END=$result
> for ((i=1;i<=END;i++)); do
> cat "${bpath}-modified${i}"
> cat "${bpath}-modified${i}" >> /etc/exim/prependtest
> rm -f "${bpath}-modified${i}"
> done
> else
> cat ${bpath}-modified
> #cat "${bpath}-modified" > /etc/exim/prependtest
> rm -f "${bpath}-modified"
> fi
> exit 0
>
>
> Looking forward, with thanks.
>
> Zakaria.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
> --
> ## subscription configuration (requires account):
> ## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
> ## unsubscribe (doesn't require an account):
> ## exim-dev-unsubscribe@???
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>


-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew@???


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/