[Dovecot] post-login script and original remote ip in proxy mode

2013-05-27 Thread Ibrahim Harrani
Hi,

I am running dovecot on 3 qmail-ldap server backend.
dovecot configured to use auth_pop3 wrapper for authentication.
Users logins to the  qmail-ldap pop3&imap pools randomly. If a user is
mailhost is not the connected server, dovecot proxies the connection to the
user mailhost. In this case, I can not get the original client IP address
via post-logins script on user host. I see only the first connected server
IP as $IP environment.

Any idea to get original client IP in this setup with postlogin scripts?


Thanks


[Dovecot] master user auth problem

2012-08-13 Thread Ibrahim Harrani
Hi,

I tried to setup a master auth authentication. I also use
auth_pop3wrapper to authenticate from qmail-ldap. But I could not
login with master user.

Here is the config.
auth_master_user_separator = *
passdb {
  driver = passwd-file
  args = /usr/local/etc/dovecot/passwd.masterusers
  master = yes
  pass = yes
}


  passdb  {
# Path for checkpassword binary
driver = checkpassword
args = /var/qmail/bin/auth_popwrapper
  }
userdb {
driver =  prefetch
 }

cat /opt/surmail/etc/dovecot/passwd.masterusers
user:{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

The log:

#telnet localhost 143

Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE STARTTLS AUTH=PLAIN] SurGATE Messaging Suite POP3/IMAP ready.
o login u...@domain.com*user password
o NO [AUTHORIZATIONFAILED] Authorization failed


Aug 09 16:17:44 auth: Debug:
auth(user,127.0.0.1,master,): Master user lookup for
login: u...@domain.com
Aug 09 16:17:44 auth: Debug:
passwd-file(user,127.0.0.1,master,): lookup:
user=user file= /usr/local/etc/dovecot/passwd.masterusers
Aug 09 16:17:44 auth: Info:
passdb(user,127.0.0.1,master,): Master user logging
in as u...@domain.com
Aug 09 16:17:44 auth: Debug:
checkpassword(u...@domain.com,127.0.0.1,):  execute:
/var/qmail/bin/auth_popwrapper
/usr/local/dovecot/libexec/dovecot/checkpassword-reply
Aug 09 16:17:44 auth: Debug:
checkpassword(u...@domain.com,127.0.0.1,): Received
input:
Aug 09 16:17:44 auth: Debug:
checkpassword(u...@domain.com,127.0.0.1,):
exit_status=3
Aug 09 16:17:44 auth: Info:
checkpassword(u...@domain.com,127.0.0.1,): Login
failed (status=3)
Aug 09 16:17:46 auth: Debug: client out: FAIL   1
user=u...@domain.com authz
Aug 09 16:18:08 auth: Debug: client in: AUTH2   PLAIN
service=imapsecured session=KmGNDdXGrwB/AAABlip=127.0.0.1
 rip=127.0.0.1   lport=143   rport=48047 resp=


Re: [Dovecot] "Waiting for authentication process to respond" for invalid users with auth_dovecot

2011-09-29 Thread Ibrahim Harrani
Hi Timo,

I switched to auth_pop wrapper to solve the problem.
I agree that there is something wrong with auth_dovecot.

Thanks.

On Fri, Sep 16, 2011 at 4:11 PM, Timo Sirainen  wrote:
> On Tue, 2011-09-13 at 13:53 +0300, Ibrahim Harrani wrote:
>
>> I am testing dovecot 2.0.13 and 2.0.14 with qmail-ldap and
>> auth_dovecot patch. If i login to dovecot (pop3/imap) with correct
>> user and password.
>> no problem, I can login immediately. but if I try with nonexistant
>> user, dovecot does not immediate answer, wait for a while and says
>> "Waiting for authentication process to respond."
>> auth_dovecot process remains working in the background.
>> How can I avoid this situation?
>
> If auth_dovecot process keeps running, the bug is in auth_dovecot. I've
> never looked at it (or probably even heard of it).
>
>
>


[Dovecot] "Waiting for authentication process to respond" for invalid users with auth_dovecot

2011-09-13 Thread Ibrahim Harrani
Hi,

I am testing dovecot 2.0.13 and 2.0.14 with qmail-ldap and
auth_dovecot patch. If i login to dovecot (pop3/imap) with correct
user and password.
no problem, I can login immediately. but if I try with nonexistant
user, dovecot does not immediate answer, wait for a while and says
"Waiting for authentication process to respond."
auth_dovecot process remains working in the background.
How can I avoid this situation?

# telnet 0 143
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
o login validuser validpass
o OK [CAPABILITY IMAP4rev1 LITERAL+ SASL

o login validuser wrongpass
o NO [UNAVAILABLE] Temporary authentication failure.

o login non-existant anypass
* OK Waiting for authentication process to respond..


Here is output of dovecot -n

# OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final)
auth_debug = yes
auth_verbose = yes
base_dir = /var/run/dovecot
disable_plaintext_auth = no
first_valid_gid = 100
last_valid_gid = 65000
last_valid_uid = 65000
listen = *
log_path = /var/log/dovecot
mail_debug = yes
mail_location = maildir:~/Maildir
passdb {
  args =/opt/qmail/smtp/bin/auth_dovecot ./Maildir/
  driver = checkpassword
}
plugin {

  mechanisms = plain login
  quota = maildir

}
protocols = imap pop3
service imap-login {
  inet_listener imaps {
port = 993
ssl = yes
  }
  process_min_avail = 1
}
service imap-postlogin {
  executable = script-login /opt/qmail/scripts/dovecotpostlogin.sh
}
service imap {
  executable = imap imap-postlogin
}
service pop3-login {
  inet_listener pop3s {
port = 995
ssl = yes
  }
  process_min_avail = 1
}
ssl_cert = 

Re: [Dovecot] push mail support

2010-04-09 Thread Ibrahim Harrani
Hi Robert,

I am testing dovecot imap idle feature on Nokia N97 with profimail client
3.X
I configured profimail to use imap-idle
I enabled "use push email" option and set IDLE ping time 5 min
imap_idle_notify_interval=120
Here is the explanation of profimail parameters.

   - *Use Push email* - enable or disable Push email (IMAP IDLE) connection
   mode on this account.
   - *IDLE ping time* - tweak settings for keeping IMAP IDLE connection
   alive. By default you don't need to change this. You may set it lower if
   your mail server closes IDLE connection after shorter time.

Profimail works fine after configuring for a while. It receives mails from
imap successfuly but after 5-10 minutes later profimail gets "*failed to
connect(time out)*" error.
There are following entires in the /var/log/maillog

*dovecot: IMAP(user): Connection closed: Connection reset by peer bytes*

I could not find the root cause of the problem. I changed IDLE ping time
from 1 to 10 on the phone. Unfortunately the result is the same. It gets
timeout error after working short time.
Should I change imap_idle_notify_interval or any other parameter in server
side?

Thanks

On Thu, Apr 8, 2010 at 8:23 PM, Thomas Leuxner  wrote:

> Am 08.04.2010 um 18:16 schrieb Robert Tomanek:
>
> > And in fact k9mail on Android works great (really!) for me, too.
>
> Hey Robert,
>
> all hail Dovecot and K-9 then :P
>
> Cheers
>


Re: [Dovecot] push mail support

2010-04-08 Thread Ibrahim Harrani
Hi Thomas,

What do you mean with "this" is it z-push?

I do not have any experince about push mail and mobile devices.
I read some documents and I am a little bit confused. If I understood
correctly(most probable not :))
Someone says that dovecot IMAP-IDLE solution is enough without installing
anything else.
other one says you have to install z-push.
Are these two solution alternative to each other or they complete each
other?



Thanks.

On Thu, Apr 8, 2010 at 11:05 AM, Thomas Leuxner  wrote:

> On Thu, Apr 08, 2010 at 01:35:41AM +0300, Ibrahim Harrani wrote:
> > Hello,
> >
> > I would like to use push in qmail+dovecot environments. Can someone tell
> me
> > which components
> > should I use to enable this feature for mobile devices?
> >
> > Thanks.
> > -Ibrahim.
> Hi,
>
> this works fine with mobile clients that support IMAP IDLE. Using it with
> K-9 on Android devices and it works like a charm.
>
> Regards
> Thomas
>


[Dovecot] push mail support

2010-04-07 Thread Ibrahim Harrani
Hello,

I would like to use push in qmail+dovecot environments. Can someone tell me
which components
should I use to enable this feature for mobile devices?

Thanks.
-Ibrahim.


Re: [Dovecot] Dovecot vs Exim file locking

2009-12-21 Thread Ibrahim Harrani
Hi,

I am trying to deploy large e-mail system but I will use qmail-ldap on Linux
and maildir will be mounted by all backends from Netapp via NFS.

In LDAP, there will be only one mailhost entry. All qmail-ldap backends will
have same name and will run dovecot instance. So, all users can access to
mailbox from any server in the pool.  If I distribute users with different
mailhosts and if one mailhost server is down,
the users will not able to access their mailbox until fix the problem or
change mailhost entry with working one.

But I don't know the NFS issues in my planned setup. Do you think that I
will face
same NFS locks/problem(OS based) with Netapp NFS?

Thanks in advance.

On Mon, Dec 21, 2009 at 9:15 AM, Daniel Campos  wrote:

> Hi Ecuardo,Timo, thanks for your answers!
>
> -Mensaje original-
> De: Timo Sirainen [mailto:t...@iki.fi]
> Enviado el: viernes, 18 de diciembre de 2009 15:30
> Para: Daniel Campos
> CC: dovecot@dovecot.org
> Asunto: Re: [Dovecot] Dovecot vs Exim file locking
>
> On Dec 18, 2009, at 8:41 AM, Daniel Campos wrote:
>
> > We're planning to deploy a large e-mail system storing maildirs in a NAS
> > system through NFS. One of the options we're thinking on is using
> > Dovecot+EXIM.
> >
> > As far as I've read in both project's documentation, both services
> implement
> > locking allowing multiple servers to access the same maildirs in order to
> > distribute the service load.
>
> Mail deliveries don't require any locks with maildir. But for Dovecot, be
> sure to read http://wiki.dovecot.org/NFS
>
>
> __ Informacisn de NOD32, revisisn 4704 (20091220) __
>
> Este mensaje ha sido analizado con NOD32 antivirus system
> http://www.nod32.com
>
>
>


[Dovecot] maillog plugin issue

2009-05-23 Thread Ibrahim Harrani
Hello,

I just installed dovecot 1.2-rc4 on FreeBSD with qmail and vpopmail. I
am using roundcube webmail to test(read,delete,move mails)

I configured mail-log plugin according to
http://wiki.dovecot.org/Plugins/MailLog
log fields:
  mail_log_fields: uid box msgid size
 This but in the log file I only that something like that.

May 23 15:37:14 IMAP(t...@mydomain.com): 127.0.0.1 Info: copy: uids=7,
box=Spam, dest=Spam, size=540
May 23 15:37:14 IMAP(t...@mydomain.com): 127.0.0.1 Info: delete: uids=7
May 23 15:37:14 IMAP(t...@mydomain.com): 127.0.0.1 Info: expunge:
uids=7, size=540
May 23 15:37:14 IMAP(t...@mydomain.com): 127.0.0.1 Info: Disconnected:
Logged out bytes=205/1558

I don't see msgid etc? Also I added flag_change to mail_log_events
and  from, subject, flags to mail_log_fields.
I don't see anything about from, subject, flags etc. I only see the
following lines.

May 23 15:05:49 mail dovecot: IMAP(t...@mydomain.com): flag_change: uids=5
May 23 15:05:49 mail dovecot: IMAP(t...@mydomain.com): Disconnected:
Logged out bytes=168/1027




Here is my config. Did I miss something?

dovecot -n
# 1.2.rc4: /opt/mail/imap/etc/dovecot.conf
# OS: FreeBSD 6.3-RELEASE-p9 amd64
log_path: /var/log/dovecot.log
protocols: imap pop3
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /opt/mail/imap/libexec/dovecot/imap-login
login_executable(imap): /opt/mail/imap/libexec/dovecot/imap-login
login_executable(pop3): /opt/mail/imap/libexec/dovecot/pop3-login
login_greeting: Welcome
first_valid_uid: 89
mail_debug: yes
mail_executable(default): /opt/mail/imap/libexec/dovecot/imap
mail_executable(imap): /opt/mail/imap/libexec/dovecot/imap
mail_executable(pop3): /opt/mail/imap/libexec/dovecot/pop3
mail_plugins(default): mail_log
mail_plugins(imap): mail_log
mail_plugins(pop3): quota mail_log
mail_plugin_dir(default): /opt/mail/imap/lib/dovecot/imap
mail_plugin_dir(imap): /opt/mail/imap/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/mail/imap/lib/dovecot/pop3
mail_log_prefix: %Us(%u): %r
mail_log_max_lines_per_sec: 0
auth default:
  passdb:
driver: vpopmail
  userdb:
driver: passwd
  userdb:
driver: vpopmail
plugin:
  mail_log_events: delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_group_events:
  mail_log_fields: uid box msgid size
  quota: maildir