OpenWrt Forum Archive

Topic: emailrelay crash

The content of this topic has been archived on 22 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I built a firmware which works fine apart from one package: emailrelay

I start it just like the userguide prescribes:

root@nucom:~# emailrelay --as-server --port 10025 --spool-dir /tmp

but when I try debugging with nc it crashes:

root@nucom:~# nc localhost 25
220 nucom -- E-MailRelay V1.9 -- Service ready

Here it stops responding to any further input. Hitting ^C it crashes:

Tue Feb  9 00:02:46 2016 user.notice emailrelay: Starting emailrelay service.
Tue Feb  9 00:02:46 2016 mail.info [11602]: emailrelay: info: smtp server on 0.0.0.0:25
Tue Feb  9 00:02:54 2016 mail.info [11602]: emailrelay: info: smtp connection from 127.0.0.1:34584
Tue Feb  9 00:04:04 2016 mail.info [11602]: emailrelay: info: smtp connection closed: read error: disconnected: 127.0.0.1:34584
Tue Feb  9 00:04:04 2016 kern.info kernel: [ 7166.326328] 
Tue Feb  9 00:04:04 2016 kern.info kernel: [ 7166.326328] do_page_fault(): sending SIGSEGV to emailrelay for invalid write access to 004484c4
Tue Feb  9 00:04:04 2016 kern.info kernel: [ 7166.335298] epc = 776d81b4 in libc.so[776b0000+91000]
Tue Feb  9 00:04:04 2016 kern.info kernel: [ 7166.340492] ra  = 776d8354 in libc.so[776b0000+91000]
Tue Feb  9 00:04:04 2016 kern.info kernel: [ 7166.345886] 

There is very little information on the internet on emailrelay. Suspiciously little.

Any ideas?

(Last edited by suso on 9 Feb 2016, 00:31)

I made some progress. I have the server working. It receives mail from an smtp server. But after receiving one message emailrelay exits with a segmentation fault.

In fact, emailrelay seems to crash every time it needs to disconnect. Also in client mode and in POP mode.

In POP mode I see the message received in Thunderbird with the Fetch header only option enabled. With this option disabled Thunderbird starts downloading the message and continues to do so until you abort it manually. The Inbox grows and grows with just CRLF characters.

The reason is that emailrelay seems to be unable to disconnect and if the peer does, it crashes with a segmentation fault.

I built a wrapper script as a work around so that I can use it as a server. But I think a developer should have a look into this issue or remove the feed and add it to "oldpackages" meanwhile.

The discussion might have continued from here.