Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2014-03-04 Thread Scot Hetzel
On Tue, Mar 4, 2014 at 12:19 PM, Michael Grimm
 wrote:
> Hi --
>
> On 04.03.2014, at 14:04, Scot Hetzel  wrote:
>> On Mon, Mar 3, 2014 at 10:39 AM, Michael Grimm  
>> wrote:
>
>>> amavisd-new requires sysutils/file which throws an error
>
> [...]
>
>> I checked the Magdir/windows file and the bug is still there.  You
>> will need to apply the patch that is in PR 183257 to get rid of the
>> error.
>>
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=183257
>>
>> Could someone commit this patch to the sysutils/file port.
>
> Oh, I see. I was just curious whether I might have missed something obvious.
>
> Regarding amavisd-new there is a workaround, I am using /usr/bin/file for the 
> time beeing.
>
Looks like the file utility programmers fixed it another way by
patching src/softmagic.c to use the C locale when calling regcomp.

See http://bugs.gw.com/view.php?id=292

They had fixed the issue on 2/18/2014, so you will have to wait for
file > 5.17 to be released.

Of apply the patch in that bug report.

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2014-03-04 Thread Michael Grimm
Hi --

On 04.03.2014, at 14:04, Scot Hetzel  wrote:
> On Mon, Mar 3, 2014 at 10:39 AM, Michael Grimm  
> wrote:

>> amavisd-new requires sysutils/file which throws an error

[...]

> I checked the Magdir/windows file and the bug is still there.  You
> will need to apply the patch that is in PR 183257 to get rid of the
> error.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=183257
> 
> Could someone commit this patch to the sysutils/file port.

Oh, I see. I was just curious whether I might have missed something obvious.

Regarding amavisd-new there is a workaround, I am using /usr/bin/file for the 
time beeing.

Thanks for looking into that and with kind regards,
Michael

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2014-03-04 Thread Scot Hetzel
On Mon, Mar 3, 2014 at 10:39 AM, Michael Grimm
 wrote:
> Hi --
>
> I'd like to come back on an issue reported last October (see thread ending in 
> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/087175.html).
>
> amavisd-new requires sysutils/file which throws an error like ...
>
> | test> /usr/local/bin/file ascii.txt
> | ascii.txt: ERROR: line 163: regex error 17, (illegal byte sequence)
>
> ... whereas the system file utility acts as expected:
>
> | test> /usr/bin/file ascii.txt
> | ascii.txt: ASCII text
>
> I did notice it for the first time with file-5.15. Today I did upgrade to 
> file-5.17, and I do still see that error.
>
> According the message obove (see link) that bug should have been fixed 
> already, correct or am I mistaken?
>
I checked the Magdir/windows file and the bug is still there.  You
will need to apply the patch that is in PR 183257 to get rid of the
error.

http://www.freebsd.org/cgi/query-pr.cgi?pr=183257

Could someone commit this patch to the sysutils/file port.

Thanks,

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2014-03-03 Thread Michael Grimm
Hi --

I'd like to come back on an issue reported last October (see thread ending in 
http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/087175.html).

amavisd-new requires sysutils/file which throws an error like ...

| test> /usr/local/bin/file ascii.txt
| ascii.txt: ERROR: line 163: regex error 17, (illegal byte sequence)

... whereas the system file utility acts as expected:

| test> /usr/bin/file ascii.txt
| ascii.txt: ASCII text

I did notice it for the first time with file-5.15. Today I did upgrade to 
file-5.17, and I do still see that error.

According the message obove (see link) that bug should have been fixed already, 
correct or am I mistaken?

Thanks and with kind regards,
Michael
 
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2013-10-23 Thread Scot Hetzel
On Wed, Oct 23, 2013 at 1:25 PM, Michael Grimm
 wrote:
> Hi --
>
> On 23.10.2013, at 20:03, Mark Martinec  wrote:
>
>> The text "ERROR: line 163: regex error 17, (illegal byte sequence)"
>> comes from the file utility, unmodified.
>>
>>> 1) Is the file utility to blame?
>>
>> Yes.
>>
>>> 2) My setup?
>>
>> Possibly (e.g. broken magic database).
>>
>> Looks like a known bug in the file utility, already fixed upstream:
>>
>>  http://bugs.gw.com/my_view_page.php
>>(search for: illegal byte sequence)
>>
>> Should be reproducible by running the file(1) from a command line
>> (in the same/similar environment as amavisd is running, just in case).
>
> Confirmed, it's throwing the same error message[1]:
>
> | mail> /usr/local/bin/file zzz
> | zzz: ERROR: line 163: regex error 17, (illegal byte sequence)
>
> Thank you for helping me understand that issue. Now, I will wait for
> a corrected file port.
>
> With kind regards,

To cause the error to occur do the following:

cd /usr/ports/sysutils/file
make install
cd /usr/ports/sysutils/file/work/file-5.15/magic/Magdir
LC_ALL=en_US.UTF-8 /usr/local/bin/file -d -m windows
/usr/ports/sysutils/file/Makefile

I tested all the magic files in the directory using:

sh
(for i in `ls` ; do echo " $i " ; LC_ALL=en_US.UTF-8
/usr/local/bin/file -d -m $i /usr/ports/sysutils/file/Makefile ; done)
2>&1 > ../fine.test

The only one that failed was the 'windows' magic file.  Which is bug 292

http://bugs.gw.com/view.php?id=292

I was able to resolve the bug in PR 183257.

http://www.freebsd.org/cgi/query-pr.cgi?pr=183257

Could someone check that the regex is correct an commit it to the port
and submit it upstream.

Thanks,

Scot
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2013-10-23 Thread Michael Grimm
Hi --

On 23.10.2013, at 20:03, Mark Martinec  wrote:

> The text "ERROR: line 163: regex error 17, (illegal byte sequence)"
> comes from the file utility, unmodified.
> 
>> 1) Is the file utility to blame?
> 
> Yes.
> 
>> 2) My setup?
> 
> Possibly (e.g. broken magic database).
> 
> Looks like a known bug in the file utility, already fixed upstream:
> 
>  http://bugs.gw.com/my_view_page.php
>(search for: illegal byte sequence)
> 
> Should be reproducible by running the file(1) from a command line
> (in the same/similar environment as amavisd is running, just in case).

Confirmed, it's throwing the same error message[1]:

| mail> /usr/local/bin/file zzz
| zzz: ERROR: line 163: regex error 17, (illegal byte sequence)

Thank you for helping me understand that issue. Now, I will wait for
a corrected file port.

With kind regards,
Michael


[1] Sorry, I should have tested it this way already.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2013-10-23 Thread Mark Martinec
Michael,

> | (50329-01) run_command: [3984] /usr/local/bin/file p001 &1
> | (50329-01) result line from file(1): p001:
> |   ERROR: line 163: regex error 17, (illegal byte sequence)\n
> | (50329-01) (!)file utility failed: exit 1

The text "ERROR: line 163: regex error 17, (illegal byte sequence)"
comes from the file utility, unmodified.

> 1) Is the file utility to blame?

Yes.

> 2) My setup?

Possibly (e.g. broken magic database).


Looks like a known bug in the file utility, already fixed upstream:

  http://bugs.gw.com/my_view_page.php
(search for: illegal byte sequence)

Should be reproducible by running the file(1) from a command line
(in the same/similar environment as amavisd is running, just in case).

  Mark
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2013-10-23 Thread Mark Martinec
Michael,

> | (50329-01) run_command: [3984] /usr/local/bin/file p001 &1
> | (50329-01) result line from file(1): p001:
> |   ERROR: line 163: regex error 17, (illegal byte sequence)\n
> | (50329-01) (!)file utility failed: exit 1

The text "ERROR: line 163: regex error 17, (illegal byte sequence)"
comes from the file utility, unmodified.

> 1) Is the file utility to blame?

Yes.

> 2) My setup?

Possibly (e.g. broken magic database).


Looks like a known bug in the file utility, already fixed upstream:

  http://bugs.gw.com/my_view_page.php
(search for: illegal byte sequence)

Should be reproducible by running the file(1) from a command line
(in the same/similar environment as amavisd is running, just in case).

  Mark
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2013-10-23 Thread Michael Grimm
Hi Marc --

On 23.10.2013, at 16:49, Mark Martinec  wrote:

>> amavis[12345]: (12345-02) (!)file utility failed: exit 1
>> 
>> 1. Do others see those warning messages as well, running the combination
>> amavisd-new 2.8.0 and file 5.15? 2. Can one safely ignore those messages?
> 
> If it occurs on a rare occasion, it is probably safe to ignore,
> otherwise it would be worth investigating.

It is happening on every single mail passing amavisd. 

> Other option is to enable debug logging (e.g. '# amavisd debug'),
> and grep for 'result line from file' in the log.

Here is the log file's excerpt for a plain ASCII mail message with 1000 'x' 
in the body, sent to an echo mailer:

| (50329-01) Issued a new file name: p001
| (50329-01) Charging 1000 bytes to remaining quota 792500 (out of 792500, 
(0%)) - by mime_decode
| (50329-01) p001 1 Content-Type: text/plain, size: 1000 B, name: 
| (50329-01) get_deadline mime_decode - deadline in 270.0 s, set to 189.000 s
| (50329-01) prolong_timer mime_decode: timer 189, was 189, deadline in 270.0 s
| (50329-01) get_deadline mime_decode-1 - deadline in 270.0 s, set to 189.000 s
| (50329-01) prolong_timer mime_decode-1: timer 189, was 189, deadline in 270.0 
s
| (50329-01) inspect_dsn: parts: text/plain
| (50329-01) inspect_dsn: not a bounce
| (50329-01) get_deadline dsn_parse - deadline in 270.0 s, set to 189.000 s
| (50329-01) prolong_timer dsn_parse: timer 189, was 189, deadline in 270.0 s
| (50329-01) decode_parts: level=1, #parts=1 : p001
| (50329-01) running file(1) on 1 files, arglist size 24
| (50329-01) run_command: [3984] /usr/local/bin/file p001 &1
| (50329-01) result line from file(1): p001: ERROR: line 163: regex error 17, 
(illegal byte sequence)\n
| (50329-01) lookup_re("ERROR: line 163: regex error 17, (illegal byte 
sequence)") matches key "(?^:^ERROR:)", result="dat"
| (50329-01) lookup [map_full_type_to_short_type] => true,  "ERROR: line 163: 
regex error 17, (illegal byte sequence)" matches, result="dat", 
matching_key="(?^:^ERROR:)"
| (50329-01) File-type of p001: ERROR: line 163: regex error 17, (illegal byte 
sequence); (dat)
| (50329-01) (!)file utility failed: exit 1

Well, I have to admit: The interpretation of those lines are far beyond my 
scope ...

Questions:

1) Is the file utility to blame?
2) My setup?
3) What else might I do to investigate this issue?

>> 3. May "$file = '/usr/bin/file';" in amavisd.conf function as a valid
>> workaround for the time being? (I have to admit that I didn't dare testing
>> that, yet)
> 
> Yes, that is certainy a viable option.

After activating that option, and testing with "amavisd debug" as outlined
above, I'll get:

| (71656-01) Issued a new file name: p001
| (71656-01) Charging 1000 bytes to remaining quota 792500 (out of 792500, 
(0%)) - by mime_decode
| (71656-01) p001 1 Content-Type: text/plain, size: 1000 B, name: 
| (71656-01) get_deadline mime_decode - deadline in 270.0 s, set to 189.000 s
| (71656-01) prolong_timer mime_decode: timer 189, was 189, deadline in 270.0 s
| (71656-01) get_deadline mime_decode-1 - deadline in 270.0 s, set to 189.000 s
| (71656-01) prolong_timer mime_decode-1: timer 189, was 189, deadline in 270.0 
s
| (71656-01) inspect_dsn: parts: text/plain
| (71656-01) inspect_dsn: not a bounce
| (71656-01) get_deadline dsn_parse - deadline in 270.0 s, set to 189.000 s
| (71656-01) prolong_timer dsn_parse: timer 189, was 189, deadline in 270.0 s
| (71656-01) decode_parts: level=1, #parts=1 : p001
| (71656-01) running file(1) on 1 files, arglist size 18
| (71656-01) run_command: [71668] /usr/bin/file p001 &1
| (71656-01) result line from file(1): p001: ASCII text\n

JYFI and with kind regards,
Michael 


___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: amavis[12345]: (12345-02) (!)file utility failed: exit 1

2013-10-23 Thread Mark Martinec
Michael,

> amavis[12345]: (12345-02) (!)file utility failed: exit 1
> This is FreeBSD (9.2-STABLE, r256062), amavisd-new 2.8.0, and file 5.15.
> Mailserver including amavisd is running in a service jail.
> 
> After a recent port upgrade of file to 5.15, I do get warnings like shown
> in the subject line. In order to debug that issue I did replace the file
> 5.15 by the file 5.11 executable, and well, now those warning messages
> disappeared.
> 
> Here my questions:
> 
> 1. Do others see those warning messages as well, running the combination
> amavisd-new 2.8.0 and file 5.15? 2. Can one safely ignore those messages?

If it occurs on a rare occasion, it is probably safe to ignore,
otherwise it would be worth investigating. Find a mail message
which causes such warning, unpack its attachments, and try
to run the 'file' command on resulting files in the same jail
and by the same UID under which amavisd is running, checking
the resulting exit code.

Other option is to enable debug logging (e.g. '# amavisd debug'),
and grep for 'result line from file' in the log.

> 3. May "$file = '/usr/bin/file';" in amavisd.conf function as a valid
> workaround for the time being? (I have to admit that I didn't dare testing
> that, yet)

Yes, that is certainy a viable option.

  Mark
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"