Mailing List Archive

[Bug 3078] DKIM: signing failed: LONG_LINE
https://bugs.exim.org/show_bug.cgi?id=3078

Lena <Lena@lena.kiev.ua> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |Lena@lena.kiev.ua

--- Comment #1 from Lena <Lena@lena.kiev.ua> ---
> In transport_filter I tried to add a command to executing script to fold line, but it doesn't work for me. I get error: unable to execute command
> transport_filter = '${if >{$max_received_linelength}{998}{/path/to/script_line_folding 998}{}}'

transport_filter = '${if >{$max_received_linelength}{998}{/bin/sh -c
/path/to/script_line_folding 998}{}}'

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #2 from David <daw.dudzinski@gmail.com> ---
Unfortunately the same error: unable to execute command. I set of course chmod
+x for this script.

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #3 from Lena <Lena@lena.kiev.ua> ---
What is the very first line of the script?
Does it contain the full path?

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #4 from David <daw.dudzinski@gmail.com> ---
Yes, I have provided the full path to the script. The script was written in
C++. Maybe I could link this script from a certain forum here?

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #5 from Lena <Lena@lena.kiev.ua> ---
file /path/to/script_line_folding
ls -la /path/to/script_line_folding
ls -la /path/

Without obfuscation.

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #6 from David <daw.dudzinski@gmail.com> ---
file /etc/exim/bin/exim_line_folding

/etc/exim/bin/exim_line_folding: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0,
BuildID[sha1]=20715eb3780389f7a83e2722ee97852f73b5ec17, not stripped


ls -la /etc/exim/bin/exim_line_folding
-rwxr-xr-x. 1 root root 23960 Mar 1 10:51 /etc/exim/bin/exim_line_folding


ls -la /etc/exim/

drwxr-xr-x. 1 root root 542 Mar 5 12:47 .
drwxr-xr-x. 1 root root 3670 Feb 29 11:37 ..
drw-rw-r--. 1 root root 34 Mar 5 13:07 bin
drwxr-xr-x. 1 exim exim 46 Oct 20 10:30 certs
drwxr-xr-x. 1 root root 100 Feb 29 09:18 disclaimer
-rw-r--r--. 1 root root 201 Jun 23 2022 domains
-rw-r--r--. 1 root root 11 Mar 19 2021 domains_to_relay
-rw-r--r--. 1 root root 47964 Feb 29 09:23 exim.conf
-rw-r--r--. 1 root root 45322 Feb 6 2020 exim.conf_20200206
-rw-r--r--. 1 root root 50795 Jan 3 19:56 exim.conf.rpmnew
-rw-r--r--. 1 root root 367 Feb 29 11:38 trusted-configs

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #7 from Lena <Lena@lena.kiev.ua> ---
> drw-rw-r--. 1 root root 34 Mar 5 13:07 bin

1. I don't know about Linix, but under FreeBSD "x" world permission on the
directory is required:

~ $ mkdir bi
~ $ cp /bin/echo bi
~ $ LANG=C sh -c 'bi/echo a'
a
~ $ chmod 664 bi
~ $ LANG=C sh -c 'bi/echo a'
sh: bi/echo: Permission denied

2. I think two quotings needed:

transport_filter = '${if >{$max_received_linelength}{998}{/bin/sh -c
"/path/to/script_line_folding 998"}{}}'

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #8 from Jeremy Harris <jgh146exb@wizmail.org> ---
If it was writen in C++ it is presumably compiled and therefore a pure
executable and not a script. The "sh -c" is pointless.

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #9 from David <daw.dudzinski@gmail.com> ---
I've revrited this code into a bash script. The script works correctly when run
on the server:

Input file: Lorem ipsum...


# /etc/exim/bin/folding.sh 40 < example
Lorem ipsu
m dolor si
t amet, co
nsectetur
adipiscing
elit, sed
do eiusmo
d tempor i
ncididunt
ut labore
et dolore
magna aliq
ua. Ut eni
m ad minim
veniam, q
uis nostru
d exercita
tion ullam
co laboris
nisi ut a
[...]


but exim still return error: transport filter process failed (127): unable to
execute command

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #10 from Jeremy Harris <jgh146exb@wizmail.org> ---
Did you fix the permissions issue on the directory?

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #11 from David <daw.dudzinski@gmail.com> ---
Yes, permissions are correctly:


drwxrwxr-x. 1 exim exim 54 Mar 6 13:10 bin

-rwxr-xr-x. 1 exim exim 405 Mar 6 13:10 bin/folding.sh

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #12 from Jeremy Harris <jgh146exb@wizmail.org> ---
Can you get a run with debug enabled? There are other errors that result in
that
log message - setting up the uid, gid & cwd for the subprocess before the
actual exec -
and those give debug output.

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #13 from David <daw.dudzinski@gmail.com> ---
Created attachment 1471
--> https://bugs.exim.org/attachment.cgi?id=1471&action=edit
log_exim.log

I've attached the log file with debug option.

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
[Bug 3078] DKIM: signing failed: LONG_LINE [ In reply to ]
https://bugs.exim.org/show_bug.cgi?id=3078

--- Comment #14 from Jeremy Harris <jgh146exb@wizmail.org> ---
Since you have obfuscated that it is difficult to trust - but it appears to
show
successful delivery of a bounce, having a different message ID from the one it
also shows being accepted by Exim (but not any delivery attempt).

--
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@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/