Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exim: corrected implementation of services.exim.config #21727

Closed
wants to merge 1 commit into from

Conversation

redvers
Copy link
Member

@redvers redvers commented Jan 7, 2017

Motivation for this change

The exim configuration specification allows you to include other configuration files and that is the purpose of the service.exim.config declaration.

The syntax for including a file is:
.include filename

This PR fixes the bug where .include is omitted causing a syntax error.

Documentation reference: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_run_time_configuration_file.html Item 3.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@redvers, thanks for your PR! By analyzing the history of the files in this pull request, we identified @4z3 to be a potential reviewer.

@joachifm joachifm added 0.kind: bug 9.needs: port to stable A PR needs a backport to the stable release. labels Jan 7, 2017
@fpletz
Copy link
Member

fpletz commented Jan 7, 2017

The config option is for a string with the actual configuration by looking at its help text:

Verbatim Exim configuration. This should not contain exim_user,exim_group, exim_path, or spool_directory.

The type of the option should probably be lines instead of string, though.

So 👎 for me on this one.

@fpletz fpletz removed 0.kind: bug 9.needs: port to stable A PR needs a backport to the stable release. labels Jan 7, 2017
@Mic92
Copy link
Member

Mic92 commented Jan 7, 2017

@redvers you can achieve the same effect by using:

services.exim.config = ''
  .include /path/to/configuration
'';

or

services.exim.config = ''
  .include ${/etc/nixos/exim.conf}
'';

if you want rollback support for your configuration (the path will be copied to /nix/store in this case).

@Mic92 Mic92 closed this Jan 7, 2017
@redvers
Copy link
Member Author

redvers commented Jan 7, 2017

@fpletz, .config is unfortunately used inconsistently throughout the repo.

I quick (unscientific) browse through the docs shows it used as a filename, application configuration literal contents, NixOS modules, expressions... and so on.

Guess I'm used to seeing extraConf for literals and .config for files or expressions.

Maybe a series of docpatches for docs which are not explicit would be useful.

Thanks for looking at the PR, enjoy your day.

@Mic92
Copy link
Member

Mic92 commented Jan 8, 2017

@redvers this is true though. We could make extraConfig standard for literal strings and configFile for paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants