[vchkpw] Authentication problem

2006-04-28 Thread daniel
Hello !

I have a problem and it seems that some people have it also but no one has
an answer for it.

I've searched thru courierusers mailinglist and thru this mailing list but
i can't find a solution to this matter...

Here it goes..

I have a fedora core 5 os and vpopmail 5.4.13 with the cumulative patch
made by Bill Shupp, all works ok but the imap authentication service... it
seems like when the server is not used or it is used rarely (nightime) it
has the habit of refusing authentications of valid users because the mysql
server has gone away message !

The weird thing is, after i made some reading, it does not happen in the 8
hour interval wich is the timeout for mysql it happens randomly and when
it does i discovered that restarting the courier-authlib daemon
temporarely fixes the problem until next time...

So, i made an hourly cronjob that restarts the courier-authlib as a
quick&dirty fix until i find where's the real problem but it seems that
this does not work as well in the morning i still find that imap refuses
authentication...

Can some one help me with this, i'm not a complete noob but this is really
over my head and i would really appreciate some help or some indications
of what to read in order to understand what's going on.

This what the logs say for today, sorry for the large message

Max connections in mysql is set to 250 via my.cnf

[EMAIL PROTECTED] log]# cat maillog | grep "Apr 28 12"
Apr 28 12:04:20 ns1 imapd: Connection, ip=[:::127.0.0.1]
Apr 28 12:04:20 ns1 authdaemond: received auth request, service=imap,
authtype=login
Apr 28 12:04:20 ns1 authdaemond: authvchkpw: trying this module
Apr 28 12:04:20 ns1 authdaemond: authvchkpw: sysusername=,
sysuserid=514, sysgroupid=506,
homedir=/home/vpopmail/domains/clients_domain.com/hotel,
[EMAIL PROTECTED], fullname=hotel, maildir=,
quota=, options=disablewebmail=0,disablepop3=0,disableimap=0
Apr 28 12:04:20 ns1 authdaemond: password matches successfully
Apr 28 12:04:20 ns1 authdaemond: Authenticated: sysusername=,
sysuserid=514, sysgroupid=506,
homedir=/home/vpopmail/domains/clients_domain.com/hotel,
[EMAIL PROTECTED], fullname=hotel, maildir=,
quota=, options=disablewebmail=0,disablepop3=0,disableimap=0
Apr 28 12:04:20 ns1 imapd: LOGIN, [EMAIL PROTECTED],
ip=[:::127.0.0.1], protocol=IMAP
Apr 28 12:04:20 ns1 imapd: LOGOUT, [EMAIL PROTECTED],
ip=[:::127.0.0.1], headers=0, body=0, time=0
Apr 28 12:13:36 ns1 imapd: Connection, ip=[:::127.0.0.1]
Apr 28 12:13:36 ns1 authdaemond: received auth request, service=imap,
authtype=login
Apr 28 12:13:36 ns1 authdaemond: authvchkpw: trying this module
Apr 28 12:13:36 ns1 authdaemond: authvchkpw: sysusername=,
sysuserid=514, sysgroupid=506,
homedir=/home/vpopmail/domains/clients_domain.com/hotel,
[EMAIL PROTECTED], fullname=hotel, maildir=,
quota=, options=disablewebmail=0,disablepop3=0,disableimap=0
Apr 28 12:13:36 ns1 authdaemond: password matches successfully
Apr 28 12:13:36 ns1 authdaemond: Authenticated: sysusername=,
sysuserid=514, sysgroupid=506,
homedir=/home/vpopmail/domains/clients_domain.com/hotel,
[EMAIL PROTECTED], fullname=hotel, maildir=,
quota=, options=disablewebmail=0,disablepop3=0,disableimap=0
Apr 28 12:13:36 ns1 imapd: LOGIN, [EMAIL PROTECTED],
ip=[:::127.0.0.1], protocol=IMAP
Apr 28 12:13:36 ns1 imapd: LOGOUT, [EMAIL PROTECTED],
ip=[:::127.0.0.1], headers=0, body=0, time=0
Apr 28 12:13:36 ns1 imapd: Connection, ip=[:::127.0.0.1]
Apr 28 12:13:36 ns1 authdaemond: received auth request, service=imap,
authtype=login
Apr 28 12:13:36 ns1 authdaemond: authvchkpw: trying this module
Apr 28 12:13:36 ns1 authdaemond: authvchkpw: sysusername=,
sysuserid=514, sysgroupid=506,
homedir=/home/vpopmail/domains/clients_domain.com/hotel,
[EMAIL PROTECTED], fullname=hotel, maildir=,
quota=, options=disablewebmail=0,disablepop3=0,disableimap=0
Apr 28 12:13:36 ns1 authdaemond: password matches successfully
Apr 28 12:13:36 ns1 authdaemond: Authenticated: sysusername=,
sysuserid=514, sysgroupid=506,
homedir=/home/vpopmail/domains/clients_domain.com/hotel,
[EMAIL PROTECTED], fullname=hotel, maildir=,
quota=, options=disablewebmail=0,disablepop3=0,disableimap=0
Apr 28 12:13:36 ns1 imapd: LOGIN, [EMAIL PROTECTED],
ip=[:::127.0.0.1], protocol=IMAP
Apr 28 12:13:37 ns1 imapd: LOGOUT, [EMAIL PROTECTED],
ip=[:::127.0.0.1], headers=10506, body=0, time=1
Apr 28 12:14:52 ns1 imapd: Connection, ip=[:::127.0.0.1]
Apr 28 12:14:52 ns1 authdaemond: received auth request, service=imap,
authtype=login
Apr 28 12:14:52 ns1 imapd: LOGIN FAILED, [EMAIL PROTECTED],
ip=[:::127.0.0.1]
Apr 28 12:14:52 ns1 authdaemond: authvchkpw: trying this module
Apr 28 12:14:52 ns1 authdaemond: vmysql: sql error[3]: MySQL server has
gone away
Apr 28 12:14:52 ns1 authdaemond: vchkpw: user does not exist
Apr 28 12:14:52 ns1 authdaemond: authvchkpw: REJECT - try next module
Apr 28 12:14:52 ns1 authdaemond: FAIL, all modules rejected
Apr 28 12:14:57 ns1 imapd: Disconnected, ip=[:::127.0.0.1], time=5
A

[vchkpw] Re: vadddomain error

2006-04-28 Thread Lars Uhlmann
On Mon, 10 Apr 2006 16:05:37 +0800, Oliver A. Rojo wrote:

> Hi! im trying to add a domain with "numbers" say 123domain.com. It says:
> 
> vpgsql: error creating table '123domain_com': ERROR:  syntax error at or 
> near "1" at character 14

I'm not really familiar with postgresql but iirc table names must start
with a letter or an underscore.

HTH
Lars




[vchkpw] [chkusr] valid Sender-MX

2006-04-28 Thread Lars Uhlmann
The Sender-MX-Check needs some enhancements. ;)
Spammers mostly use RFC1918-adresses or unresolveable names as MX-RR, e.g.:

@  IN  MX  $PRI   127.0.0.1
@  IN  MX  $PRI   has.no.a-record.
@  IN  MX  $PRI   has.rfc1918.a-record.

latest examples (all of the domains below are only used to deliver SPAM):

$ dig MX radiocompa.com
,-
| ;; ANSWER SECTION:
| radiocompa.com. 86289   IN   MX   0 127.0.1.51.
`-

or:

$ dig MX fflowershop.com 
,-
| ;; ANSWER SECTION:
| fflowershop.com.3600IN   MX   10 localhost.fabulous.com.
`-
$ dig A localhost.fabulous.com @ns1.darkbluesea.com
,-
| ;; ANSWER SECTION:
| localhost.fabulous.com. 3600IN   A127.0.0.1
`-

If I had the time and better C skills, I  would add the tests myself but... ;)

regards,
  Lars