[Nix-dev] My Hydra can't send mail

Eelco Dolstra eelco.dolstra at logicblox.com
Tue Jan 5 13:01:49 CET 2016


Hi,

On 04/01/16 20:28, Bas van Dijk wrote:

> I recently deployed my own Hydra server but I think it has a problem
> sending mail because I see the following in the journal:
> 
>   hydra-queue-runner[24341]:
>     Hydra::Plugin::EmailNotification=HASH(0x4f4b1e8)->
>       buildFinished: error when closing pipe to sendmail:
>   hydra-queue-runner[24341]: sendmail: Cannot open mailhub:25
>   sSMTP[21796]: Cannot open mailhub:25
>   sSMTP[21796]: Unable to locate mailhub
>   sSMTP[21796]: /etc/ssmtp/ssmtp.conf not found
> 
> For full logs see: http://www.mpaste.com/p/cNwe
> 
> Do note that I have a postfix service running on that machine:
> 
>   services.postfix.enable = true;
> 
> And services.postfix.setSendmail is kept to the default of true which
> means that the sendmail in the PATH is postfix's sendmail.
> 
> How can I let hydra use postfix's sendmail properly?

You probably need to change the line

  path = [ pkgs.nettools pkgs.ssmtp ];

in the Hydra module to

  path = [ pkgs.nettools pkgs.postfix ];

or something like that. Or maybe add the sendmail setuid wrapper to the path.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list