Author Topic: Enigam plugin_Error 600_Keys directory isn't writeable  (Read 6107 times)

Offline Vort3x_Layers

  • Newbie
  • *
  • Posts: 4
Enigam plugin_Error 600_Keys directory isn't writeable
« on: June 02, 2017, 04:50:26 PM »
I am using windows server 2008 R2 with it's IIS.

I choosed enigma plugin of roundcube during creating config file.
After login to web mail when i go to this path : Settings > PGP Keys > I got this error : 
Quote
Application Error (600): Enigma plugin: Keys directory isn't writeable: C:\inetpub\wwwroot\mail.blobloblo.com/plugins/enigma/home
I added Everyone user to "home" folder and give all permissions to this folder such as modify-read-write.
Bot still i have that error.
In home folder there is a folder > mail.blobloblo.com > means there is no problem for writing on home folder.

How can i fix this error?
Which user should i change it's permission?
« Last Edit: June 02, 2017, 04:54:26 PM by Vort3x_Layers »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #1 on: June 03, 2017, 02:49:28 AM »
This plugin probably will not work on Windows anyway as Crypt_GPG library does not support Windows.

Offline Vort3x_Layers

  • Newbie
  • *
  • Posts: 4
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #2 on: June 04, 2017, 11:28:49 AM »
Thanks for the answer.
So how can i encrypt my emails?
Google always shows an alarm about encryption mails sent from roundcube!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #3 on: June 05, 2017, 03:01:27 AM »
Are you sure that the alarm is about the contents of the email not being encrypted?

I do not use Google myself but from what I can find out about it, it seems that its about the email not being delivered via TLS rather than about the contents of the email. Could you post the exact warning from Google? Also may be check your SMTP logs to see that the message was exchanged via TLS. See https://support.google.com/mail/answer/6330403?hl=en
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Vort3x_Layers

  • Newbie
  • *
  • Posts: 4
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #4 on: June 06, 2017, 09:12:34 AM »
Here is the gmail warning :

Quote
This message was not encrypted.

And here is the original email:

Quote
Delivered-To: <To_Email>
Received: by 10.107.168.88 with SMTP id r85csp658955ioe;
        Wed, 31 May 2017 16:17:33 -0700 (PDT)
X-Received: by 10.55.40.151 with SMTP id o23mr24778275qko.210.1496272653272;
        Wed, 31 May 2017 16:17:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1496272653; cv=none;
        d=google.com; s=arc-20160816;
        b=feei5vNFIT8TKdnSU3opmX3EdeyNYqa7z5jFdBdGI5y9L+c60sD/SlTTgevPc70Go0
         klmaoarF0h44xbx7AxydMnhV/zP/Ap9Cjlw796Mgsj1j4yy2IGpXIGztnJ8mvtPkvAl/
         0z0HEnK+p++4+/IsapRHAemOx0YD9I1GSkEbB4wyfQsLqt+4EygGNEIau8eRCDwjvn+T
         LSi/IsyXMqnrJDeX9ddyQKrUPXo+KW4KJpX+30QT1OPFyUazo+mAl64sEq3ABxqVNwv6
         y8OCoeuqOOiAkoj84lXm1Ws2WYpBBF6B9SHWeloGfN8otGjTpQunOuVVBOqtiKqSjlJ/
         gLMA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=subject:to:from:mime-version:message-id:date
         :arc-authentication-results;
        bh=3ZTQDSPFs5Dbfhy/jEU12DyuzBKIXa5tk4aavDNvJqU=;
        b=Oe0faeHfQviE2s9SlaiuBKJneR76H9/Ig+HvvydNnunMVZ/7tuxydG4rbzfFCFTDZ3
         5rff6H9D8addf/+Z282FbzaI/G9QtV3O55Xa7rwOq2EAUjQYIDGIfvkFA7ZYRt9BmQwV
         wz3p7n1u1CMhlK5CUw5lqJdchK1+v8XJWcA9Ps0ya7wnn/Qt+lh2XJNLc/y/FwF+VpbZ
         KjjXiCpYEyY9SUVPmOE69dZTbauxZdBeYGA7di/xtSnqNDFNca3ikmn+lcYcS7ScIBfI
         LVWDfhX7igUgXPm1H6HSMIUValihMOVPRroQgasCKyHcK3zAj/jKRoWGTjWpscxirrj2
         NNgw==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: <IP_Address> is neither permitted nor denied by best guess record for domain of <From_Email>) smtp.mailfrom=<From_Email>
Return-Path: <<From_Email>>
Received: from WIN-556156165 ([<IP_Address>])
        by mx.google.com with ESMTP id v12si17917172qtc.242.2017.05.31.16.17.31
        for <<To_Email>>;
        Wed, 31 May 2017 16:17:32 -0700 (PDT)
Received-SPF: neutral (google.com: <IP_Address> is neither permitted nor denied by best guess record for domain of <From_Email>) client-ip=<IP_Address>;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: <IP_Address> is neither permitted nor denied by best guess record for domain of <From_Email>) smtp.mailfrom=<From_Email>
Date: Wed, 31 May 2017 16:17:33 -0700 (PDT)
Received: from mail.mydomain.com (WIN-556156165 [<IP_Address>]) by WIN-556156165 with ESMTPA ; Thu, 1 Jun 2017 03:47:26 +0430
Message-ID: <E1F54133-5632>
MIME-Version: 1.0
From: <From_Email>
To: <To_Email>
Subject: Test message from Roundcube

This is a test to confirm that Roundcube can send email.


For the log which file should i check?
I am using hmailserver as mail server and in hmail TLS is active.
But i don't know why roundcube can't encrypt the mail.
Also errors log of roundcude is empty and every thing is working ok.
Here is the Config File of roundcube : (I changed some parts manually)
Quote
<?php

//ini_set('error_reporting', E_ALL);
ini_set("display_errors", "On");

//echo(__DIR__ . '\mime.types');

$my_enable_installer = false;

$my_domain = 'mydomain.com';  //      or localhost

//$config['mime_types'] = '../mime.types'; //Before Config Folder - Do not use this
//$config['mime_types'] = '../config/mime.types'; //Config Folder - Do not use this
$config['mime_types'] = __DIR__ . '\mime.types';

$my_imap_host_prefix_1 = 'tls://'; //      ssl:// or tls://   Always Use tls
$my_smtp_host_prefix_1 = 'tls://'; //      ssl:// or tls://   Always Use tls

$my_imap_host_prefix_2 = 'imap.'; //      or mail.
$my_smtp_host_prefix_2 = 'smtp.'; //      or mail.

$my_imap_host = $my_imap_host_prefix_1 . $my_imap_host_prefix_2 . $my_domain;
$my_smtp_host = $my_smtp_host_prefix_1 . $my_smtp_host_prefix_2 . $my_domain;

$my_imap_port = 993;  //   143 (normal imap) | 993 (Secure imap)
$my_smtp_port = 465;  //   25,587 (normal smtp) | 465 (Secure smtp)


$config['imap_timeout'] = 20;  // Default is 0
// IMAP socket context options
// See http://php.net/manual/en/context.ssl.php
// The example below enables server certificate validation
// for PHP 5.6 will verify peer certificate against installed CA and verify the peer name
// http://serverfault.com/questions/655995/roundcube-postfix-smtp-ssl-routinesssl3-read-bytestlsv1-alert-unknown-cas3
$config['imap_conn_options'] = array(
  'ssl'         => array(  // There is no tls
     'verify_peer'  => true,
     'verify_peer_name' => false,    // very important - Added by me for php 5.6 - Can be true if Common-Name in Certificate is like imap.domain.com (mail.domain.com for both imap,smtp if both of them are mail.domain.com)
     'verify_depth' => 3,
     'cafile'       => __DIR__ . "\\" . $my_domain . '.crt',
    'crypto_method' =>    STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT |  // You can remove this or change this
                           STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,  // http://php.net/manual/en/migration56.openssl.php
    'allow_self_signed' => true,
   ),
 );
 
//$config['imap_timeout'] = 0;
// for PHP 5.5 and earlier
// http://serverfault.com/questions/655995/roundcube-postfix-smtp-ssl-routinesssl3-read-bytestlsv1-alert-unknown-cas3
//$config['imap_conn_options'] = null;


$config['smtp_timeout'] = 20;  // Default is 0
// SMTP socket context options
// See http://php.net/manual/en/context.ssl.php
// The example below enables server certificate validation, and
// requires 'smtp_timeout' to be non zero.
// for PHP 5.6 will verify peer certificate against installed CA and verify the peer name
// http://serverfault.com/questions/655995/roundcube-postfix-smtp-ssl-routinesssl3-read-bytestlsv1-alert-unknown-cas3
 $config['smtp_conn_options'] = array(
   'ssl'         => array(  // There is no tls
     'verify_peer'  => true,
     'verify_peer_name' => false,    // very important - Added by me for php 5.6 - Can be true if Common-Name in Certificate is like imap.domain.com (mail.domain.com for both imap,smtp if both of them are mail.domain.com)
     'verify_depth' => 3,
     'cafile'       => __DIR__ . "\\" . $my_domain . '.crt',
    'crypto_method' =>    STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT |  // You can remove this or change this
                           STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,  // http://php.net/manual/en/migration56.openssl.php
    'allow_self_signed' => true,
   ),
 );
 
// for PHP 5.5 and earlier
// http://serverfault.com/questions/655995/roundcube-postfix-smtp-ssl-routinesssl3-read-bytestlsv1-alert-unknown-cas3
//$config['smtp_timeout'] = 0;
//$config['smtp_conn_options'] = null;


/* Local configuration for Roundcube Webmail */

// ----------------------------------
// SQL DATABASE
// ----------------------------------
// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
//       or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysql://root:Solaris_533@localhost/roundcube_db';

// ----------------------------------
// LOGGING/DEBUGGING
// ----------------------------------
// system error reporting, sum of: 1 = log; 4 = show
$config['debug_level'] = 4;

// ----------------------------------
// IMAP
// ----------------------------------
// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['default_host'] = $my_imap_host;

// TCP port used for IMAP connections
$config['default_port'] = $my_imap_port;

// ----------------------------------
// SMTP
// ----------------------------------
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// If left blank, the PHP mail() function is used
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$config['smtp_server'] = $my_smtp_host;

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
$config['smtp_port'] = $my_smtp_port;

// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';

// ----------------------------------
// SYSTEM
// ----------------------------------
// THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
// ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
$config['enable_installer'] = $my_enable_installer;

// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$config['support_url'] = 'http://' . $my_domain . '/';

// This key is used for encrypting purposes, like storing of imap password
// in the session. For historical reasons it's called DES_key, but it's used
// with any configured cipher_method (see below).
$config['des_key'] = 'Ge6bBs4BBDjaoiP2rXDLhBAD';

// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
$config['plugins'] = array('additional_message_headers', 'emoticons', 'enigma', 'show_additional_headers', 'userinfo');

// the default locale setting (leave empty for auto-detection)
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$config['language'] = 'en';

// Make use of the built-in spell checker. It is based on GoogieSpell.
$config['enable_spellcheck'] = false;

// show up to X items in messages list view
$config['mail_pagesize'] = 100;

// compose html formatted messages by default
//  0 - never,
//  1 - always,
//  2 - on reply to HTML message,
//  3 - on forward or reply to HTML message
//  4 - always, except when replying to plain text message
$config['htmleditor'] = 1;

// default setting if preview pane is enabled
$config['preview_pane'] = true;

Can you lead me step by step to configure roundcube to work with TLS or SSL and encrypt mails!
« Last Edit: June 06, 2017, 09:25:03 AM by Vort3x_Layers »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #5 on: June 06, 2017, 11:09:13 AM »
I think this is the answer here:

Quote
Received: from WIN-556156165 ([<IP_Address>])
        by mx.google.com with ESMTP id v12si17917172qtc.242.2017.05.31.16.17.31
        for <<To_Email>>;
        Wed, 31 May 2017 16:17:32 -0700 (PDT)

If google had recieved the message over TLS it would say so there.

As for the rest, which file to check - hmailserver's smtp log, I expect that should say the connection method used.

This is a mail server issue though, nothing to do with roundcube. So you should try asking the hmailserver community for help.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Vort3x_Layers

  • Newbie
  • *
  • Posts: 4
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #6 on: June 06, 2017, 05:55:08 PM »
Thanks for the answer.
So what is the job of that enigma plugin exactly?
Did you check my config file & is it ok?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Enigam plugin_Error 600_Keys directory isn't writeable
« Reply #7 on: June 06, 2017, 06:33:41 PM »
The enigma plugin encrypts the contents of the email. It doesn't cover the encrypted SMTP transport which is what Google is complaining about.