Just added DKIM signing to all my emails. I needed to edit the exim.conf file from :
to
Works perfect! The problem is that this will be overwritten by cpanel/whm if there is an update. So I logged into WHM and was going to modify through the exim advanced editor, but it doesn't support changing of the remote_smtp transport. So I am stuck. I contacted cpanel support and they gave me the following response :
1. Create a file named /scripts/posteximup
2. Give it permissions of 0700
3. Place code inside that file that will change the remote_smtp transport
to the one you wish to use. This can be shell scripting, or perl, or any other
language you'd like.
The "posteximup" hook is documented here:
Service script hooks
cPanel & WHM Script Hooks
Basically it just says this:
~~~~~~~~~~~~~~~~~~~~~~~~~~
Runs after Exim updates
(post /scripts/eximup)
~~~~~~~~~~~~~~~~~~~~~~~~~~
, but they cannot give me the code to do what I want. Doing such a thing is way over my head and languages I am not familiar with in any way.
Can anyone help out with this? I need to keep DKIM intact, but if exim will just wipe it away on any upgrade that defeats the whole thing...
thanks!
Code:
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostn
ame}}}{$primary_hostname}}
Code:
remote_smtp:
driver = smtp
# dkim added below this - dkim_domain was changed from your_domain_name.com
dkim_domain=$sender_address_domain
dkim_selector=mail
dkim_private_key=/usr/local/cpanel/etc/exim/dkim.key
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
# before dkim added - interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
# before dkim added - helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
1. Create a file named /scripts/posteximup
2. Give it permissions of 0700
3. Place code inside that file that will change the remote_smtp transport
to the one you wish to use. This can be shell scripting, or perl, or any other
language you'd like.
The "posteximup" hook is documented here:
Service script hooks
cPanel & WHM Script Hooks
Basically it just says this:
~~~~~~~~~~~~~~~~~~~~~~~~~~
Runs after Exim updates
(post /scripts/eximup)
~~~~~~~~~~~~~~~~~~~~~~~~~~
, but they cannot give me the code to do what I want. Doing such a thing is way over my head and languages I am not familiar with in any way.
Can anyone help out with this? I need to keep DKIM intact, but if exim will just wipe it away on any upgrade that defeats the whole thing...
thanks!