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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Andrew C Aitchison
Datum:  
To: Exim Bugzilla
CC: exim-dev
Betreff: [exim-dev] Re: [Bug 3037] Broken pipe in transport filter
On Tue, 10 Oct 2023, Exim Bugzilla via Exim-dev wrote:

> https://bugs.exim.org/show_bug.cgi?id=3037
>
> --- Comment #2 from Zakaria <hi@???> ---
> Hi Jeremy,
>
> Thanks for getting back to me.
>
> --Please don't tell me
> --it hacks on Exim's spool file; this is not a public interface for Exim
> --and you should not do that. A transport filter should operate
> stdin=to-stdout
> --as a stream processor.
>
> I'm afraid to tell you, with all due trying my bestest to abide by the rules
> and reading this notice https://github.com/Exim/exim/wiki/Q1601, this is just
> what I'm doing. Since it's only my personal email server and testing on some
> features but if there is any official mail server which requires some legal
> notices and warning, please rest assured I'm going to address it all lawfully.
>
> Yet, I couldn't access message body nor headers from bash script? and I had to
> fetch it from spool files while I don't edit spool files at all but I found
> calling echo with concatenated headers and body does the job, as transport
> filter, takes this and replace it with existing one.


Ah, so you script is asking echo to print the whole of the spool files ?
That mean that the argument(s) to echo will be exceeding ARG_MAX.

If you can freeze a large message in the mail queue and then from the command line
run
     /usr/exim/modifyemail.sh message-id
(with the correct message-id, not those letters) I believe you will see the same error.


> I read the documentation, here
> https://www.exim.org/exim-html-current/doc/html/spec_html/ch-generic_options_for_transports.html,
> it claimed message body and headers it's present somewhere in the stdin but
> couldn't figure out which argument? would it be passed to modifyemail bash
> script and under which name?


The message header and body can be read from /dev/stdin, or in bash with
the 'read' command amongst other ways.
They are not available sseperately.

-- 
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/