Running a SMTP email server (e.g., exim) in Gramine

28 views
Skip to first unread message

Gabriel Dengler

unread,
Oct 26, 2022, 6:56:20 AM10/26/22
to Gramine Users
Hello everyone,



I wanted to run the SMTP email server exim (https://www.exim.org/) inside Gramine. However, there seem to be some problems:
  • At first, exim is very precise about the current user that is running the binary (root user, non-root user), which seems to interfere with the concept of Gramine exposing root as the default user to the enclave; yes, you can specify the UID and GID, but I haven't found a working configuration (yet). Especially, exim is often calling itself via exim, but with another user to send an email (depending on which permissions are needed).
  • Secondly, exim uses some system calls (e.g.,  getrlimit, setrlimit, or getgroups) which seem to fail consistently.



Here are some error messages that occurred:

  • getrlimit(RLIMIT_NOFILE) failed: Bad address
  • exim: getgroups() failed: Bad address
  • failed to write to main log: length=65 result=-1 errno=9 (Bad file descriptor)
  • Gramine also logs the following warning, but I cannot identify if this is a larger problem: [P1:T1:exim] warning: "struct msghdr" ancillary data is not supported
How could I fix those problems, at best in a very generic way by, e.g., adjusting the Gramine manifest, and not by changing a lot of the actual code?



Apart from that, if that is not likely to make exim make work easily within Gramine: does anyone has experience in which SMTP server might be easily adapted to be run in Gramine and has the support of TLS as well as password authentication?



Best regards,

Gabriel

Dmitrii Kuvaiskii

unread,
Oct 27, 2022, 3:55:55 AM10/27/22
to Gabriel Dengler, Gramine Users
Dear Gabriel,

Could you post this to https://github.com/gramineproject/gramine/discussions/categories/general ? These are good questions, but I find it hard to discuss them in an email format.

--
You received this message because you are subscribed to the Google Groups "Gramine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gramine-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gramine-users/fffdbd23-5809-4f38-b00f-75baf3181d5bn%40googlegroups.com.


--
Yours sincerely,
Dmitrii Kuvaiskii

Gabriel Dengler

unread,
Oct 27, 2022, 6:00:01 AM10/27/22
to Gramine Users
Dear Dmitrii,

thanks for your answer. I now reposted this question at GitHub: https://github.com/gramineproject/gramine/discussions/1013

Best regards,
Gabriel
Reply all
Reply to author
Forward
0 new messages