<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.eprints.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=152.78.114.56</id>
	<title>EPrints Documentation - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eprints.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=152.78.114.56"/>
	<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/Special:Contributions/152.78.114.56"/>
	<updated>2026-11-22T19:28:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17606</id>
		<title>How to configure DKIM email verification (using sendmail on Rocky9)</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17606"/>
		<updated>2026-11-11T18:51:12Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested on CentOS7 and Rocky9 both of which using sendmail (not postfix). You will likely be able to adapt these instructions fairly easily to suit your operating system and mail transfer program.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As eprints user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a directory to store the keys&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As root user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Install the opendkim libraries&lt;br /&gt;
&lt;br /&gt;
 dnf install opendkim opendkim-tools sendmail-cf&lt;br /&gt;
&lt;br /&gt;
2. Open the opendkim config file and change the following lines&lt;br /&gt;
&lt;br /&gt;
 vim /etc/opendkim.conf&lt;br /&gt;
&lt;br /&gt;
2. a. Change &lt;br /&gt;
 Mode v &lt;br /&gt;
to &lt;br /&gt;
 Mode sv&lt;br /&gt;
&lt;br /&gt;
2. b. Remove comments from the following lines:&lt;br /&gt;
&lt;br /&gt;
 KeyTable                /etc/opendkim/KeyTable&lt;br /&gt;
 SigningTable            refile:/etc/opendkim/SigningTable&lt;br /&gt;
 ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
 InternalHosts           refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
2. c. Add the following lines (the DOMAIN is the domain which our server sending email on behalf of)&lt;br /&gt;
&lt;br /&gt;
 Domain &amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
 RequireSafeKeys False&lt;br /&gt;
&lt;br /&gt;
2. d. Replace the Socket declaration with the following line (it should be commented out above the declaration being used)&lt;br /&gt;
&lt;br /&gt;
 Socket  inet:8891@localhost&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/opendkim/KeyTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt; &amp;lt;DOMAIN&amp;gt;:&amp;lt;REPOID&amp;gt;:/etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `repoid._domainkey.eprints-hosting.org eprints-hosting.org:repoid:/etc/opendkim/keys/repoid.private`&lt;br /&gt;
&lt;br /&gt;
4. Modify /etc/opendkim/SigningTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *@&amp;lt;DOMAIN&amp;gt; &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `*@eprints-hosting.org repoid._domainkey.eprints-hosting.org`&lt;br /&gt;
&lt;br /&gt;
5. Modify /etc/opendkim/TrustedHosts, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; *.eprints-hosting.org&lt;br /&gt;
&lt;br /&gt;
6. Generate the keypair and copy to /etc/opendkim/keys/.  (You will need to remember to do the latter again if your move to a new server).&lt;br /&gt;
&lt;br /&gt;
 opendkim-genkey -b 1024 -d &amp;lt;DOMAIN&amp;gt; -D /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim &amp;lt;DOMAIN&amp;gt; -s &amp;lt;REPOID&amp;gt; -v&lt;br /&gt;
 cp /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.private /etc/opendkim/keys/&lt;br /&gt;
&lt;br /&gt;
7. Change permissions and group ownership (and SELinux context if necessary). (You will need to remember to do the latter again if your move to a new server).&lt;br /&gt;
&lt;br /&gt;
 chmod g+r /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
 chgrp opendkim /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
 chcon -t etc_t /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
8. Send the txt public key to whoever has access to the DNS records, probably their IT team&lt;br /&gt;
&lt;br /&gt;
 cat /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.txt&lt;br /&gt;
&lt;br /&gt;
It should look something like this.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;v=DKIM1; k=rsa; &amp;quot; &amp;quot;p=REALLY-LONG-HASH-VALUE/HASH-VALUE/HASH-VALUE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. Start opendkim&lt;br /&gt;
&lt;br /&gt;
 systemctl enable --now opendkim&lt;br /&gt;
&lt;br /&gt;
10. Make sure it is running with the following commands&lt;br /&gt;
&lt;br /&gt;
 systemctl status opendkim&lt;br /&gt;
This should say running.&lt;br /&gt;
&lt;br /&gt;
 ps -aux | grep dkim&lt;br /&gt;
The opendkim process should be running: &amp;quot;/usr/sbin/opendkim -f -x /etc/opendkim.con&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 netstat -nap | grep 8891&lt;br /&gt;
This command should show that opendkim is listening on localhost port 8819&lt;br /&gt;
&lt;br /&gt;
11. Sendmail Configuration (under /etc/mail/ on RHEL-based Linux)&lt;br /&gt;
&lt;br /&gt;
11. a. Modify sendmail.mc, append the following line&lt;br /&gt;
&lt;br /&gt;
 INPUT_MAIL_FILTER(`opendkim&#039;, `S=inet:8891@localhost&#039;)&lt;br /&gt;
&lt;br /&gt;
11. b. re-make sendmail.cf, restart sendmail.&lt;br /&gt;
&lt;br /&gt;
 /etc/mail/make&lt;br /&gt;
 systemctl restart sendmail&lt;br /&gt;
&lt;br /&gt;
12. Send a test email&lt;br /&gt;
&lt;br /&gt;
 echo “Subject: DKIM testing” | sendmail test-recipient@address.email&lt;br /&gt;
&lt;br /&gt;
13. If the test email has worked, test again using the web interface admin tool &amp;quot;Send Test Email&amp;quot;&lt;br /&gt;
&lt;br /&gt;
14. Debug any issues using &lt;br /&gt;
&lt;br /&gt;
 tail -F /var/log/maillog*&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17605</id>
		<title>How to configure DKIM email verification (using sendmail on Rocky9)</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17605"/>
		<updated>2026-11-11T18:41:38Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: Update location of private key so that maillog does not compain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested on CentOS7 and Rocky9 both of which using sendmail (not postfix). You will likely be able to adapt these instructions fairly easily to suit your operating system and mail transfer program.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As eprints user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a directory to store the keys&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As root user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Install the opendkim libraries&lt;br /&gt;
&lt;br /&gt;
 dnf install opendkim opendkim-tools sendmail-cf&lt;br /&gt;
&lt;br /&gt;
2. Open the opendkim config file and change the following lines&lt;br /&gt;
&lt;br /&gt;
 vim /etc/opendkim.conf&lt;br /&gt;
&lt;br /&gt;
2. a. Change &lt;br /&gt;
 Mode v &lt;br /&gt;
to &lt;br /&gt;
 Mode sv&lt;br /&gt;
&lt;br /&gt;
2. b. Remove comments from the following lines:&lt;br /&gt;
&lt;br /&gt;
 KeyTable                /etc/opendkim/KeyTable&lt;br /&gt;
 SigningTable            refile:/etc/opendkim/SigningTable&lt;br /&gt;
 ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
 InternalHosts           refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
2. c. Add the following lines (the DOMAIN is the domain which our server sending email on behalf of)&lt;br /&gt;
&lt;br /&gt;
 Domain &amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
 RequireSafeKeys False&lt;br /&gt;
&lt;br /&gt;
2. d. Replace the Socket declaration with the following line (it should be commented out above the declaration being used)&lt;br /&gt;
&lt;br /&gt;
 Socket  inet:8891@localhost&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/opendkim/KeyTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt; &amp;lt;DOMAIN&amp;gt;:&amp;lt;REPOID&amp;gt;:/etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `repoid._domainkey.eprints-hosting.org eprints-hosting.org:repoid:/etc/opendkim/keys/repoid.private`&lt;br /&gt;
&lt;br /&gt;
4. Modify /etc/opendkim/SigningTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *@&amp;lt;DOMAIN&amp;gt; &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `*@eprints-hosting.org repoid._domainkey.eprints-hosting.org`&lt;br /&gt;
&lt;br /&gt;
5. Modify /etc/opendkim/TrustedHosts, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; *.eprints-hosting.org&lt;br /&gt;
&lt;br /&gt;
6. Generate the keypair and copy to /etc/opendkim/keys/.  (You will need to remember to do the latter again if your move to a new server).&lt;br /&gt;
&lt;br /&gt;
 opendkim-genkey -b 1024 -d &amp;lt;DOMAIN&amp;gt; -D /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim &amp;lt;DOMAIN&amp;gt; -s &amp;lt;REPOID&amp;gt; -v&lt;br /&gt;
 cp /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.private /etc/opendkim/keys/&lt;br /&gt;
&lt;br /&gt;
7. Change permissions, group ownership and SELinux contexts if necessary. (You will need to remember to do the latter again if your move to a new server).&lt;br /&gt;
&lt;br /&gt;
 chmod g+r /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
 chgrp opendkim /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
 chcon -t etc_t /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
8. Send the txt public key to whoever has access to the DNS records, probably their IT team&lt;br /&gt;
&lt;br /&gt;
 cat /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.txt&lt;br /&gt;
&lt;br /&gt;
It should look something like this.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;v=DKIM1; k=rsa; &amp;quot; &amp;quot;p=REALLY-LONG-HASH-VALUE/HASH-VALUE/HASH-VALUE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. Start opendkim&lt;br /&gt;
&lt;br /&gt;
 systemctl enable --now opendkim&lt;br /&gt;
&lt;br /&gt;
10. Make sure it is running with the following commands&lt;br /&gt;
&lt;br /&gt;
 systemctl status opendkim&lt;br /&gt;
This should say running.&lt;br /&gt;
&lt;br /&gt;
 ps -aux | grep dkim&lt;br /&gt;
The opendkim process should be running: &amp;quot;/usr/sbin/opendkim -f -x /etc/opendkim.con&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 netstat -nap | grep 8891&lt;br /&gt;
This command should show that opendkim is listening on localhost port 8819&lt;br /&gt;
&lt;br /&gt;
11. Sendmail Configuration (under /etc/mail/ on RHEL-based Linux)&lt;br /&gt;
&lt;br /&gt;
11. a. Modify sendmail.mc, append the following line&lt;br /&gt;
&lt;br /&gt;
 INPUT_MAIL_FILTER(`opendkim&#039;, `S=inet:8891@localhost&#039;)&lt;br /&gt;
&lt;br /&gt;
11. b. re-make sendmail.cf, restart sendmail.&lt;br /&gt;
&lt;br /&gt;
 /etc/mail/make&lt;br /&gt;
 systemctl restart sendmail&lt;br /&gt;
&lt;br /&gt;
12. Send a test email&lt;br /&gt;
&lt;br /&gt;
 echo “Subject: DKIM testing” | sendmail test-recipient@address.email&lt;br /&gt;
&lt;br /&gt;
13. If the test email has worked, test again using the web interface admin tool &amp;quot;Send Test Email&amp;quot;&lt;br /&gt;
&lt;br /&gt;
14. Debug any issues using &lt;br /&gt;
&lt;br /&gt;
 tail -F /var/log/maillog*&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=EPrints_and_SELinux&amp;diff=17604</id>
		<title>EPrints and SELinux</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=EPrints_and_SELinux&amp;diff=17604"/>
		<updated>2026-11-11T18:39:41Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: revert DKIM&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to write a rough set of instructions for how to get a RHEL / Fedora / CentOS / Rocky Linux system setup with SELinux enforcing so EPrints 3.4 (with site_lib) runs without any issues. &lt;br /&gt;
&lt;br /&gt;
It should be noted that the &#039;&#039;&#039;Changing Directory Permissions and SELinux Contexts&#039;&#039;&#039;, &#039;&#039;&#039;Setting SELinux Booleans&#039;&#039;&#039; and &#039;&#039;&#039;Extra settings for...&#039;&#039;&#039; sections can be ignored if you deploy the [[#Policy file|EPrints SELinux policy file]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;N.B. All commands described below need to be run as the root user or using sudo.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Apache Configuration ==&lt;br /&gt;
* Set the httpd user and group to &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; in &#039;&#039;&#039;/etc/httpd/conf/httpd.conf&#039;&#039;&#039;.  (If you are running SELinux on a Debian/Ubuntu flavour of Linux, then the user and group will need to be set to &amp;lt;tt&amp;gt;www-data&amp;lt;/tt&amp;gt; and the file you will need to edit is &#039;&#039;/etc/apache2/apache2.conf&#039;&#039;).&lt;br /&gt;
 User apache&lt;br /&gt;
 Group apache&lt;br /&gt;
&lt;br /&gt;
== System Users and Groups ==&lt;br /&gt;
* Add &amp;lt;tt&amp;gt;eprints&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; group and &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;eprints&amp;lt;/tt&amp;gt; group (so that &#039;&#039;&#039;/etc/group&#039;&#039;&#039; for these looks something like the following, order does not matter):&lt;br /&gt;
 apache:x:48:eprints&lt;br /&gt;
 eprints:x:1000:apache&lt;br /&gt;
If you are running a Debian/Ubuntu flavour of Linux, rather than &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt;, this will be &amp;lt;tt&amp;gt;www-data&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Changing Directory Permissions and SELinux Contexts ==&lt;br /&gt;
In general when a new EPrints root is deployed in /opt/eprints3/ this directory has been setup to have eprints as its owner and group with permissions set to 2775 (drwxrwsr-x).  This should generally ensure that all subdirectories will share the same permissions when checked out from SVN/Git and all files will get the permissions 0664 (-rw-rw-r--).  If directories of files to not have at least these permissions (with the exception of and SSL keys) then these permissions should be added.  svn:executable should be set on appropriate files so when they are checked out they should have 0775 (-rwxrwxr-x) permissions.&lt;br /&gt;
&lt;br /&gt;
What will need to be changed are the SELinux contexts of various directory.  This is the list compiled so far for the changes required.  It is assumed the command are run from the /opt/eprints3/ directory:&lt;br /&gt;
&lt;br /&gt;
(if the directory does not exist, there is no need to run that line)&lt;br /&gt;
&lt;br /&gt;
 chcon -R -t httpd_sys_content_t archives/&lt;br /&gt;
 chcon -R -t httpd_sys_content_t flavours/&lt;br /&gt;
 chcon -R -t httpd_sys_content_t ingredients/&lt;br /&gt;
 chcon -R -t httpd_sys_content_t site_lib/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/cfg/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/documents/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/html/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/var/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t lib/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t tmp/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t var/&lt;br /&gt;
&lt;br /&gt;
== Setting SELinux Booleans ==&lt;br /&gt;
These SELinux booleans are tailored towards RHEL-based Linux.  If you are running SELinux on a Debian/Ubuntu flavour of Linux they are likely to be different.&lt;br /&gt;
&lt;br /&gt;
You will definitely need to modify the SELinux boolean so that Apache (httpd) to be able to send email:&lt;br /&gt;
 setsebool -P httpd_can_sendmail 1&lt;br /&gt;
Unless you are running an absolutely vanilla repository you will almost certainly need to allow APache (httpd) to connect to the network:&lt;br /&gt;
 setsebool -P httpd_can_network_connect 1&lt;br /&gt;
In particular this should allow EPrints to connect to LDAP to authenticate user login and allow connecting to remote detabases.  There are also the following options for these two things but &#039;&#039;httpd_can_network_connect&#039;&#039; should be sufficient.&lt;br /&gt;
 setsebool -P httpd_can_connect_ldap 1&lt;br /&gt;
 setsebool -P httpd_can_network_connect_db 1&lt;br /&gt;
By default the following booleans for httpd should be set on:&lt;br /&gt;
 httpd_enable_cgi&lt;br /&gt;
 httpd_builtin_scripting&lt;br /&gt;
 httpd_graceful_shutdown&lt;br /&gt;
There is no need to turn any of these off.  However, the &#039;&#039;httpd_builtin_scripting&#039;&#039; is probably not needed as ModPerl uses &#039;&#039;httpd_enable_cgi&#039;&#039;, which definitely should not be turned off. Having &#039;&#039;httpd_graceful_shutdown&#039;&#039; is useful for reloading Apache after making changes to EPrints configuration.&lt;br /&gt;
&lt;br /&gt;
== Extra settings for OpenOffice/Coversheets ==&lt;br /&gt;
&#039;&#039;&#039;This assumes switching to use packaged LibreOffice and UNO converter as detailed [[Coversheets#LibreOffice|here]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The following changes are need so that httpd can execute things for coversheets:&lt;br /&gt;
&lt;br /&gt;
 chcon -t httpd_sys_script_exec_t &amp;quot;/PATH/TO/stitchPDFs&amp;quot;&lt;br /&gt;
 setsebool -P httpd_execmem 1&lt;br /&gt;
&lt;br /&gt;
* Ensure the httpd can manage TCP port 2002 that OpenOffice listens on:&lt;br /&gt;
 semanage port -a -t http_port_t -p tcp 2002&lt;br /&gt;
&lt;br /&gt;
* Add executables and invocation lines for openoffice to /opt/eptints3/EPrints/SystemSettings.pm&lt;br /&gt;
 # invocation&lt;br /&gt;
 openoffice&#039; =&amp;gt; &#039;/usr/lib64/libreoffice/program/soffice.bin&#039;,&lt;br /&gt;
 # executable&lt;br /&gt;
 openoffice&#039; =&amp;gt; &#039;$(openoffice) &amp;quot;-accept=socket,host=localhost,port=2002;urp;StarOffice.ServiceManager&amp;quot; -norestore -nofirststartwizard -nologo -headless&#039;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Make sure $ENV{&#039;HOME&#039;} as well as $ENV{&#039;TMPDIR&#039;} is set to /opt/eprints3/tmp/ in the appropriate session.pl&lt;br /&gt;
&lt;br /&gt;
== Extra settings for MePrints ==&lt;br /&gt;
 chcon -t httpd_sys_rw_content_t &amp;quot;/opt/eprints3/archives/ARCHIVENAME/meprints&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
I have tested and have been able to successfully install the following Bazaar plugin:&lt;br /&gt;
* Dates, Dates, Dates&lt;br /&gt;
* Generic Reporting Framework&lt;br /&gt;
* IRStats2&lt;br /&gt;
* RIOXX2&lt;br /&gt;
* REFCC (hefce_oa)&lt;br /&gt;
* Coversheets&lt;br /&gt;
* OpenOffice&lt;br /&gt;
* MePrints&lt;br /&gt;
However there are some issue with OpenOffice saying it is running when it is not and not being able to get soffice.bin actually running as a result.  You can upload and frontfile.odt file as a coversheet and this will get stored under cfg/static/coversheets/ in the archive.&lt;br /&gt;
&lt;br /&gt;
If you install MePrints you subsequently need to create archives/ARCHIVENAME/meprints directory and then run:&lt;br /&gt;
&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/meprints/&lt;br /&gt;
&lt;br /&gt;
Otherwise, the above Bazaar plugins need to be tested to make sure they are full functional along with other functionality of the repository like: the phrase editor, &amp;quot;edit this page&amp;quot;, storage manger, subjects editor, send test email, etc.&lt;br /&gt;
&lt;br /&gt;
== Policy file ==&lt;br /&gt;
Using an EPrints SELinux policy file may be easier than running the myriad of commands described above.&lt;br /&gt;
&lt;br /&gt;
First install the following packages:&lt;br /&gt;
 yum install checkpolicy policycoreutils-python&lt;br /&gt;
Then put all these files under /home/eprints/policy/ and run &#039;&#039;&#039;redeploy_policy.sh&#039;&#039;&#039; as the root user:&lt;br /&gt;
 bash /home/eprints/policy/redeploy_policy.sh&lt;br /&gt;
After this be sure to run &#039;&#039;&#039;restorecon&#039;&#039;&#039; on your EPrints path&lt;br /&gt;
 restorecon -R /opt/eprints3&lt;br /&gt;
&lt;br /&gt;
=== eprints.fc ===&lt;br /&gt;
It is assumed that the the path for your EPrints installation is &#039;&#039;/opt/eprints3&#039;&#039; if that is not the case or even that you have symlinked &#039;&#039;/opt/eprints3&#039;&#039; to where EPrints is actually installed the file below will not work as intended.  However you can fix this with a simple find and replace. &lt;br /&gt;
 # SELinux file contexts for EPrints&lt;br /&gt;
 &lt;br /&gt;
 /opt/eprints3/archives(/.*)?                    unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/flavours(/.*)?                    unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/ingredients(/.*)?                 unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/site_lib(/.*)?                    unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/bin(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/cfg(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/cgi(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/documents(/.*)?    unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/html(/.*)?         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/var(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/lib(/.*)?                         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/tmp(/.*)?                         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/var(/.*)?                         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints.*/ingredients/coversheets/bin/stitchPDFs    unconfined_u:object_r:httpd_sys_script_exec_t:s0&lt;br /&gt;
&lt;br /&gt;
=== eprints.te ===&lt;br /&gt;
 module eprints 1.4;&lt;br /&gt;
 &lt;br /&gt;
 require {&lt;br /&gt;
         type httpd_sys_content_t;&lt;br /&gt;
         type httpd_sys_rw_content_t;&lt;br /&gt;
         type httpd_sys_script_exec_t;&lt;br /&gt;
         type httpd_sys_script_t;&lt;br /&gt;
         type httpd_t;&lt;br /&gt;
         type ldap_port_t;&lt;br /&gt;
         type lib_t;&lt;br /&gt;
         type init_t;&lt;br /&gt;
         type mysqld_t;&lt;br /&gt;
         type shadow_t;&lt;br /&gt;
         type unconfined_service_t;&lt;br /&gt;
         type unreserved_port_t;&lt;br /&gt;
         type usr_t;&lt;br /&gt;
         type var_run_t;&lt;br /&gt;
         class dir { add_name remove_name setattr };&lt;br /&gt;
         class file { create execute execute_no_trans getattr ioctl open read unlink write };&lt;br /&gt;
         class lnk_file { read };&lt;br /&gt;
         class sock_file { write };&lt;br /&gt;
         class tcp_socket{ name_connect };&lt;br /&gt;
         class unix_stream_socket { connectto };&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 # Required by the HTTP webserver&lt;br /&gt;
 allow init_t httpd_sys_content_t:file { create execute execute_no_trans ioctl open read };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:dir { add_name remove_name };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:file { create ioctl open read unlink write };&lt;br /&gt;
 allow init_t mysqld_t:unix_stream_socket { connectto };&lt;br /&gt;
 &lt;br /&gt;
 # Required by init processes&lt;br /&gt;
 allow init_t httpd_sys_content_t:file { create execute execute_no_trans ioctl open read };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:dir { add_name remove_name };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:file { create ioctl open read unlink write };&lt;br /&gt;
 allow init_t mysqld_t:unix_stream_socket { connectto };&lt;br /&gt;
 &lt;br /&gt;
 # Only needed for coversheets, considering commenting out otherwise.&lt;br /&gt;
 allow httpd_t lib_t:dir { setattr };&lt;br /&gt;
 allow httpd_t shadow_t:file { getattr open read };&lt;br /&gt;
 allow httpd_t usr_t:file { write };&lt;br /&gt;
 allow httpd_t unreserved_port_t:tcp_socket { name_connect };&lt;br /&gt;
 allow init_t httpd_sys_content_t:lnk_file { read };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:file { create };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:lnk_file { read };&lt;br /&gt;
 &lt;br /&gt;
 # Only needed for Shibboleth authentication, consider commenting out otherwise.&lt;br /&gt;
 allow httpd_t var_run_t:sock_file { write };&lt;br /&gt;
 allow httpd_t unconfined_service_t:unix_stream_socket { connectto };&lt;br /&gt;
 &lt;br /&gt;
 # Only need for LDAP authentication, consider commenting out otherwise.&lt;br /&gt;
 allow httpd_t ldap_port_t:tcp_socket { name_connect };&lt;br /&gt;
&lt;br /&gt;
=== redeploy_policy.sh ===&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 rm -f eprints.mod eprints.pp &lt;br /&gt;
 &lt;br /&gt;
 # Build the policy package (.pp) file from type enforcement (.te) and file contexts (.fc) files.&lt;br /&gt;
 checkmodule -M -m -o eprints.mod eprints.te&lt;br /&gt;
 semodule_package -o eprints.pp -m eprints.mod -f eprints.fc&lt;br /&gt;
 &lt;br /&gt;
 # Install it.&lt;br /&gt;
 semodule -i eprints.pp&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17603</id>
		<title>How to configure DKIM email verification (using sendmail on Rocky9)</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17603"/>
		<updated>2026-11-11T18:39:20Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested on CentOS7 and Rocky9 both of which using sendmail (not postfix). You will likely be able to adapt these instructions fairly easily to suit your operating system and mail transfer program.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As eprints user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a directory to store the keys&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As root user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Install the opendkim libraries&lt;br /&gt;
&lt;br /&gt;
 dnf install opendkim opendkim-tools sendmail-cf&lt;br /&gt;
&lt;br /&gt;
2. Open the opendkim config file and change the following lines&lt;br /&gt;
&lt;br /&gt;
 vim /etc/opendkim.conf&lt;br /&gt;
&lt;br /&gt;
2. a. Change &lt;br /&gt;
 Mode v &lt;br /&gt;
to &lt;br /&gt;
 Mode sv&lt;br /&gt;
&lt;br /&gt;
2. b. Remove comments from the following lines:&lt;br /&gt;
&lt;br /&gt;
 KeyTable                /etc/opendkim/KeyTable&lt;br /&gt;
 SigningTable            refile:/etc/opendkim/SigningTable&lt;br /&gt;
 ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
 InternalHosts           refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
2. c. Add the following lines (the DOMAIN is the domain which our server sending email on behalf of)&lt;br /&gt;
&lt;br /&gt;
 Domain &amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
 RequireSafeKeys False&lt;br /&gt;
&lt;br /&gt;
2. d. Replace the Socket declaration with the following line (it should be commented out above the declaration being used)&lt;br /&gt;
&lt;br /&gt;
 Socket  inet:8891@localhost&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/opendkim/KeyTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt; &amp;lt;DOMAIN&amp;gt;:&amp;lt;REPOID&amp;gt;:/opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `repoid._domainkey.eprints-hosting.org eprints-hosting.org:repoid:/opt/eprints3/archives/repoid/dkim/repoid.private`&lt;br /&gt;
&lt;br /&gt;
4. Modify /etc/opendkim/SigningTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *@&amp;lt;DOMAIN&amp;gt; &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `*@eprints-hosting.org repoid._domainkey.eprints-hosting.org`&lt;br /&gt;
&lt;br /&gt;
5. Modify /etc/opendkim/TrustedHosts, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; *.eprints-hosting.org&lt;br /&gt;
&lt;br /&gt;
6. Generate the keypair and copy to /etc/opendkim/keys/.  (You will need to remember to do the latter again if your move to a new server).&lt;br /&gt;
&lt;br /&gt;
 opendkim-genkey -b 1024 -d &amp;lt;DOMAIN&amp;gt; -D /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim &amp;lt;DOMAIN&amp;gt; -s &amp;lt;REPOID&amp;gt; -v&lt;br /&gt;
 cp /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.private /etc/opendkim/keys/&lt;br /&gt;
&lt;br /&gt;
7. Change permissions, group ownership and SELinux contexts if necessary. (You will need to remember to do the latter again if your move to a new server).&lt;br /&gt;
&lt;br /&gt;
 chmod g+r /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
 chgrp opendkim /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
 chcon -t etc_t /etc/opendkim/keys/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
8. Send the txt public key to whoever has access to the DNS records, probably their IT team&lt;br /&gt;
&lt;br /&gt;
 cat /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.txt&lt;br /&gt;
&lt;br /&gt;
It should look something like this.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;v=DKIM1; k=rsa; &amp;quot; &amp;quot;p=REALLY-LONG-HASH-VALUE/HASH-VALUE/HASH-VALUE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. Start opendkim&lt;br /&gt;
&lt;br /&gt;
 systemctl enable --now opendkim&lt;br /&gt;
&lt;br /&gt;
10. Make sure it is running with the following commands&lt;br /&gt;
&lt;br /&gt;
 systemctl status opendkim&lt;br /&gt;
This should say running.&lt;br /&gt;
&lt;br /&gt;
 ps -aux | grep dkim&lt;br /&gt;
The opendkim process should be running: &amp;quot;/usr/sbin/opendkim -f -x /etc/opendkim.con&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 netstat -nap | grep 8891&lt;br /&gt;
This command should show that opendkim is listening on localhost port 8819&lt;br /&gt;
&lt;br /&gt;
11. Sendmail Configuration (under /etc/mail/ on RHEL-based Linux)&lt;br /&gt;
&lt;br /&gt;
11. a. Modify sendmail.mc, append the following line&lt;br /&gt;
&lt;br /&gt;
 INPUT_MAIL_FILTER(`opendkim&#039;, `S=inet:8891@localhost&#039;)&lt;br /&gt;
&lt;br /&gt;
11. b. re-make sendmail.cf, restart sendmail.&lt;br /&gt;
&lt;br /&gt;
 /etc/mail/make&lt;br /&gt;
 systemctl restart sendmail&lt;br /&gt;
&lt;br /&gt;
12. Send a test email&lt;br /&gt;
&lt;br /&gt;
 echo “Subject: DKIM testing” | sendmail test-recipient@address.email&lt;br /&gt;
&lt;br /&gt;
13. If the test email has worked, test again using the web interface admin tool &amp;quot;Send Test Email&amp;quot;&lt;br /&gt;
&lt;br /&gt;
14. Debug any issues using &lt;br /&gt;
&lt;br /&gt;
 tail -F /var/log/maillog*&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17602</id>
		<title>How to configure DKIM email verification (using sendmail on Rocky9)</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17602"/>
		<updated>2026-11-11T18:16:37Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: Removed extra selinux config&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested on CentOS7 and Rocky9 both of which using sendmail (not postfix). You will likely be able to adapt these instructions fairly easily to suit your operating system and mail transfer program.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As eprints user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a directory to store the keys&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As root user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Install the opendkim libraries&lt;br /&gt;
&lt;br /&gt;
 dnf install opendkim opendkim-tools sendmail-cf&lt;br /&gt;
&lt;br /&gt;
2. Open the opendkim config file and change the following lines&lt;br /&gt;
&lt;br /&gt;
 vim /etc/opendkim.conf&lt;br /&gt;
&lt;br /&gt;
2. a. Change &lt;br /&gt;
 Mode v &lt;br /&gt;
to &lt;br /&gt;
 Mode sv&lt;br /&gt;
&lt;br /&gt;
2. b. Remove comments from the following lines:&lt;br /&gt;
&lt;br /&gt;
 KeyTable                /etc/opendkim/KeyTable&lt;br /&gt;
 SigningTable            refile:/etc/opendkim/SigningTable&lt;br /&gt;
 ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
 InternalHosts           refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
2. c. Add the following lines (the DOMAIN is the domain which our server sending email on behalf of)&lt;br /&gt;
&lt;br /&gt;
 Domain &amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
 RequireSafeKeys False&lt;br /&gt;
&lt;br /&gt;
2. d. Replace the Socket declaration with the following line (it should be commented out above the declaration being used)&lt;br /&gt;
&lt;br /&gt;
 Socket  inet:8891@localhost&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/opendkim/KeyTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt; &amp;lt;DOMAIN&amp;gt;:&amp;lt;REPOID&amp;gt;:/opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `repoid._domainkey.eprints-hosting.org eprints-hosting.org:repoid:/opt/eprints3/archives/repoid/dkim/repoid.private`&lt;br /&gt;
&lt;br /&gt;
4. Modify /etc/opendkim/SigningTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *@&amp;lt;DOMAIN&amp;gt; &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `*@eprints-hosting.org repoid._domainkey.eprints-hosting.org`&lt;br /&gt;
&lt;br /&gt;
5. Modify /etc/opendkim/TrustedHosts, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; *.eprints-hosting.org&lt;br /&gt;
&lt;br /&gt;
6. Generate the keypair&lt;br /&gt;
&lt;br /&gt;
 opendkim-genkey -b 1024 -d &amp;lt;DOMAIN&amp;gt; -D /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim &amp;lt;DOMAIN&amp;gt; -s &amp;lt;REPOID&amp;gt; -v&lt;br /&gt;
&lt;br /&gt;
7. Change ownership and permissions&lt;br /&gt;
&lt;br /&gt;
 chown opendkim:opendkim /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/* -R&lt;br /&gt;
 chmod 660 /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/*&lt;br /&gt;
 chgrp opendkim /etc/opendkim/*&lt;br /&gt;
&lt;br /&gt;
8. Send the txt public key to whoever has access to the DNS records, probably their IT team&lt;br /&gt;
&lt;br /&gt;
 cat /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.txt&lt;br /&gt;
&lt;br /&gt;
It should look something like this.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;v=DKIM1; k=rsa; &amp;quot; &amp;quot;p=REALLY-LONG-HASH-VALUE/HASH-VALUE/HASH-VALUE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. Start opendkim&lt;br /&gt;
&lt;br /&gt;
 systemctl enable --now opendkim&lt;br /&gt;
&lt;br /&gt;
10. Make sure it is running with the following commands&lt;br /&gt;
&lt;br /&gt;
 systemctl status opendkim&lt;br /&gt;
This should say running.&lt;br /&gt;
&lt;br /&gt;
 ps -aux | grep dkim&lt;br /&gt;
The opendkim process should be running: &amp;quot;/usr/sbin/opendkim -f -x /etc/opendkim.con&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 netstat -nap | grep 8891&lt;br /&gt;
This command should show that opendkim is listening on localhost port 8819&lt;br /&gt;
&lt;br /&gt;
11. Sendmail Configuration (under /etc/mail/ on RHEL-based Linux)&lt;br /&gt;
&lt;br /&gt;
11. a. Modify sendmail.mc, append the following line&lt;br /&gt;
&lt;br /&gt;
 INPUT_MAIL_FILTER(`opendkim&#039;, `S=inet:8891@localhost&#039;)&lt;br /&gt;
&lt;br /&gt;
11. b. re-make sendmail.cf, restart sendmail.&lt;br /&gt;
&lt;br /&gt;
 /etc/mail/make&lt;br /&gt;
 systemctl restart sendmail&lt;br /&gt;
&lt;br /&gt;
12. Send a test email&lt;br /&gt;
&lt;br /&gt;
 echo “Subject: DKIM testing” | sendmail test-recipient@address.email&lt;br /&gt;
&lt;br /&gt;
13. If the test email has worked, test again using the web interface admin tool &amp;quot;Send Test Email&amp;quot;&lt;br /&gt;
&lt;br /&gt;
14. Debug any issues using &lt;br /&gt;
&lt;br /&gt;
 tail -F /var/log/maillog*&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=EPrints_and_SELinux&amp;diff=17601</id>
		<title>EPrints and SELinux</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=EPrints_and_SELinux&amp;diff=17601"/>
		<updated>2026-11-11T18:15:05Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: /* eprints.fc */ Added DKIM file context&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to write a rough set of instructions for how to get a RHEL / Fedora / CentOS / Rocky Linux system setup with SELinux enforcing so EPrints 3.4 (with site_lib) runs without any issues. &lt;br /&gt;
&lt;br /&gt;
It should be noted that the &#039;&#039;&#039;Changing Directory Permissions and SELinux Contexts&#039;&#039;&#039;, &#039;&#039;&#039;Setting SELinux Booleans&#039;&#039;&#039; and &#039;&#039;&#039;Extra settings for...&#039;&#039;&#039; sections can be ignored if you deploy the [[#Policy file|EPrints SELinux policy file]] instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;N.B. All commands described below need to be run as the root user or using sudo.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Apache Configuration ==&lt;br /&gt;
* Set the httpd user and group to &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; in &#039;&#039;&#039;/etc/httpd/conf/httpd.conf&#039;&#039;&#039;.  (If you are running SELinux on a Debian/Ubuntu flavour of Linux, then the user and group will need to be set to &amp;lt;tt&amp;gt;www-data&amp;lt;/tt&amp;gt; and the file you will need to edit is &#039;&#039;/etc/apache2/apache2.conf&#039;&#039;).&lt;br /&gt;
 User apache&lt;br /&gt;
 Group apache&lt;br /&gt;
&lt;br /&gt;
== System Users and Groups ==&lt;br /&gt;
* Add &amp;lt;tt&amp;gt;eprints&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; group and &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;eprints&amp;lt;/tt&amp;gt; group (so that &#039;&#039;&#039;/etc/group&#039;&#039;&#039; for these looks something like the following, order does not matter):&lt;br /&gt;
 apache:x:48:eprints&lt;br /&gt;
 eprints:x:1000:apache&lt;br /&gt;
If you are running a Debian/Ubuntu flavour of Linux, rather than &amp;lt;tt&amp;gt;apache&amp;lt;/tt&amp;gt;, this will be &amp;lt;tt&amp;gt;www-data&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Changing Directory Permissions and SELinux Contexts ==&lt;br /&gt;
In general when a new EPrints root is deployed in /opt/eprints3/ this directory has been setup to have eprints as its owner and group with permissions set to 2775 (drwxrwsr-x).  This should generally ensure that all subdirectories will share the same permissions when checked out from SVN/Git and all files will get the permissions 0664 (-rw-rw-r--).  If directories of files to not have at least these permissions (with the exception of and SSL keys) then these permissions should be added.  svn:executable should be set on appropriate files so when they are checked out they should have 0775 (-rwxrwxr-x) permissions.&lt;br /&gt;
&lt;br /&gt;
What will need to be changed are the SELinux contexts of various directory.  This is the list compiled so far for the changes required.  It is assumed the command are run from the /opt/eprints3/ directory:&lt;br /&gt;
&lt;br /&gt;
(if the directory does not exist, there is no need to run that line)&lt;br /&gt;
&lt;br /&gt;
 chcon -R -t httpd_sys_content_t archives/&lt;br /&gt;
 chcon -R -t httpd_sys_content_t flavours/&lt;br /&gt;
 chcon -R -t httpd_sys_content_t ingredients/&lt;br /&gt;
 chcon -R -t httpd_sys_content_t site_lib/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/cfg/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/documents/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/html/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/var/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t lib/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t tmp/&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t var/&lt;br /&gt;
&lt;br /&gt;
== Setting SELinux Booleans ==&lt;br /&gt;
These SELinux booleans are tailored towards RHEL-based Linux.  If you are running SELinux on a Debian/Ubuntu flavour of Linux they are likely to be different.&lt;br /&gt;
&lt;br /&gt;
You will definitely need to modify the SELinux boolean so that Apache (httpd) to be able to send email:&lt;br /&gt;
 setsebool -P httpd_can_sendmail 1&lt;br /&gt;
Unless you are running an absolutely vanilla repository you will almost certainly need to allow APache (httpd) to connect to the network:&lt;br /&gt;
 setsebool -P httpd_can_network_connect 1&lt;br /&gt;
In particular this should allow EPrints to connect to LDAP to authenticate user login and allow connecting to remote detabases.  There are also the following options for these two things but &#039;&#039;httpd_can_network_connect&#039;&#039; should be sufficient.&lt;br /&gt;
 setsebool -P httpd_can_connect_ldap 1&lt;br /&gt;
 setsebool -P httpd_can_network_connect_db 1&lt;br /&gt;
By default the following booleans for httpd should be set on:&lt;br /&gt;
 httpd_enable_cgi&lt;br /&gt;
 httpd_builtin_scripting&lt;br /&gt;
 httpd_graceful_shutdown&lt;br /&gt;
There is no need to turn any of these off.  However, the &#039;&#039;httpd_builtin_scripting&#039;&#039; is probably not needed as ModPerl uses &#039;&#039;httpd_enable_cgi&#039;&#039;, which definitely should not be turned off. Having &#039;&#039;httpd_graceful_shutdown&#039;&#039; is useful for reloading Apache after making changes to EPrints configuration.&lt;br /&gt;
&lt;br /&gt;
== Extra settings for OpenOffice/Coversheets ==&lt;br /&gt;
&#039;&#039;&#039;This assumes switching to use packaged LibreOffice and UNO converter as detailed [[Coversheets#LibreOffice|here]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The following changes are need so that httpd can execute things for coversheets:&lt;br /&gt;
&lt;br /&gt;
 chcon -t httpd_sys_script_exec_t &amp;quot;/PATH/TO/stitchPDFs&amp;quot;&lt;br /&gt;
 setsebool -P httpd_execmem 1&lt;br /&gt;
&lt;br /&gt;
* Ensure the httpd can manage TCP port 2002 that OpenOffice listens on:&lt;br /&gt;
 semanage port -a -t http_port_t -p tcp 2002&lt;br /&gt;
&lt;br /&gt;
* Add executables and invocation lines for openoffice to /opt/eptints3/EPrints/SystemSettings.pm&lt;br /&gt;
 # invocation&lt;br /&gt;
 openoffice&#039; =&amp;gt; &#039;/usr/lib64/libreoffice/program/soffice.bin&#039;,&lt;br /&gt;
 # executable&lt;br /&gt;
 openoffice&#039; =&amp;gt; &#039;$(openoffice) &amp;quot;-accept=socket,host=localhost,port=2002;urp;StarOffice.ServiceManager&amp;quot; -norestore -nofirststartwizard -nologo -headless&#039;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Make sure $ENV{&#039;HOME&#039;} as well as $ENV{&#039;TMPDIR&#039;} is set to /opt/eprints3/tmp/ in the appropriate session.pl&lt;br /&gt;
&lt;br /&gt;
== Extra settings for MePrints ==&lt;br /&gt;
 chcon -t httpd_sys_rw_content_t &amp;quot;/opt/eprints3/archives/ARCHIVENAME/meprints&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
I have tested and have been able to successfully install the following Bazaar plugin:&lt;br /&gt;
* Dates, Dates, Dates&lt;br /&gt;
* Generic Reporting Framework&lt;br /&gt;
* IRStats2&lt;br /&gt;
* RIOXX2&lt;br /&gt;
* REFCC (hefce_oa)&lt;br /&gt;
* Coversheets&lt;br /&gt;
* OpenOffice&lt;br /&gt;
* MePrints&lt;br /&gt;
However there are some issue with OpenOffice saying it is running when it is not and not being able to get soffice.bin actually running as a result.  You can upload and frontfile.odt file as a coversheet and this will get stored under cfg/static/coversheets/ in the archive.&lt;br /&gt;
&lt;br /&gt;
If you install MePrints you subsequently need to create archives/ARCHIVENAME/meprints directory and then run:&lt;br /&gt;
&lt;br /&gt;
 chcon -R -t httpd_sys_rw_content_t archives/ARCHIVENAME/meprints/&lt;br /&gt;
&lt;br /&gt;
Otherwise, the above Bazaar plugins need to be tested to make sure they are full functional along with other functionality of the repository like: the phrase editor, &amp;quot;edit this page&amp;quot;, storage manger, subjects editor, send test email, etc.&lt;br /&gt;
&lt;br /&gt;
== Policy file ==&lt;br /&gt;
Using an EPrints SELinux policy file may be easier than running the myriad of commands described above.&lt;br /&gt;
&lt;br /&gt;
First install the following packages:&lt;br /&gt;
 yum install checkpolicy policycoreutils-python&lt;br /&gt;
Then put all these files under /home/eprints/policy/ and run &#039;&#039;&#039;redeploy_policy.sh&#039;&#039;&#039; as the root user:&lt;br /&gt;
 bash /home/eprints/policy/redeploy_policy.sh&lt;br /&gt;
After this be sure to run &#039;&#039;&#039;restorecon&#039;&#039;&#039; on your EPrints path&lt;br /&gt;
 restorecon -R /opt/eprints3&lt;br /&gt;
&lt;br /&gt;
=== eprints.fc ===&lt;br /&gt;
It is assumed that the the path for your EPrints installation is &#039;&#039;/opt/eprints3&#039;&#039; if that is not the case or even that you have symlinked &#039;&#039;/opt/eprints3&#039;&#039; to where EPrints is actually installed the file below will not work as intended.  However you can fix this with a simple find and replace. &lt;br /&gt;
 # SELinux file contexts for EPrints&lt;br /&gt;
 &lt;br /&gt;
 /opt/eprints3/archives(/.*)?                    unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/flavours(/.*)?                    unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/ingredients(/.*)?                 unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/site_lib(/.*)?                    unconfined_u:object_r:httpd_sys_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/bin(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/cfg(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/cgi(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints.*/archives/[^/]*/dkim(/.*)?        system_u:object_r:etc_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/documents(/.*)?    unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/html(/.*)?         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/archives/[^/]*/var(/.*)?          unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/lib(/.*)?                         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/tmp(/.*)?                         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints3/var(/.*)?                         unconfined_u:object_r:httpd_sys_rw_content_t:s0&lt;br /&gt;
 /opt/eprints.*/ingredients/coversheets/bin/stitchPDFs    unconfined_u:object_r:httpd_sys_script_exec_t:s0&lt;br /&gt;
&lt;br /&gt;
=== eprints.te ===&lt;br /&gt;
 module eprints 1.4;&lt;br /&gt;
 &lt;br /&gt;
 require {&lt;br /&gt;
         type httpd_sys_content_t;&lt;br /&gt;
         type httpd_sys_rw_content_t;&lt;br /&gt;
         type httpd_sys_script_exec_t;&lt;br /&gt;
         type httpd_sys_script_t;&lt;br /&gt;
         type httpd_t;&lt;br /&gt;
         type ldap_port_t;&lt;br /&gt;
         type lib_t;&lt;br /&gt;
         type init_t;&lt;br /&gt;
         type mysqld_t;&lt;br /&gt;
         type shadow_t;&lt;br /&gt;
         type unconfined_service_t;&lt;br /&gt;
         type unreserved_port_t;&lt;br /&gt;
         type usr_t;&lt;br /&gt;
         type var_run_t;&lt;br /&gt;
         class dir { add_name remove_name setattr };&lt;br /&gt;
         class file { create execute execute_no_trans getattr ioctl open read unlink write };&lt;br /&gt;
         class lnk_file { read };&lt;br /&gt;
         class sock_file { write };&lt;br /&gt;
         class tcp_socket{ name_connect };&lt;br /&gt;
         class unix_stream_socket { connectto };&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 # Required by the HTTP webserver&lt;br /&gt;
 allow init_t httpd_sys_content_t:file { create execute execute_no_trans ioctl open read };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:dir { add_name remove_name };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:file { create ioctl open read unlink write };&lt;br /&gt;
 allow init_t mysqld_t:unix_stream_socket { connectto };&lt;br /&gt;
 &lt;br /&gt;
 # Required by init processes&lt;br /&gt;
 allow init_t httpd_sys_content_t:file { create execute execute_no_trans ioctl open read };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:dir { add_name remove_name };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:file { create ioctl open read unlink write };&lt;br /&gt;
 allow init_t mysqld_t:unix_stream_socket { connectto };&lt;br /&gt;
 &lt;br /&gt;
 # Only needed for coversheets, considering commenting out otherwise.&lt;br /&gt;
 allow httpd_t lib_t:dir { setattr };&lt;br /&gt;
 allow httpd_t shadow_t:file { getattr open read };&lt;br /&gt;
 allow httpd_t usr_t:file { write };&lt;br /&gt;
 allow httpd_t unreserved_port_t:tcp_socket { name_connect };&lt;br /&gt;
 allow init_t httpd_sys_content_t:lnk_file { read };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:file { create };&lt;br /&gt;
 allow init_t httpd_sys_rw_content_t:lnk_file { read };&lt;br /&gt;
 &lt;br /&gt;
 # Only needed for Shibboleth authentication, consider commenting out otherwise.&lt;br /&gt;
 allow httpd_t var_run_t:sock_file { write };&lt;br /&gt;
 allow httpd_t unconfined_service_t:unix_stream_socket { connectto };&lt;br /&gt;
 &lt;br /&gt;
 # Only need for LDAP authentication, consider commenting out otherwise.&lt;br /&gt;
 allow httpd_t ldap_port_t:tcp_socket { name_connect };&lt;br /&gt;
&lt;br /&gt;
=== redeploy_policy.sh ===&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 rm -f eprints.mod eprints.pp &lt;br /&gt;
 &lt;br /&gt;
 # Build the policy package (.pp) file from type enforcement (.te) and file contexts (.fc) files.&lt;br /&gt;
 checkmodule -M -m -o eprints.mod eprints.te&lt;br /&gt;
 semodule_package -o eprints.pp -m eprints.mod -f eprints.fc&lt;br /&gt;
 &lt;br /&gt;
 # Install it.&lt;br /&gt;
 semodule -i eprints.pp&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17600</id>
		<title>How to configure DKIM email verification (using sendmail on Rocky9)</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17600"/>
		<updated>2026-11-11T16:44:37Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: Augmented instructions to use bespoke selector and added assistance for those using SELinux&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested on CentOS7 and Rocky9 both of which using sendmail (not postfix). You will likely be able to adapt these instructions fairly easily to suit your operating system and mail transfer program.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As eprints user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a directory to store the keys&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As root user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Install the opendkim libraries&lt;br /&gt;
&lt;br /&gt;
 dnf install opendkim opendkim-tools sendmail-cf&lt;br /&gt;
&lt;br /&gt;
2. Open the opendkim config file and change the following lines&lt;br /&gt;
&lt;br /&gt;
 vim /etc/opendkim.conf&lt;br /&gt;
&lt;br /&gt;
2. a. Change &lt;br /&gt;
 Mode v &lt;br /&gt;
to &lt;br /&gt;
 Mode sv&lt;br /&gt;
&lt;br /&gt;
2. b. Remove comments from the following lines:&lt;br /&gt;
&lt;br /&gt;
 KeyTable                /etc/opendkim/KeyTable&lt;br /&gt;
 SigningTable            refile:/etc/opendkim/SigningTable&lt;br /&gt;
 ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
 InternalHosts           refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
2. c. Add the following lines (the DOMAIN is the domain which our server sending email on behalf of)&lt;br /&gt;
&lt;br /&gt;
 Domain &amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
 RequireSafeKeys False&lt;br /&gt;
&lt;br /&gt;
2. d. Replace the Socket declaration with the following line (it should be commented out above the declaration being used)&lt;br /&gt;
&lt;br /&gt;
 Socket  inet:8891@localhost&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/opendkim/KeyTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt; &amp;lt;DOMAIN&amp;gt;:&amp;lt;REPOID&amp;gt;:/opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `repoid._domainkey.eprints-hosting.org eprints-hosting.org:repoid:/opt/eprints3/archives/repoid/dkim/repoid.private`&lt;br /&gt;
&lt;br /&gt;
4. Modify /etc/opendkim/SigningTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *@&amp;lt;DOMAIN&amp;gt; &amp;lt;REPOID&amp;gt;._domainkey.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `*@eprints-hosting.org repoid._domainkey.eprints-hosting.org`&lt;br /&gt;
&lt;br /&gt;
5. Modify /etc/opendkim/TrustedHosts, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; *.eprints-hosting.org&lt;br /&gt;
&lt;br /&gt;
6. Generate the keypair&lt;br /&gt;
&lt;br /&gt;
 opendkim-genkey -b 1024 -d &amp;lt;DOMAIN&amp;gt; -D /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim &amp;lt;DOMAIN&amp;gt; -s &amp;lt;REPOID&amp;gt; -v&lt;br /&gt;
&lt;br /&gt;
7. Change ownership and permissions&lt;br /&gt;
&lt;br /&gt;
 chown opendkim:opendkim /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/* -R&lt;br /&gt;
 chmod 660 /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/*&lt;br /&gt;
 chgrp opendkim /etc/opendkim/*&lt;br /&gt;
&lt;br /&gt;
8. Send the txt public key to whoever has access to the DNS records, probably their IT team&lt;br /&gt;
&lt;br /&gt;
 cat /opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/&amp;lt;REPOID&amp;gt;.txt&lt;br /&gt;
&lt;br /&gt;
It should look something like this.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;v=DKIM1; k=rsa; &amp;quot; &amp;quot;p=REALLY-LONG-HASH-VALUE/HASH-VALUE/HASH-VALUE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. Start opendkim&lt;br /&gt;
&lt;br /&gt;
 systemctl enable --now opendkim&lt;br /&gt;
&lt;br /&gt;
10. Make sure it is running with the following commands&lt;br /&gt;
&lt;br /&gt;
 systemctl status opendkim&lt;br /&gt;
This should say running.&lt;br /&gt;
&lt;br /&gt;
 ps -aux | grep dkim&lt;br /&gt;
The opendkim process should be running: &amp;quot;/usr/sbin/opendkim -f -x /etc/opendkim.con&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 netstat -nap | grep 8891&lt;br /&gt;
This command should show that opendkim is listening on localhost port 8819&lt;br /&gt;
&lt;br /&gt;
11. Sendmail Configuration (under /etc/mail/ on RHEL-based Linux)&lt;br /&gt;
&lt;br /&gt;
11. a. Modify sendmail.mc, append the following line&lt;br /&gt;
&lt;br /&gt;
 INPUT_MAIL_FILTER(`opendkim&#039;, `S=inet:8891@localhost&#039;)&lt;br /&gt;
&lt;br /&gt;
11. b. re-make sendmail.cf, restart sendmail.&lt;br /&gt;
&lt;br /&gt;
 /etc/mail/make&lt;br /&gt;
 systemctl restart sendmail&lt;br /&gt;
&lt;br /&gt;
12. Send a test email&lt;br /&gt;
&lt;br /&gt;
 echo “Subject: DKIM testing” | sendmail test-recipient@address.email&lt;br /&gt;
&lt;br /&gt;
13. If the test email has worked, test again using the web interface admin tool &amp;quot;Send Test Email&amp;quot;&lt;br /&gt;
&lt;br /&gt;
14. Debug any issues using &lt;br /&gt;
&lt;br /&gt;
 tail -F /var/log/maillog*&lt;br /&gt;
&lt;br /&gt;
=== Extra SELinux Configuration&lt;br /&gt;
If you are using SELinux and you place the DKIM keys under opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/ then the eprints SELinux policy file will likley set the context to &amp;lt;code&amp;gt;httpd_sys_content_t&amp;lt;/code&amp;gt;.  Therefore, you will need to add the following to your EPrints SELinux type expressions policy file (e.g. eprints.te)  and redeploy it&lt;br /&gt;
&lt;br /&gt;
1. Add the following under the &amp;lt;code&amp;gt;require&amp;lt;/code&amp;gt; section at the top of your eprints.te file&lt;br /&gt;
 type dkim_milter_t;&lt;br /&gt;
2. Add the following at the end of your eprints.te file.&lt;br /&gt;
 allow dkim_milter_t httpd_sys_content_t:file { getattr open read };&lt;br /&gt;
3. Run the redeploy_policy.sh script (see https://wiki.eprints.org/w/EPrints_and_SELinux#redeploy_policy.sh)&lt;br /&gt;
&lt;br /&gt;
4. Restart OpenDKIM and Sendmail&lt;br /&gt;
 systemctl restart opendkim&lt;br /&gt;
 systemctl restart sendmail&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
	<entry>
		<id>https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17599</id>
		<title>How to configure DKIM email verification (using sendmail on Rocky9)</title>
		<link rel="alternate" type="text/html" href="https://wiki.eprints.org/w/index.php?title=How_to_configure_DKIM_email_verification_(using_sendmail_on_Rocky9)&amp;diff=17599"/>
		<updated>2026-11-11T16:08:06Z</updated>

		<summary type="html">&lt;p&gt;152.78.114.56: Need sendmail-cf to reconfigured sendmail.cf later in instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
These instructions have been tested on CentOS7 and Rocky9 both of which using sendmail (not postfix). You will likely be able to adapt these instructions fairly easily to suit your operating system and mail transfer program.&lt;br /&gt;
&lt;br /&gt;
== Steps ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As eprints user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Create a directory to store the keys&lt;br /&gt;
&lt;br /&gt;
 mkdir /opt/eprints3/archives/&amp;lt;REPO-ID&amp;gt;/dkim&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As root user&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1. Install the opendkim libraries&lt;br /&gt;
&lt;br /&gt;
 dnf install opendkim opendkim-tools sendmail-cf&lt;br /&gt;
&lt;br /&gt;
2. Open the opendkim config file and change the following lines&lt;br /&gt;
&lt;br /&gt;
 vim /etc/opendkim.conf&lt;br /&gt;
&lt;br /&gt;
2. a. Change &lt;br /&gt;
 Mode v &lt;br /&gt;
to &lt;br /&gt;
 Mode sv&lt;br /&gt;
&lt;br /&gt;
2. b. Remove comments from the following lines:&lt;br /&gt;
&lt;br /&gt;
 KeyTable                /etc/opendkim/KeyTable&lt;br /&gt;
 SigningTable            refile:/etc/opendkim/SigningTable&lt;br /&gt;
 ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
 InternalHosts           refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
2. c. Add the following lines (the DOMAIN is the domain which our server sending email on behalf of)&lt;br /&gt;
&lt;br /&gt;
 Domain &amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
 RequireSafeKeys False&lt;br /&gt;
&lt;br /&gt;
2. d. Replace the Socket declaration with the following line (it should be commented out above the declaration being used)&lt;br /&gt;
&lt;br /&gt;
 Socket  inet:8891@localhost&lt;br /&gt;
&lt;br /&gt;
3. Modify /etc/opendkim/KeyTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 default._domainkey.&amp;lt;DOMAIN&amp;gt; &amp;lt;DOMAIN&amp;gt;:default:/opt/eprints3/archives/&amp;lt;REPOID&amp;gt;/dkim/default.private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `default._domainkey.eprints-hosting.org eprints-hosting.org:default:/opt/eprints3/archives/repoid/dkim/default.private`&lt;br /&gt;
&lt;br /&gt;
4. Modify /etc/opendkim/SigningTable, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *@&amp;lt;DOMAIN&amp;gt; default._domainkey.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; `*@eprints-hosting.org default._domainkey.eprints-hosting.org`&lt;br /&gt;
&lt;br /&gt;
5. Modify /etc/opendkim/TrustedHosts, to add the following line&lt;br /&gt;
&lt;br /&gt;
 *.&amp;lt;DOMAIN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example:&#039;&#039;&#039; *.eprints-hosting.org&lt;br /&gt;
&lt;br /&gt;
6. Generate the keypair&lt;br /&gt;
&lt;br /&gt;
 opendkim-genkey -b 1024 -d &amp;lt;DOMAIN&amp;gt; -D /opt/eprints3/archives/&amp;lt;REPO-ID&amp;gt;/dkim &amp;lt;DOMAIN&amp;gt; -s default -v&lt;br /&gt;
&lt;br /&gt;
7. Change ownership and permissions&lt;br /&gt;
&lt;br /&gt;
 chown opendkim:opendkim /opt/eprints3/archives/&amp;lt;REPO-ID&amp;gt;/dkim/* -R&lt;br /&gt;
 chmod 660 /opt/eprints3/archives/&amp;lt;REPO-ID&amp;gt;/dkim/*&lt;br /&gt;
 chgrp opendkim /etc/opendkim/*&lt;br /&gt;
&lt;br /&gt;
8. Send the txt public key to whoever has access to the DNS records, probably their IT team&lt;br /&gt;
&lt;br /&gt;
 cat /opt/eprints3/archives/&amp;lt;REPO-ID&amp;gt;/dkim/default.txt&lt;br /&gt;
&lt;br /&gt;
It should look something like this.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;v=DKIM1; k=rsa; &amp;quot; &amp;quot;p=REALLY-LONG-HASH-VALUE/HASH-VALUE/HASH-VALUE&amp;quot;&lt;br /&gt;
&lt;br /&gt;
9. Start opendkim&lt;br /&gt;
&lt;br /&gt;
 systemctl enable --now opendkim&lt;br /&gt;
&lt;br /&gt;
10. Make sure it is running with the following commands&lt;br /&gt;
&lt;br /&gt;
 systemctl status opendkim&lt;br /&gt;
This should say running.&lt;br /&gt;
&lt;br /&gt;
 ps -aux | grep dkim&lt;br /&gt;
The opendkim process should be running: &amp;quot;/usr/sbin/opendkim -f -x /etc/opendkim.con&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 netstat -nap | grep 8891&lt;br /&gt;
This command should show that opendkim is listening on localhost port 8819&lt;br /&gt;
&lt;br /&gt;
11. Sendmail Configuration (under /etc/mail/ on RHEL-based Linux)&lt;br /&gt;
&lt;br /&gt;
11. a. Modify sendmail.mc, append the following line&lt;br /&gt;
&lt;br /&gt;
 INPUT_MAIL_FILTER(`opendkim&#039;, `S=inet:8891@localhost&#039;)&lt;br /&gt;
&lt;br /&gt;
11. b. re-make sendmail.cf, restart sendmail.&lt;br /&gt;
&lt;br /&gt;
 /etc/mail/make&lt;br /&gt;
 systemctl restart sendmail&lt;br /&gt;
&lt;br /&gt;
12. Send a test email&lt;br /&gt;
&lt;br /&gt;
 echo “Subject: DKIM testing” | sendmail test-recipient@address.email&lt;br /&gt;
&lt;br /&gt;
13. If the test email has worked, test again using the web interface admin tool &amp;quot;Send Test Email&amp;quot;&lt;br /&gt;
&lt;br /&gt;
14. Debug any issues using &lt;br /&gt;
&lt;br /&gt;
 tail -F /var/log/maillog*&lt;/div&gt;</summary>
		<author><name>152.78.114.56</name></author>
	</entry>
</feed>