Giter Club home page Giter Club logo

dovecot_ident's People

Contributors

corbosman avatar tomsommer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dovecot_ident's Issues

How to setup login_trusted_networks

Hi i've problem i've setup 10.0.0.5 and 10.0.0.6 roundcube clients which connects to server 10.0.0.4 for example tried to add in dovecot.conf 127.0.1, ::1 or 10.0.0.0/24 or 10.0.0.5 or 10.0.0.5/32 or 10.0.0.5::1 or just mix and still same resault just see roundcube client ip

nvm , i just had to plugin in dir /var/lib/roundcube/plugins tried in wrong places ๐Ÿ’ƒ

Won't work without --> $config['imap_debug'] = true;

Hi Corbosman

Thanks for the plugin, but unfortunately the plugin just works correct if I add --> $config['imap_debug'] = true; <-- to the Roundcube config.inc.php . Without this imap_debug, I get the wrong ip (127.0.0.1) with the postlogin script

Friendly greets
Burzel

Wrong attachment

Hi,

Thank you for your code!
It works, I can see the ip addresses in the log, when a user logged in Roundcube. But when I download an attachment, the attachment (for example .doc) is wrong, the Word can't open it. I realized, that there is a plus white character at the begining of the file. If I delete this character, the Word can open it.
How can I correct this probelm in my system?

I use 1.1.12 RC with these plugins: filesystem_attachments 1.0, jqueryui 1.10.4, managesieve 8.3, password 3.5.

Thank you

Update for 1.5

Hello,

this plugin does not work anymore with version 1.5 of Roundcube, see roundcube/roundcubemail#7860

This is a little patch. I don't know how to check the version of roundcube, otherwise you could use an 'if' to handle different versions.

--- dovecot_ident.php.orig	2021-07-05 10:31:19.104942320 +0200
+++ dovecot_ident.php	2021-07-05 10:20:20.425873102 +0200
@@ -17,7 +17,7 @@

   function add_ident($args)
   {
-    $args['ident'] = $args['ident'] ? array_merge($args['ident'], array('x-originating-ip' => $_SERVER['REMOTE_ADDR']))
+    $args['preauth_ident'] = $args['preauth_ident'] ? array_merge($args['preauth_ident'], array('x-originating-ip' => $_SERVER['REMOTE_ADDR']))
 									: array('x-originating-ip' => $_SERVER['REMOTE_ADDR']);
     return $args;
   }

No effect

Hi,

first of all thanks for sharing your work.

But it doesn't work for me. When I login, it still shows the IP of localhost.
I'm using the latest stable version RC 1.1.0 with this plugin.

Edit:
Forgot to mention that I'm using a IPv6 address. Is that a problem?

Webserver behind proxy?

My webserver is behind a proxy server. In this case REMOTE_ADDR is proxy server IP not visitor's IP. I checked you code which is pretty basic. In my case X_FORWARD_FOR keeps the real visitor's IP address. In the code bellow do I have to change both REMOTE_ADDR values to X_FORWARD_FOR? I did that and it is working as expected but I would like to know your opinion.

Thank you.

<?php

/**
  * Plugin to add imap id
  *
  * @version 1.0
  * @author Cor Bosman
  */

class dovecot_ident extends rcube_plugin 
{

  function init()
  {
    $this->add_hook('storage_connect', array($this, 'add_ident'));
  }

  function add_ident($args)
  {
    $args['ident'] = $args['ident'] ? array_merge($args['ident'], array('x-originating-ip' => $_SERVER['REMOTE_ADDR']))
                                    : array('x-originating-ip' => $_SERVER['REMOTE_ADDR']);
    return $args;
  }
}

?>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.