Re: [Courier-imap] Imaplogin - lastauth

2008-07-03 Thread abrace
 Jeronimo,
 Change your LDAP schema to add an attribute
called LastMailCheckTime (or any other name you would like).
 You can then add this code to the
auth_ldap_do3 function in  authldaplib.c after the authentication bind
is successful. Note that I do an async ldap_modify so that authdaemon
does not block waiting on the modify.
I wrote this up quick so you may want to
double check it. Any questions, let me know.
 ---Aaron
 LDAPMod
*mod_ctime_send[2];
LDAPMod
mod_ctime_up;
char
*ctime_attribute_name=LastMailCheckTime;
char
ctime_value[512];
char
*mod_update_vals[2];
 
   time_t m_check_time;
 
   m_check_time=time(NULL);
   
mod_ctime_send[0]=mod_ctime_up;
   
mod_ctime_send[1]=0;
   
sprintf(ctime_value,%u,(unsigned int) m_check_time);
   
mod_ctime_up.mod_op=LDAP_MOD_REPLACE;
   
mod_ctime_up.mod_type=ctime_attribute_name;
   
mod_ctime_up.mod_values=mod_update_vals;
   
mod_update_vals[0]=ctime_value;
   
mod_update_vals[1]=NULL;
//ASYNCHRONUS
UPDATE
   
ldap_modify(bindp, dn, mod_ctime_send);
 On Thu 07/03/08 16:57 , Jeronimo Zucco [EMAIL PROTECTED] sent:
  wrote: 
  Carlos, 
  
  Why not make a small LDAP schema change and
perform an 
  ldap modify? You can place that code right in authdaemon. That is
what 
  I did and it has worked fine for years with more than 75,000
mailboxes. 
 This is what I would like to do in my courier setup. How did you
do 
 it? Can you give some information about it ? 
 Thanks 
 --  
 Jeronimo Zucco 
 LPIC-1 Linux Professional Institute Certified 
 NĂșcleo de Processamento de Dados 
 Universidade de Caxias do Sul 
 http://jczucco.blogspot.com 
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap


Re: [Courier-imap] Deny imap, allow pop3

2006-12-08 Thread abrace
Eduardo,

We use a firewall to solve this issue. We only allow IMAP from the
webmail server's IP address. In the event webmail runs on the same
box as IMAP, that would be 127.0.0.1. You could also use an SW
based firewall such as IPF on Solaris or FreeBSD, or Iptables on
Linux.

Probably not the answer you are looking for, but sometimes simple
solutions are missed so I thought I'd mention it.

---Aaron



 Guys, the issue I'm having here is that I want to:

 Default - allow only pop3 for all users
 Exception - some users will be able to use imap (webmail)

 I have tried using MYSQL_WHERE_CLAUSE imapok=1 (created it and set it
 up in mysql) in authmysqlrc (courier-authlib), but I figured it would
 block also pop3 (as I thought). So it means both pop3 and imap logins
 are checked against that same CLAUSE. How could I separate it, so that
 I have a separate flag for imap?

 Options I have so far:
 1) modify webmail's source (better than next option)
 2) modify courier's source (wouldn't like to but...)
 3) some other flag/option I missed?? (hopefully)

 Best regards,

 --
 Eduardo  Bacchi Kienetz
 LPI Certified - Level 2
 http://www.noticiaslinux.com.br/eduardo/

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share
 your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Courier-imap mailing list
 Courier-imap@lists.sourceforge.net
 Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap