Re: [vchkpw] imap before smtp

2009-09-21 Thread Christopher Chan

Tom Collins wrote:
Even if it's possible to set up imap-before-smtp, you'll be much better 
off if you have your clients use SMTP AUTH instead. More reliable, more 
predictable, and supported by almost every email client out there.


If you really want to try it, consider Dovecot instead of Courier. I 
think dovecot uses vchkpw, and is probably going to be easier to configure.



dovecot for smtp-auth. dovecot has vpopmail bindings AND sasl support. 
You won't need courier-auth or courier-imap anymore. postfix has support 
for dovecot-sasl. If you are using something else...I have not tried them.


!DSPAM:4ab8227f32711201751689!



Re: [vchkpw] imap before smtp

2009-09-17 Thread Juan Enciso
One queston,  Why don't use SMTP-AUTH?
I'm using SMTP-AUTH from SpamControl
http://www.fehcom.de/qmail/spamcontrol.html

http://www.fehcom.de/qmail/spamcontrol.htmlIt works good


On Thu, Sep 17, 2009 at 1:51 AM, kengheng kengh...@mysql.cc wrote:

 Dear All, would like to check if there is anyway to do imap before smtp
 relay ? I'm using courier-authlib-0.60.2 with courier-imap.

 Thanks.

 --
 Best regards,
 KengHeng. Chan
 Mobile : +6-016-717-0273
 SQL Technology Sdn Bhd
 http://www.mysql.cc
 c...@mysql.cc

 




-- 
Juan Enciso Condeña
Teléfono: (511) 3238504
E-mail: juan.enc...@gmail.com
MSN: juan_enc...@hotmail.com


!DSPAM:4ab23e5632715567853773!


Re: [vchkpw] imap before smtp

2009-09-17 Thread Tom Collins
Even if it's possible to set up imap-before-smtp, you'll be much  
better off if you have your clients use SMTP AUTH instead. More  
reliable, more predictable, and supported by almost every email client  
out there.


If you really want to try it, consider Dovecot instead of Courier. I  
think dovecot uses vchkpw, and is probably going to be easier to  
configure.


-Tom

On Sep 16, 2009, at 11:51 PM, kengheng kengh...@mysql.cc wrote:

Dear All, would like to check if there is anyway to do imap before  
smtp relay ? I'm using courier-authlib-0.60.2 with courier-imap.


Thanks.

--
Best regards,
KengHeng. Chan
Mobile : +6-016-717-0273
SQL Technology Sdn Bhd
http://www.mysql.cc
c...@mysql.cc





!DSPAM:4ab244f532711143630341!



Re: [vchkpw] IMAP before SMTP

2005-11-11 Thread Rick Macdougall

Nicklas Bondesson wrote:

I'm having a hard time getting IMAP before SMTP to work.

It seems like the remote ip address is not visible to get_remote_ip() in
vpopmail. I'm using qmail, vpopmail with a mysql backend and Courier-IMAP
(v3.0.8). 


Problem:

The remote ip is not inserted into the relay table. If I check the lastauth
table i only get imap in the remote_ip field.

Any ideas?



Hi,

It is not possible at all with the 4.x series of Courier-imap.  I'm not 
sure about the 3.x series or maybe Binc Imap.


Regards,

Rick



RE: [vchkpw] IMAP before SMTP

2005-11-11 Thread Nicklas Bondesson
I was able to get it working after i recompiled courier-imap.

Thanks,

Nicklas B

 -Original Message-
 From: Rick Macdougall [mailto:[EMAIL PROTECTED] 
 Sent: den 12 november 2005 00:28
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] IMAP before SMTP
 
 Nicklas Bondesson wrote:
  I'm having a hard time getting IMAP before SMTP to work.
  
  It seems like the remote ip address is not visible to 
 get_remote_ip() 
  in vpopmail. I'm using qmail, vpopmail with a mysql backend and 
  Courier-IMAP (v3.0.8).
  
  Problem:
  
  The remote ip is not inserted into the relay table. If I check the 
  lastauth table i only get imap in the remote_ip field.
  
  Any ideas?
  
 
 Hi,
 
 It is not possible at all with the 4.x series of 
 Courier-imap.  I'm not sure about the 3.x series or maybe Binc Imap.
 
 Regards,
 
 Rick
 
 
 




Re: [vchkpw] IMAP before SMTP

2005-11-11 Thread Jack Kerouac
 The remote ip is not inserted into the relay table. If I check the
 lastauth
 table i only get imap in the remote_ip field.

 
 It is not possible at all with the 4.x series of Courier-imap.  I'm not
 sure about the 3.x series or maybe Binc Imap.

Works fine with BincIMAP (which, IMHO, is a way saner IMAP than 
Courier).

--
Jack


Re: [vchkpw] IMAP before SMTP

2005-11-11 Thread Rick Macdougall

Nicklas Bondesson wrote:

I was able to get it working after i recompiled courier-imap.



Hi,

Just for my personal info, what version of courier-imap was it ?

Rick



RE: [vchkpw] IMAP before SMTP

2005-11-11 Thread Nicklas Bondesson
Courier-IMAP 3.0.8 (the last one in the 3.x series).

Thanks,

Nicklas B

 -Original Message-
 From: Rick Macdougall [mailto:[EMAIL PROTECTED] 
 Sent: den 12 november 2005 00:59
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] IMAP before SMTP
 
 Nicklas Bondesson wrote:
  I was able to get it working after i recompiled courier-imap.
  
 
 Hi,
 
 Just for my personal info, what version of courier-imap was it ?
 
 Rick
 
 
 




Re: [vchkpw] IMAP before SMTP

2005-11-11 Thread Michael Bowe
 Original Message - 


From: Rick Macdougall [EMAIL PROTECTED]




Nicklas Bondesson wrote:

I'm having a hard time getting IMAP before SMTP to work.

It seems like the remote ip address is not visible to get_remote_ip() in
vpopmail. I'm using qmail, vpopmail with a mysql backend and Courier-IMAP
(v3.0.8). Problem:

The remote ip is not inserted into the relay table. If I check the 
lastauth

table i only get imap in the remote_ip field.

Any ideas?



Hi,

It is not possible at all with the 4.x series of Courier-imap.  I'm not 
sure about the 3.x series or maybe Binc Imap.



( 
http://www.pipeline.com.au/staff/mbowe/isp/webmail-server.htm#ROAMING_USERS  
)


IMAP-before-SMTP is possible when using Courier-IMAP v3.x. However it only 
works when configured --with-authvchkpw --without-authdaemon. When 
running --without-authdaemon, Courier-IMAP's authvchkpw code is able to make 
use of vpopmail's roaming user functions to allow IMAP-before-SMTP 
functionality. IMAP-before-SMTP is not possible when Courier-IMAP has been 
complied --with-authdaemon, because in this mode the user's IP address is 
not made available to the authvchkpw code (via the TCPREMOTEIP env var). 
Also note that in Courier-IMAP v4.x and later, --without-authdaemon 
functionality is no longer available thus preventing IMAP-before-SMTP from 
working.


Michael.



Re: [vchkpw] imap before smtp

2003-09-15 Thread Tim
On Thu, Sep 11, 2003 at 01:40:02PM -0700, Tom Collins wrote:
 mr. varshavchik addressed this on the sqwebmail mailing list:

 http://www.mail-archive.com/[EMAIL PROTECTED]/msg06068.html
 
 it's a lovely little rant.
 
 As of vpopmail 5.3.8, the buffers are cleared properly and the 
 authdaemon has worked just fine.  A beta 5.2.2 release is on 
 SourceForge with the same fix in place.

  Is there any change between 5.3.5 and 5.3.8 that is relevant to this?
It is not obvious from the ChangeLog.  I've been running 5.2.1 and
authdaemon with just the parse_email() patch (I am the author of the
patch) without any problems.  We have a very small installation though.

  Also my patch doesn't clear the buffer, just making sure that the
buffer is always terminated properly.  Let me know if I am missing
something.

  Thanks,

  Tim



Re: [vchkpw] imap before smtp

2003-09-15 Thread Michael Bowe
- Original Message - 
From: Tim [EMAIL PROTECTED]
To: Tom Collins [EMAIL PROTECTED]
Cc: vpopmail list [EMAIL PROTECTED]
Sent: Monday, September 15, 2003 6:09 PM
Subject: Re: [vchkpw] imap before smtp


 On Thu, Sep 11, 2003 at 01:40:02PM -0700, Tom Collins wrote:
  mr. varshavchik addressed this on the sqwebmail mailing list:
 
  http://www.mail-archive.com/[EMAIL PROTECTED]/msg06068.html
  
  it's a lovely little rant.
 
  As of vpopmail 5.3.8, the buffers are cleared properly and the
  authdaemon has worked just fine.  A beta 5.2.2 release is on
  SourceForge with the same fix in place.

   Is there any change between 5.3.5 and 5.3.8 that is relevant to this?
 It is not obvious from the ChangeLog.  I've been running 5.2.1 and
 authdaemon with just the parse_email() patch (I am the author of the
 patch) without any problems.  We have a very small installation though.

   Also my patch doesn't clear the buffer, just making sure that the
 buffer is always terminated properly.  Let me know if I am missing
 something.

Hi Tim

Your updates to parse_email() that were included with vpopmail-5.3.5 is
definitely the solution to the courier problem

As you say, prior to your fix, the username string was not getting null
terminated correctly.

The incorrect null termination resulted in problems for courier-imap when
running --with-authdaemon. This is because authdaemon runs persistently,
rather than running once per auth request.

Typically the vpopmail code isnt run in a persistent fashion. The vpopmail
tools such as vchkpw (or courier-imap --without-authdaemon) only run once
per auth request, so the incorrect termination issue never really caused a
problem because the string buffers would always be created/initialised from
scratch for each auth.

But when you ran courier --with-authdaemon, the same string buffers being
used over and over again, and the incorrectly terminated username field
would result in auth failure as soon as a shorter username came through than
the previous username.

Michael.




Re: [vchkpw] imap before smtp

2003-09-11 Thread Bill Shupp
On Thursday, September 11, 2003, at 10:53  AM, ted wrote:

I've got a LWQ-style qmail configuration, plus vpopmail 5.3.27 and 
courier-imap-2.1.1.20030902.  I have  roaming users enabled (as well 
as qmail-ext), and  POP3  before SMTP works perfectly (using  
qmail-pop3d).

IMAP also seems to work just fine, but it does not update open-smtp. 
My workaround of creating a separate POP account to POP in without 
retrieving msgs allows me to send via IMAP, but is obviously not an 
ideal solution. (I'm using Thunderbird .2).

I've installed courier-imap numerous times (with different releases up 
to 20030902), both with authdaemon enabled as well as disabled. In 
both cases, the results are the same (meaning that I can read mail but 
not relay).

Perhaps my understanding is wrong, but I was under the impression that 
since these are virtual domains I'm having trouble with (all my 
domains are virtual), the fact that I am able to read mail at all 
under IMAP would indicate that vchkpw is being called from 
courier-imap. Since qmail-pop3d invokes vchkpw and works, I'm puzzled. 
I'm afraid I don't know where to look log-wise.
Probably the same old problem of courier not detecting roaming users.. 
Try this:

cd (patth to courier)
(cd authlib ; make clean)
export CFLAGS=-DHAVE_OPEN_SMTP_RELAY
make
make install


Regards,

Bill




Re: [vchkpw] imap before smtp

2003-09-11 Thread Charles Sprickman
This is a good FAQ item, for when we have a FAQ.

Mr. Sam has disabled the imap-before-smtp function in the authvchkpw code.
I've looked at the courier archives, and there's no explanation from him
as to what the problem is...  Just lots of questions. :)

Bill's suggestion might not work, as he #undefs the value.  In your
courier source dir, go into the authlib dir and open preauthvchkpw.c
for editing.  Look for a line like this:

#undef HAVE_OPEN_SMTP_RELAY

Go ahead and change that #undef to #define and it will work properly.
I can't comment on what the security concerns are, because I don't know
what they are.  It does work however.

Charles

On Thu, 11 Sep 2003, ted wrote:

 I've got a LWQ-style qmail configuration, plus vpopmail 5.3.27 and
 courier-imap-2.1.1.20030902.  I have  roaming users enabled (as well as
 qmail-ext), and  POP3  before SMTP works perfectly (using  qmail-pop3d).

 IMAP also seems to work just fine, but it does not update open-smtp. My
 workaround of creating a separate POP account to POP in without
 retrieving msgs allows me to send via IMAP, but is obviously not an
 ideal solution. (I'm using Thunderbird .2).

 I've installed courier-imap numerous times (with different releases up
 to 20030902), both with authdaemon enabled as well as disabled. In both
 cases, the results are the same (meaning that I can read mail but not
 relay).

 Perhaps my understanding is wrong, but I was under the impression that
 since these are virtual domains I'm having trouble with (all my domains
 are virtual), the fact that I am able to read mail at all under IMAP
 would indicate that vchkpw is being called from courier-imap. Since
 qmail-pop3d invokes vchkpw and works, I'm puzzled. I'm afraid I don't
 know where to look log-wise.

 thanks for any hints.

 -ted






Re: [vchkpw] imap before smtp

2003-09-11 Thread Ken Jones
The preauthvchkpw.c module needs to be modified.
The problem is, when a user attempts to authenticate,
if their user name exists on the system then it will
open up relay. However, at that point in the code the
user has not been authenticated. I attempted to fix
this before but became confused on which function
is called from what file. It's a bit obtuse for me. 

an quick hack could be to verify the password at
that point, then open up relay on a valid password.

The real fix would be to trace the fucntions and
open up relay after password verification.

Perhaps someone could figure it out.

Ken Jones


On Thursday 11 September 2003 2:35 pm, Charles Sprickman wrote:
 This is a good FAQ item, for when we have a FAQ.

 Mr. Sam has disabled the imap-before-smtp function in the authvchkpw code.
 I've looked at the courier archives, and there's no explanation from him
 as to what the problem is...  Just lots of questions. :)

 Bill's suggestion might not work, as he #undefs the value.  In your
 courier source dir, go into the authlib dir and open preauthvchkpw.c
 for editing.  Look for a line like this:

 #undef HAVE_OPEN_SMTP_RELAY

 Go ahead and change that #undef to #define and it will work properly.
 I can't comment on what the security concerns are, because I don't know
 what they are.  It does work however.

 Charles

 On Thu, 11 Sep 2003, ted wrote:
  I've got a LWQ-style qmail configuration, plus vpopmail 5.3.27 and
  courier-imap-2.1.1.20030902.  I have  roaming users enabled (as well as
  qmail-ext), and  POP3  before SMTP works perfectly (using  qmail-pop3d).
 
  IMAP also seems to work just fine, but it does not update open-smtp. My
  workaround of creating a separate POP account to POP in without
  retrieving msgs allows me to send via IMAP, but is obviously not an
  ideal solution. (I'm using Thunderbird .2).
 
  I've installed courier-imap numerous times (with different releases up
  to 20030902), both with authdaemon enabled as well as disabled. In both
  cases, the results are the same (meaning that I can read mail but not
  relay).
 
  Perhaps my understanding is wrong, but I was under the impression that
  since these are virtual domains I'm having trouble with (all my domains
  are virtual), the fact that I am able to read mail at all under IMAP
  would indicate that vchkpw is being called from courier-imap. Since
  qmail-pop3d invokes vchkpw and works, I'm puzzled. I'm afraid I don't
  know where to look log-wise.
 
  thanks for any hints.
 
  -ted




Re: [vchkpw] imap before smtp

2003-09-11 Thread Paul Theodoropoulos
mr. varshavchik addressed this on the sqwebmail mailing list:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg06068.html

it's a lovely little rant.

At 12:35 PM 9/11/2003, Charles Sprickman wrote:
This is a good FAQ item, for when we have a FAQ.

Mr. Sam has disabled the imap-before-smtp function in the authvchkpw code.
I've looked at the courier archives, and there's no explanation from him
as to what the problem is...  Just lots of questions. :)
Bill's suggestion might not work, as he #undefs the value.  In your
courier source dir, go into the authlib dir and open preauthvchkpw.c
for editing.  Look for a line like this:
#undef HAVE_OPEN_SMTP_RELAY

Go ahead and change that #undef to #define and it will work properly.
I can't comment on what the security concerns are, because I don't know
what they are.  It does work however.
Charles

On Thu, 11 Sep 2003, ted wrote:

 I've got a LWQ-style qmail configuration, plus vpopmail 5.3.27 and
 courier-imap-2.1.1.20030902.  I have  roaming users enabled (as well as
 qmail-ext), and  POP3  before SMTP works perfectly (using  qmail-pop3d).

 IMAP also seems to work just fine, but it does not update open-smtp. My
 workaround of creating a separate POP account to POP in without
 retrieving msgs allows me to send via IMAP, but is obviously not an
 ideal solution. (I'm using Thunderbird .2).

 I've installed courier-imap numerous times (with different releases up
 to 20030902), both with authdaemon enabled as well as disabled. In both
 cases, the results are the same (meaning that I can read mail but not
 relay).

 Perhaps my understanding is wrong, but I was under the impression that
 since these are virtual domains I'm having trouble with (all my domains
 are virtual), the fact that I am able to read mail at all under IMAP
 would indicate that vchkpw is being called from courier-imap. Since
 qmail-pop3d invokes vchkpw and works, I'm puzzled. I'm afraid I don't
 know where to look log-wise.

 thanks for any hints.

 -ted



Paul Theodoropoulos
http://www.anastrophe.com




Re: [vchkpw] imap before smtp

2003-09-11 Thread ted
Charles, Bill, Ken, thanks for the quick responses. Indeed Bill's 
suggestion doesn't do the trick for my configuration. Charles, I'd make 
your suggested change, but am concerned about Ken's further input on the 
topic. I don't suppose an older version of Courier-IMAP is the answer?

-ted

Ken Jones wrote:

The preauthvchkpw.c module needs to be modified.
The problem is, when a user attempts to authenticate,
if their user name exists on the system then it will
open up relay. However, at that point in the code the
user has not been authenticated. I attempted to fix
this before but became confused on which function
is called from what file. It's a bit obtuse for me. 

an quick hack could be to verify the password at
that point, then open up relay on a valid password.
The real fix would be to trace the fucntions and
open up relay after password verification.
Perhaps someone could figure it out.

Ken Jones

On Thursday 11 September 2003 2:35 pm, Charles Sprickman wrote:
 

This is a good FAQ item, for when we have a FAQ.

Mr. Sam has disabled the imap-before-smtp function in the authvchkpw code.
I've looked at the courier archives, and there's no explanation from him
as to what the problem is...  Just lots of questions. :)
Bill's suggestion might not work, as he #undefs the value.  In your
courier source dir, go into the authlib dir and open preauthvchkpw.c
for editing.  Look for a line like this:
#undef HAVE_OPEN_SMTP_RELAY

Go ahead and change that #undef to #define and it will work properly.
I can't comment on what the security concerns are, because I don't know
what they are.  It does work however.
Charles

On Thu, 11 Sep 2003, ted wrote:
   

I've got a LWQ-style qmail configuration, plus vpopmail 5.3.27 and
courier-imap-2.1.1.20030902.  I have  roaming users enabled (as well as
qmail-ext), and  POP3  before SMTP works perfectly (using  qmail-pop3d).
IMAP also seems to work just fine, but it does not update open-smtp. My
workaround of creating a separate POP account to POP in without
retrieving msgs allows me to send via IMAP, but is obviously not an
ideal solution. (I'm using Thunderbird .2).
I've installed courier-imap numerous times (with different releases up
to 20030902), both with authdaemon enabled as well as disabled. In both
cases, the results are the same (meaning that I can read mail but not
relay).
Perhaps my understanding is wrong, but I was under the impression that
since these are virtual domains I'm having trouble with (all my domains
are virtual), the fact that I am able to read mail at all under IMAP
would indicate that vchkpw is being called from courier-imap. Since
qmail-pop3d invokes vchkpw and works, I'm puzzled. I'm afraid I don't
know where to look log-wise.
thanks for any hints.

-ted
 



 






Re: [vchkpw] imap before smtp

2003-09-11 Thread Tom Collins
On Thursday, September 11, 2003, at 01:06  PM, Paul Theodoropoulos 
wrote:
mr. varshavchik addressed this on the sqwebmail mailing list:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg06068.html

it's a lovely little rant.
Does someone have an email address for him?  I'm trying 
[EMAIL PROTECTED], hopefully it will get to him.

It would be nice to let him know that the current dev version of 
vpopmail addresses both of his concerns.

As of vpopmail 5.3.8, the buffers are cleared properly and the 
authdaemon has worked just fine.  A beta 5.2.2 release is on 
SourceForge with the same fix in place.

As of vpopmail 5.3.27, mysql login information is stored in an external 
file and libvpopmail has 644 permissions, making it possible to link it 
into courier-imap without having to run as root.

If there are any further problems that prevent courier-imap from 
working with vpopmail, we'd love to hear about them (either here or via 
bug reports to the SourceForge project).

--
Tom Collins
[EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/



Re: [vchkpw] imap before smtp

2003-09-11 Thread Bill Shupp
On Thursday, September 11, 2003, at 01:14  PM, ted wrote:

Charles, Bill, Ken, thanks for the quick responses. Indeed Bill's 
suggestion doesn't do the trick for my configuration. Charles, I'd 
make your suggested change, but am concerned about Ken's further input 
on the topic. I don't suppose an older version of Courier-IMAP is the 
answer?
I'm curious.. if you have clients capable of IMAP, are they not capable 
of SMTP-AUTH?  IMO, this is a better solution than roaming users.

Regards,

Bill