Fruneau / pfixtools

The pfixtools project is a collection of postfix-related tools. The pfixtools are written in C.
Other
26 stars 7 forks source link

Build fails (undefined reference to `htokens') #13

Open groe opened 10 years ago

groe commented 10 years ago

I am currently running pfix-srsd and it does the SRS forward translations perfectly. However, similar to #9, bounces are rejected ("unknown user"). The problem seems to be that smtpd_recipient_restrictions is not aware of the SRS bounce address and therefore rejects it.

If I understand that correctly, using postlicyd.conf-srs would fix this, but I can't build it unfortunately...

~/pfixtools/postlicyd# make
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".filter.dep .filter.o" -MF .filter.dep -g -c -o .filter.o filter.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".config.dep .config.o" -MF .config.dep -g -c -o .config.o config.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".query.dep .query.o" -MF .query.dep -g -c -o .query.o query.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".resources.dep .resources.o" -MF .resources.dep -g -c -o .resources.o resources.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".db.dep .db.o" -MF .db.dep -g -c -o .db.o db.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".dns.dep .dns.o" -MF .dns.dep -g -c -o .dns.o dns.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".spf-proto.dep .spf-proto.o" -MF .spf-proto.dep -g -c -o .spf-proto.o spf-proto.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".iplist.dep .iplist.o" -MF .iplist.dep -g -c -o .iplist.o iplist.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".greylist.dep .greylist.o" -MF .greylist.dep -g -c -o .greylist.o greylist.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".strlist.dep .strlist.o" -MF .strlist.dep -g -c -o .strlist.o strlist.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".match.dep .match.o" -MF .match.dep -g -c -o .match.o match.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".counter.dep .counter.o" -MF .counter.dep -g -c -o .counter.o counter.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".spf.dep .spf.o" -MF .spf.dep -g -c -o .spf.o spf.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".hang.dep .hang.o" -MF .hang.dep -g -c -o .hang.o hang.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".rate.dep .rate.o" -MF .rate.dep -g -c -o .rate.o rate.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".srs.dep .srs.o" -MF .srs.dep -g -c -o .srs.o srs.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".policy_tokens.dep .policy_tokens.o" -MF .policy_tokens.dep -g -c -o .policy_tokens.o policy_tokens.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".filter_tokens.dep .filter_tokens.o" -MF .filter_tokens.dep -g -c -o .filter_tokens.o filter_tokens.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".hook_tokens.dep .hook_tokens.o" -MF .hook_tokens.dep -g -c -o .hook_tokens.o hook_tokens.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".param_tokens.dep .param_tokens.o" -MF .param_tokens.dep -g -c -o .param_tokens.o param_tokens.c
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".spf_tokens.dep .spf_tokens.o" -MF .spf_tokens.dep -g -c -o .spf_tokens.o spf_tokens.c
rm -f libpostlicyd.a
ar rcs libpostlicyd.a .filter.o .config.o .query.o .resources.o .db.o .dns.o .spf-proto.o .iplist.o .greylist.o .strlist.o .match.o .counter.o .spf.o .hang.o .rate.o .srs.o .policy_tokens.o .filter_tokens.o .hook_tokens.o .param_tokens.o .spf_tokens.o
cc -pipe -O2 -funsigned-char -fstrict-aliasing -Wstrict-aliasing=2 -Wall -Wextra -Werror -Wchar-subscripts -Wundef -Wshadow -Wwrite-strings -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wno-format-y2k -Wmissing-format-attribute -Wsequence-point -Wparentheses -Wmissing-declarations  --std=gnu99 -I../ -I../common -MMD -MT ".main-postlicyd.dep .main-postlicyd.o" -MF .main-postlicyd.dep -g -c -o .main-postlicyd.o main-postlicyd.c
cc -Wl,-warn-common  -o postlicyd .main-postlicyd.o libpostlicyd.a ../common/lib.a -ltokyocabinet   -lev -lpcre -lunbound -lsrs2
.main-postlicyd.o: In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
.main-postlicyd.o: In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `htokens'
.main-postlicyd.o: In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
.main-postlicyd.o: In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `htokens'
libpostlicyd.a(.config.o): In function `config_parse':
/root/pfixtools/postlicyd/config.c:318: undefined reference to `param_tokenize'
libpostlicyd.a(.config.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.config.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
libpostlicyd.a(.query.o): In function `query_parse':
/root/pfixtools/postlicyd/query.c:90: undefined reference to `policy_tokenize'
/root/pfixtools/postlicyd/query.c:91: undefined reference to `policy_tokenize'
libpostlicyd.a(.query.o): In function `query_field_for_name':
/root/pfixtools/postlicyd/query.c:331: undefined reference to `policy_tokenize'
libpostlicyd.a(.query.o): In function `query_format_field_content':
/root/pfixtools/postlicyd/query.c:343: undefined reference to `policy_tokenize'
libpostlicyd.a(.spf.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.spf.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
libpostlicyd.a(.spf.o):/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: more undefined references to `atokens' follow
libpostlicyd.a(.spf-proto.o): In function `spf_next':
/root/pfixtools/postlicyd/spf-proto.c:718: undefined reference to `spftokens'
/root/pfixtools/postlicyd/spf-proto.c:718: undefined reference to `spftokens'
libpostlicyd.a(.spf-proto.o): In function `spf_parse':
/root/pfixtools/postlicyd/spf-proto.c:1440: undefined reference to `spf_rule_tokenize'
libpostlicyd.a(.filter.o): In function `filter_register':
/root/pfixtools/postlicyd/filter.c:141: undefined reference to `filter_tokenize'
libpostlicyd.a(.filter.o): In function `filter_hook_register':
/root/pfixtools/postlicyd/filter.c:157: undefined reference to `hook_tokenize'
libpostlicyd.a(.filter.o): In function `filter_module_init':
/root/pfixtools/postlicyd/filter.c:121: undefined reference to `ftokens'
libpostlicyd.a(.filter.o): In function `filter_param_register':
/root/pfixtools/postlicyd/filter.c:183: undefined reference to `param_tokenize'
libpostlicyd.a(.filter.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
libpostlicyd.a(.filter.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `htokens'
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `htokens'
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `htokens'
libpostlicyd.a(.filter.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
libpostlicyd.a(.filter.o):/usr/include/x86_64-linux-gnu/bits/syslog.h:32: more undefined references to `htokens' follow
libpostlicyd.a(.filter.o): In function `filter_set_type':
/root/pfixtools/postlicyd/filter.c:347: undefined reference to `filter_tokenize'
libpostlicyd.a(.filter.o): In function `filter_add_param':
/root/pfixtools/postlicyd/filter.c:359: undefined reference to `param_tokenize'
libpostlicyd.a(.filter.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.filter.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
libpostlicyd.a(.filter.o): In function `filter_add_hook':
/root/pfixtools/postlicyd/filter.c:390: undefined reference to `hook_tokenize'
libpostlicyd.a(.filter.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
libpostlicyd.a(.filter.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `htokens'
libpostlicyd.a(.filter.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `htokens'
libpostlicyd.a(.filter.o):/usr/include/x86_64-linux-gnu/bits/syslog.h:32: more undefined references to `htokens' follow
libpostlicyd.a(.filter.o): In function `filter_module_init':
/root/pfixtools/postlicyd/filter.c:121: undefined reference to `ftokens'
libpostlicyd.a(.match.o): In function `match_filter_constructor':
/root/pfixtools/postlicyd/match.c:180: undefined reference to `policy_tokenize'
libpostlicyd.a(.match.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.match.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
libpostlicyd.a(.iplist.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.iplist.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
libpostlicyd.a(.iplist.o):/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: more undefined references to `atokens' follow
libpostlicyd.a(.strlist.o): In function `strlist_filter_constructor':
/root/pfixtools/postlicyd/strlist.c:603: undefined reference to `policy_tokenize'
libpostlicyd.a(.strlist.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.strlist.o): In function `fprintf':
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/stdio2.h:98: undefined reference to `atokens'
libpostlicyd.a(.counter.o): In function `syslog':
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
/usr/include/x86_64-linux-gnu/bits/syslog.h:32: undefined reference to `atokens'
libpostlicyd.a(.counter.o):/usr/include/x86_64-linux-gnu/bits/syslog.h:32: more undefined references to `atokens' follow
collect2: ld returned 1 exit status
make: *** [postlicyd] Error 1

I am running Ubuntu 12.04, the latest pfixtools 0.9, gcc 4.6.3, ld 2.22, libsrs2-1.0.18, libunbound-dev 1.4.16-1, libpcre3-8.12-4, libev4-4.11-1, libtokyocainet-1.4.37-6.1build1.

Any ideas?

I would appreciate any help!

Fruneau commented 10 years ago

Hi,

All the missing symbols are from stuff generated using gperf by the build system. Can you check that gperf is installed on your system? then run make distclean then make

groe commented 10 years ago

I did install gperf and ran make clean but I did not think of make distclean. That fixed it, thanks a lot!

Incoming bounces are now correctly resolved to the original sender address before SRS translation. So if I connect to the server via SMTP and send to the SRS bounce address as RCPT-TO-adress the mail is accepted. However, when the bounce message is generated locally by the server itself, the address is not resolved (it seems like recipient_canonical_maps are not applied when postfix generates the bounce message itself).

Sep 30 15:40:19 myserver postfix/virtual[22549]: 2BE2C54172C: to=<srs0=XXXX=YY=original=address@mydomain>, relay=virtual, delay=0.12, delays=0.07/0.01/0/0.05, dsn=5.1.1, status=bounced (unknown user: "srs0=XXXX=YY=original=address@mydomain")

Have you experienced this as well? Any tips on how one could enable delivery of bounce messages generated by the local mail server as well?

Again, thanks a lot for your help!

Fruneau commented 10 years ago

I'm afraid I cannot help you on that one, I've not been involved in complex postfix configurations for years now.

Maybe you can check your master.cf to see the actual workflow for bounces generated by the local mail server: do they go through a cleanup daemon? has that cleanup instance the expected recipient_canonical_maps?

groe commented 10 years ago

Thanks for your hints! After hours of verbose logging, debugging and drilling down the cause I finally got it to work.

Turns out the problem was not related to postfix but to pfix-srsd or libsrs2. Sporadically pfix-srsd would fail to translate a SRS address back to the original address with message "500 Hash invalid in SRS address."; this was happening very sporadically, so the only way I could reproduce it was to connect to pfix-srsd with telnet, translate a bunch of addresses, connect to the other pfix-srsd port with telnet and try to translate all addresses back. I noticed that sometimes just repeating the last request in telnet yielded different SRS addresses as responses - one would resolve successfully, the other one failed.

I fixed the problem for me by using a new secrets file. Previously I had a file with 100 lines, each with 92 characters (base64 encoded). When decoded, each line would be a md5 hash followed by " -" (i.e. space, space, minus; that propably came from how I generated these). E.g. one line in my secrets file was MWUwZjkwYjU3MmJkOGYwZjliN2I4MzAyOWJiNzJkMjU5YmQ1OTcwZjM3MWNlN2Q3MTIzZjMzMmZmZmJkZmQyOSAgLQo=

My new secrets file is only one line and that line is 16 random base64-encoded bytes (hope thats enough?).

Let me know if I can provide you with any additional information to fix the issue - or at least mention it somewhere in the docs, so others can find it as well. I think #9 had a similar problem as well.

Keep up the great work!