exim.conf.local help
We're using an external SMTP server to send mail via cPanel and have this setup and working perfectly. The problem is we need to make a small change to the exim.conf file and add the following line to the virtual_aliases_nostar section:
headers_add = "X-MC-Forward: $original_local_part@$original_domain\n"
The problem with this, of course, is that every time Exim gets updated or rebuilt this change is lost and we have to add it again manually.
I see that cPanel makes use of the exim.conf.local file to save settings which can be imported again during rebuild, however I'm not sure how (or even if) the above line can be added to this file to be incorporated on each rebuild.
There is a "PREVALIASNOSTAR" section but to me that seems to imply content you want added BEFORE this section, not a replacement or addition to this setting. Does anyone have any ideas that could help? Thanks in advance.
-
I'd suggest you use the WHM Exim Configuration Manager in advanced mode to make your changes, then save. This will automatically update the exim.conf.local file. 0 -
Hello :) If you prefer to use the "exim.conf.local" file, then you could simply add the entire "virtual_aliases_nostar" entry to this file, and then rebuild the Exim configuration via: /scripts/buildeximconf
Thank you.0 -
[quote="vanessa, post: 1692941">I'd suggest you use the WHM Exim Configuration Manager in advanced mode to make your changes, then save. This will automatically update the exim.conf.local file.
Thanks for your response (I love your site by the way, it's been very helpful over the years!). I guess my next question would be in which section would we add this code? None seem specific to this section of the exim.conf file. [COLOR="silver">- - - Updated - - - [quote="vanessa, post: 1692941">I'd suggest you use the WHM Exim Configuration Manager in advanced mode to make your changes, then save. This will automatically update the exim.conf.local file.
[quote="cPanelMichael, post: 1693181">Hello :) If you prefer to use the "exim.conf.local" file, then you could simply add the entire "virtual_aliases_nostar" entry to this file, and then rebuild the Exim configuration via:/scripts/rebuildeximconf
Thank you.
Thanks Michael. In which section (if any) would we add this to? I notice the file is split up into sub sections using @HEADER@ references, so where would we put our virtual_aliases_nostar section?0 -
The file is empty by default, so you would simply enter the entire "virtual_aliases_nostar" entry as it appears in exim.conf (but with your custom changes) and then save the file. Thank you. 0 -
Just to add to this, there doesn't appear to be a /scripts/rebuildeximconf. [COLOR="silver">- - - Updated - - - OK, so I figured out you probably meant /scripts/buildeximconf instead of /scripts/rebuildeximconf. The problem is this isn't working for me and is now throwing up the following error: [QUOTE]Error message from syntax check: 2014-07-24 22:49:30 Exim configuration error in line 1697 of /etc/exim.conf.buildtest.work.LoMwWACWMailkLFf: transport virtual_aliases_nostar: cannot find transport driver "redirect" -= BEGIN exim.conf chunk -=
I'm trying to add the following code to the bottom of the exim.conf.local file: [QUOTE] virtual_aliases_nostar: driver = redirect allow_defer allow_fail require_files = "+/etc/valiases/$domain" data = ${lookup{$local_part@$domain}lsearch{/etc/valiases/$domain}} file_transport = address_file headers_add = "X-MC-Forward: $original_local_part@$original_domain\n" group = mail retry_use_local_part unseen
The bolded line above is the line I'm attempting to add to the default configuration.0 -
Still looking for help with this. Any ideas please? 0
Please sign in to leave a comment.
Comments
6 comments