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

mail tool cannot find opensmtpd sendmail #40871

Closed
agreif opened this issue May 21, 2018 · 2 comments
Closed

mail tool cannot find opensmtpd sendmail #40871

agreif opened this issue May 21, 2018 · 2 comments

Comments

@agreif
Copy link

agreif commented May 21, 2018

Issue description

echo foo | mail -s test1 me@myserver.de
mail: Cannot open mailer: No such file or directory
mail: cannot send message: No such file or directory

seems that when using opensmtpd, the sendmail is not wrapped:

# which sendmail
/run/current-system/sw/bin/sendmail

# ll /run/wrappers/bin/sendmail
ls: cannot access '/run/wrappers/bin/sendmail': No such file or directory

Steps to reproduce

install stable 18.03 with the packages:
opensmtpd and
mailutils

then send mail as above from the command line

Technical details

# nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.82 MiB download, 4.38 MiB unpacked):
  /nix/store/5hszvi0hczzh25mmsz5rkb9qa758c10p-bash-4.4-p12-dev
  /nix/store/9bkj2zjc8jdzwgwdwb5d890hrhrk9d3g-bash-4.4-p12-dev
  /nix/store/bkx6rzqciq0sdn1z5liard33ffvv1n3s-bash-4.4-p12-doc
  /nix/store/d5ki460cwwydf93f31is95sqpcf334r4-bash-4.4-p12-info
  /nix/store/f1rp3j71id6g6zcmiafrksmw1cgydl9k-bash-4.4-p12-doc
  /nix/store/fskpf2pdlgn4gm2kay7lfbw1cmjil6s3-bash-4.4-p12-man
copying path '/nix/store/bkx6rzqciq0sdn1z5liard33ffvv1n3s-bash-4.4-p12-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/f1rp3j71id6g6zcmiafrksmw1cgydl9k-bash-4.4-p12-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/d5ki460cwwydf93f31is95sqpcf334r4-bash-4.4-p12-info' from 'https://cache.nixos.org'...
copying path '/nix/store/fskpf2pdlgn4gm2kay7lfbw1cmjil6s3-bash-4.4-p12-man' from 'https://cache.nixos.org'...
copying path '/nix/store/5hszvi0hczzh25mmsz5rkb9qa758c10p-bash-4.4-p12-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/9bkj2zjc8jdzwgwdwb5d890hrhrk9d3g-bash-4.4-p12-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.40, NixOS, 18.03.132339.c3da680b114 (Impala)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0.1`
 - channels(root): `"nixos-18.03.132339.c3da680b114"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`
@agreif
Copy link
Author

agreif commented May 21, 2018

I could solve the problem with wrapping sendmail myself:

  services.mail.sendmailSetuidWrapper = {
    program = "sendmail";
    source = "${pkgs.opensmtpd}/sbin/smtpctl";
    setuid = false;
    setgid = false;
  };

But I leave this issue open, because I think it should happen after the installation of opensmtpd automaticaly ... or I misunderstand the concept?

@Ekleog
Copy link
Member

Ekleog commented Jan 16, 2019

@agreif I have opened #54049 that should hopefully fix this without the need for the wrapped sendmail. Could you check it works for you? :)

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

No branches or pull requests

2 participants