[sqwebmail] Enable Debug Logging

2004-04-09 Thread Trevor Astrope
Hello,

Does anyone know how to  enable debug logging to syslog in sqwebmail? I'm 
using sqwebmail 4.0.3.

What I did so far was to set auth_debug_login_level to 2 in 
authlib/debug.c and DEBUG_LOGIN to 2 in apache's httpd.conf. But I don't 
get any debug info in my logs.

Any help is appreciated.

Thanks,

Trevor




[sqwebmail] Quota Field

2004-03-18 Thread Trevor Astrope
Can anyone tell me how the quota field is used in sqwebmail?

I configured quotas with maildrop's maildirmake and deliver mail using
deliverquota, and sqwebmail prints the You are using % of your quota  
message when I login, even though I don't have a quota field defined in
authpgsqlrc.

So, what exactly is the quota field in authpgsqlrc used for?

Thanks,

Trevor





[sqwebmail] Escaping Punctuation

2003-09-18 Thread Trevor Astrope
Hello,

I have a problem where authentication is failing for passwords that 
contain special punctuation characters such as backslash and double-quote. 
The same passwords are handled correctly by courier-imap which is 
configured to use the same authdaemon as sqwebmail, but sqwebmail will 
return an authentication error on these passwords.

I'm using sqwebmail 3.6.0  with authpgsql.

Regards,

Trevor Astrope
[EMAIL PROTECTED]




Re: [sqwebmail] default domain

2003-08-27 Thread Trevor Astrope
On Wed, 27 Aug 2003, Tanmaya Anand wrote:

 hi
 
 I want that user should only type his user name,  he should be logged in.
 For example, [EMAIL PROTECTED] , when opens mail.abc.com/cgi-bin/sqwebmail
  or abc.con/cgi-bin/sqwebmail, he should only supply his username user1 
  not complete [EMAIL PROTECTED]

This is how I did it. Using the logindomainlist was not an option for me,
since I have 5000 virtual domains already configured with unique
usernames, so having them all listed in logindomainlist was not practical
and seems like a spammer's honeypot to me. Also, I needed pop to use the
same authentication method, so it wasn't practical to force 5000 users to
change their email configurations to include the domain in their pop
configurations.

What I did was to use an sql database, in my case postgresql, since we already 
use postgresql extensively and have a dedicated postgresql server. In 
order to accomplish this, I had to use a custom query. The id field 
contains the unique username, but the query returns a field I called 
'email' which contains the [EMAIL PROTECTED] form of the email address.

Using unique usernames in the id field should be enough, but the problem
is if the id field only contains a username and no @domain, sqwebmail will
append the server's hostname or the value of
/usr/local/share/sqwebmail/hostname to the username to form the email
address.

I had to also define the DEFAULT_DOMAIN in authpgsqlrc, because the custom 
query requires that a domain name be sent to sqwebmail or it won't attempt 
the query. So, I just used example.com, but I never use the $(domain) 
variable. It is just there to make sqwebmail happy.

Here is an example query...Mine does some joins with some existing 
customer tables, but this is enough to get it working:

PGSQL_SELECT_CLAUSE SELECT email, crypt, '', uid, gid, \
   home, maildir, '', name \
FROM passwd \
WHERE id = '$(local_part)'

Just adjust it to your own configuration.

I also compiled courier-imap with 
--with-authdaemonvar=/usr/local/share/sqwebmail/var/authdaemon so pop3d 
and sqwebmail share the same authdaemon. Now, if pop3d could use the same 
sqwebmail cache as well, that would be fantastic, but this doesn't seem 
possible, as courier-imap doesn't use a cache.

One other thing I do is send  a hangup signal to the authdaemon every hour 
to prevent the persistent db connections from timing out, as we use a 
stateful firewall between the webmail server and our database server. I 
added this line to the /etc/cron.hourly/sqwebmail-cron-cleancache script:

kill -HUP `cat /usr/local/share/sqwebmail/var/authdaemon/pid`

It's not pretty, but it works.

I hope this helps someone else.

Trevor




[sqwebmail] Database Connection Timeouts

2003-08-20 Thread Trevor Astrope
Hello,

Our database machine is behind a stateful firewall and I've been noticing
that the sqwebmail db connections are being timed out by the firewall. Is
it possible for sqwebmail to use a keepalive or ping mechanism to keep the
connection alive? Or could sqwebmail be configured to establish a new db
connection after a defined timeout (hardtimeout)?

Thanks,

Trevor




[sqwebmail] Re: CustomQuery

2003-08-18 Thread Trevor Astrope
Just to follow-up on my previous post, I did some experimenting and if you 
use a custom query and do not include an '@' in the userId, sqwebmail will 
not even send the query to the db!

Does anyone know how to:

1. Force sqwebmail to submit a custom query to the db even if the username
does not contain a '@'?

2. Use the complete username field as sent by the login screen, instead of
just $(local_part) and $(domain)...Maybe $(local_part) would contain it if
sqwebmail submitted the query?

If this requires code changes to sqwebmail, we would be willing to pay for 
a patch.

The above is using sqwebmail 3.6.0.


Thanks,

Trevor

On Sun, 17 Aug 2003, Trevor Astrope wrote:

 Hi,
 
 I'm using authpgsql with sqwebmail with a custom query. The main reason 
 I'm using the custom query is because the id field I use doesn't contain 
 the [EMAIL PROTECTED], but just a unique username. So my custom query returns a 
 different field I call email instead of the id field. The email field 
 contains the [EMAIL PROTECTED] This is so I get the virtual domain instead of 
 the [EMAIL PROTECTED] in the sqwebmail pages.
 
 I know I can just use [EMAIL PROTECTED] in the id field, but I need it to be
 backward compatible with the existing system with courier-imap's pop3d,
 which also uses authpgsql, but the built-in query, since all userId's are
 unique and I don't need the domain returned.
 
 Now, what I'd like to do is have the pop3d use the authdaemon from 
 sqwebmail to reduce the number of db hits. So my questions are:
 
 1. Is it possible to make the authdaemon with courier-imap cache like the 
 sqwebmail authdaemon?
 
 2. Is  there a variable besides $(local_part) and $(domain) that I can use 
 with the custom query in sqwebmail, like $(id) that contains the whole 
 userId field? This way, I could have pop3d use the sqwebmail authdaemon 
 socket.
 
 I tried using $(local_part) in my custom query, but it doesn't seem to 
 work if the username doesn't contain an '@' in it.
 
 Like I said, all the userId's are unique, so I'd like to be able to 
 authenticate without having to specify the [EMAIL PROTECTED] in a custom query. 
 Is this possible?
 
 Thanks,
 
 Trevor
 
 

Regards,

Trevor Astrope
[EMAIL PROTECTED]




[sqwebmail] CustomQuery

2003-08-17 Thread Trevor Astrope
Hi,

I'm using authpgsql with sqwebmail with a custom query. The main reason 
I'm using the custom query is because the id field I use doesn't contain 
the [EMAIL PROTECTED], but just a unique username. So my custom query returns a 
different field I call email instead of the id field. The email field 
contains the [EMAIL PROTECTED] This is so I get the virtual domain instead of 
the [EMAIL PROTECTED] in the sqwebmail pages.

I know I can just use [EMAIL PROTECTED] in the id field, but I need it to be
backward compatible with the existing system with courier-imap's pop3d,
which also uses authpgsql, but the built-in query, since all userId's are
unique and I don't need the domain returned.

Now, what I'd like to do is have the pop3d use the authdaemon from 
sqwebmail to reduce the number of db hits. So my questions are:

1. Is it possible to make the authdaemon with courier-imap cache like the 
sqwebmail authdaemon?

2. Is  there a variable besides $(local_part) and $(domain) that I can use 
with the custom query in sqwebmail, like $(id) that contains the whole 
userId field? This way, I could have pop3d use the sqwebmail authdaemon 
socket.

I tried using $(local_part) in my custom query, but it doesn't seem to 
work if the username doesn't contain an '@' in it.

Like I said, all the userId's are unique, so I'd like to be able to 
authenticate without having to specify the [EMAIL PROTECTED] in a custom query. 
Is this possible?

Thanks,

Trevor




[sqwebmail] Custom Headers

2003-07-25 Thread Trevor Astrope
This is more of a qmail question, but I was wondering how to go about 
adding custom headers in the sendit.sh script? I'm using qmail-inject.

Thanks,

Trevor




[sqwebmail] Re: Problem Sending Mail

2003-07-21 Thread Trevor Astrope
I just wanted to follow-up on this...

It seems the problem I described below only happens using lynx. I can live
with this, but it was my understanding that the major functionality was
available using lynx, but on further reading, it only says, most
functionality is accessible from lynx.

From the NEWS file:

 * Javascript and cookies are not required. Most of the functionality
   is  accessible  from  Lynx.  (There  is some Javascript and cookie
   usage for value-added features, such as print preview).
 
Maybe you can update this to say that there are problems sending mail 
using lynx?

I'm using lynx 2.8.4 on red hat 7.3.

Thanks,

Trevor

On Fri, 18 Jul 2003, Trevor Astrope wrote:

 Hello,
 
 I'm using sqwebmail 3.5.3 (authpgsql) with qmail 1.03. I can read and pop 
 mail just fine, but I'm having a strange problem sending mail...
 
 THe first time I login to sqwebmail and send a message, everything works
 fine. The message is sent and a copy is in the .Sent folder. But when I
 send subsequent messages, they silently fail. No copy is in the .Sent
 folder and no message is sent (the qmail logs confirm this). Logging out
 and back in has no effect.
 
 Now, for the strange part... If I login to the shell and go into the
 Maildir and delete the sqwebmail-token file, I can send one message from
 sqwebmail again, but subsequent messages silently fail as above.
 
 Normal qmail delivery to this account works fine and same with
 courier-imap pop3d with authpgsql.
 
 Any ideas?
 
 Thanks!
 
 P.S. Is there any way to enable sqwebmail logging or for it to display 
 error messages?
 
 




Re: [sqwebmail] Re: Problem Sending Mail

2003-07-21 Thread Trevor Astrope
On Mon, 21 Jul 2003, Brian Candler wrote:

 It's a lynx bug. Lynx does too much caching: if you go from, say,
 /cgi-bin?page=1 to /cgi-bin?page=2 and then back to /cgi-bin?page=1, then it
 (wrongly) displays the page you saw last time when accessing this URL,
 rather than fetching it again.
 
 Use 'lynx -resubmit_posts http://whatever/'

Thanks! You're the man!

 I've just logged into sqwebmail with 'lynx -resubmit_posts', and sent two
 messages. It worked just fine; both messages were sent, and both were saved
 in the Sent folder.

Yep, works perfectly. Thanks a lot. This was really driving me crazy.

Thanks again,

Trevor




[sqwebmail] Problem Sending Mail

2003-07-18 Thread Trevor Astrope
Hello,

I'm using sqwebmail 3.5.3 (authpgsql) with qmail 1.03. I can read and pop 
mail just fine, but I'm having a strange problem sending mail...

THe first time I login to sqwebmail and send a message, everything works
fine. The message is sent and a copy is in the .Sent folder. But when I
send subsequent messages, they silently fail. No copy is in the .Sent
folder and no message is sent (the qmail logs confirm this). Logging out
and back in has no effect.

Now, for the strange part... If I login to the shell and go into the
Maildir and delete the sqwebmail-token file, I can send one message from
sqwebmail again, but subsequent messages silently fail as above.

Normal qmail delivery to this account works fine and same with
courier-imap pop3d with authpgsql.

Any ideas?

Thanks!

P.S. Is there any way to enable sqwebmail logging or for it to display 
error messages?


Regards,

Trevor Astrope
[EMAIL PROTECTED]