Page MenuHomeDevCentral

Add PECL extension mailparse to Phabricator Docker image
Open, LowPublic

Description

According https://secure.phabricator.com/book/phabricator/article/configuring_inbound_email/ there is a need for the mailparse PECL extension to use local MTA.

We currently don't ship it with our image, as we optimized if to use Mailgun.

Event Timeline

dereckson updated the task description. (Show Details)
dereckson added a project: Docker images.
dereckson added a project: good-first-issue.

good-first-issue — This task has been identified as suitable for newcomers to become familiar with our code base.

dereckson moved this task from Backlog to Dev on the good-first-issue board.

Tried to deploy on DevCentral - it's now an old container still using PHP 7.4.

The build fails:

1running: make
2/bin/bash /tmp/pear/temp/pear-build-defaultuser0SK30P/mailparse-3.1.9/libtool --mode=compile cc -I. -I/tmp/pear/temp/mailparse -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuser0SK30P/mailparse-3.1.9/include -I/tmp/pear/temp/pear-build-defaultuser0SK30P/mailparse-3.1.9/main -I/tmp/pear/temp/mailparse -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/mailparse/mailparse.c -o mailparse.lo
3mkdir .libs
4 cc -I. -I/tmp/pear/temp/mailparse -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuser0SK30P/mailparse-3.1.9/include -I/tmp/pear/temp/pear-build-defaultuser0SK30P/mailparse-3.1.9/main -I/tmp/pear/temp/mailparse -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/mailparse/mailparse.c -fPIC -DPIC -o .libs/mailparse.o
5/tmp/pear/temp/mailparse/mailparse.c: In function 'zif_mailparse_stream_encode':
6/tmp/pear/temp/mailparse/mailparse.c:1016:33: error: incompatible type for argument 1 of 'mbfl_convert_filter_new'
7 1016 | conv = mbfl_convert_filter_new(mbfl_no2encoding(mbfl_no_encoding_8bit),
8 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 | |
10 | const mbfl_encoding * {aka const struct _mbfl_encoding *}
11In file included from /usr/local/include/php/ext/mbstring/libmbfl/mbfl/mbfilter.h:98,
12 from /tmp/pear/temp/mailparse/php_mailparse.h:79,
13 from /tmp/pear/temp/mailparse/mailparse.c:24:
14/usr/local/include/php/ext/mbstring/libmbfl/mbfl/mbfl_convert.h:72:27: note: expected 'enum mbfl_no_encoding' but argument is of type 'const mbfl_encoding *' {aka 'const struct _mbfl_encoding *'}
15 72 | enum mbfl_no_encoding from,
16 | ~~~~~~~~~~~~~~~~~~~~~~^~~~
17/tmp/pear/temp/mailparse/mailparse.c:1017:4: error: incompatible type for argument 2 of 'mbfl_convert_filter_new'
18 1017 | mbfl_no2encoding(enc),
19 | ^~~~~~~~~~~~~~~~~~~~~
20 | |
21 | const mbfl_encoding * {aka const struct _mbfl_encoding *}
22In file included from /usr/local/include/php/ext/mbstring/libmbfl/mbfl/mbfilter.h:98,
23 from /tmp/pear/temp/mailparse/php_mailparse.h:79,
24 from /tmp/pear/temp/mailparse/mailparse.c:24:
25/usr/local/include/php/ext/mbstring/libmbfl/mbfl/mbfl_convert.h:73:27: note: expected 'enum mbfl_no_encoding' but argument is of type 'const mbfl_encoding *' {aka 'const struct _mbfl_encoding *'}
26 73 | enum mbfl_no_encoding to,
27 | ~~~~~~~~~~~~~~~~~~~~~~^~
28make: *** [Makefile:198: mailparse.lo] Error 1
29ERROR: `make' failed