Rocky linux the latest distro on openwebmail, but need a fix for C compiler

It must be a Rocky guy who updated OpemWebmail so, can he fix the code below:

Install on Fedora 40 and now Aug 2025 Fedora 41 and 42
Get repo: https://openwebmail.org/repo/el9/openwebmail-el9.repo

Script wrapping need C compiler

dnf -y group install c-development d-development
dnf -y install openwebmail
See: /usr/share/doc/openwebmail/openwebmail-post.txt
0) Edit: /var/www/cgi-bin/openwebmail/openwebmail-tool.pl
** After line 344 #include <unistd.h> and “int” before main()**
** (newer C compiler)**

  1. run: /usr/local/bin/openwebmail-tool --init
    If that bombs, do step 0.

This looks like the correct readme file
https://openwebmail.org/openwebmail/download/rocky/el9.txt
but I don’t like the look of it, says to disable selinux, and then run lots of things as root.

Yes, looking at those instructions, goto step 5 where you run:
/usr/local/bin/openwebmail-tool --init
This then runs this perl script which runs the C compiler and this C compile fails
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl
At line 344 the perl creates a C file and tries to compile it and fails!
Reason: Missing include file: #include <unistd.h>
And: no type for main(), should be: int main(argc,argv)

I’m not bothered by selinux, all I’m after is an email client, providing a web interface
and handling the incoming email as plain files! NOT IMAP. Keep it simple, no cloud storage of MY email. And, I access it from any PC with a browser, anywhere.
I have two users on my domain.

Older C was more liberal about declaration of main().
The C compiler (GCC) of Rocky does now default to newer, more strict standard for C.

It is still possible to tell the compiler to use the old standard. See option -std= in man gcc

How you pass the option is up to you. Perhaps with CFLAGS environment variable?


glibc-headers does still provide a unistd.h
Perhaps old C did include it implicitly? You can update the perl to create a C file that has that include. Same for the actual sources.


You are not bothered by security, which email and web tend to have some close relation to?

Well, Rocky doesn’t work on openwebmail project, so if it’s not compiling you should be asking them for the fix. If they support EL9, and it’s meant to compile, then they are the ones that should guarantee it.

Obviously you have the compile/install instructions from openwebmail, so they are responsible for that if it doesn’t work.

Noting my very first comment, I’m hoping the the guy who did the Rocky setup in OpenWebMail
this year will read these comments here and modify the setup instructions which will get things working (installing) for lots of Linux flavours.

But, I don’t see this in the official readme file I posted above (?), and anyway, we can’t see what’s in /usr/share/doc on your system. I hope you made a backup before you did the edit?

As far as I can tell, this is a very old project using cgi-bin and setuid, and it’s exposed over the web (security nightmare).

Indeed, it doesn’t seem to have been actively maintained for nearly 20(!) years as far as I can see, and had numerous vulnerabilities before that.

What I find funny is he keeps claiming someone from Rocky team changed something, but he doesn’t mention who. As far as I know, nobody from this project works on openwebmail.

He also ignored the fact, that if he has problems with openwebmail, then he should be asking them directly since they are the team that work on it. Just because they have instructions for Rocky, doesn’t mean that someone from the Rocky team wrote it. Makes me laugh.

No, no, no, I never claimed that Openwebmail was worked on by a Rocky team member.
But, most likely he does read these pages, hence my writing here!!!

OK Openwebmail is an old app. Now, let me explain why I still use it:
My email server for my domain is on my general purpose Linux box.
So, what does my email client need to do:

  1. Use PAM (linux) login credentials.
  2. Allow saving of files and adding files to my rx/send email to/from my home directory.
  3. Allow saving or adding files when using any remote computer
  4. Allows “procmail” in my home directory to process email subjects, newsgroups and spam.
    Thus my email is sorted ahead of time before I use the client.
  5. Does not use IMAP, just plain files. Thus easy backup by rsync to another Linux box.
  6. My email is not stored anywhere other than on my servers.

Yes, I’ve looked at other webemail clients, nothing I’ve tried does all this.
Note, all this.

Unlikely. Dev’s don’t read forums, they work on their product. You would be better contacting the guy directly. See: https://openwebmail.org/ and in particular:

Out of all the 6 points above that you stated, any email server installed on your system does all that - be it Zimbra, iRedMail, etc. And as for IMAP, it’s just a protocol to connect to a mail server via an email client. It has nothing to do with the files stored on the mail server.

So unless you contact the guy directly, your problem won’t be fixed. Nobody can help you here unless you want to try and fix the instructions yourself to find a way to compile it or whatever.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.