Re: [vchkpw] is there a patch that provides to add .qmail the user's directory as every user is addded with vadduser ?

2007-09-12 Thread John Simpson

On 2007-09-11, at 2251, marlowe wrote:

Bulent Kolay wrote:

I use vpopmail5.4.17 and procmail.

I am looking for a patch for vpopmail that,

when I add an user with vadduser I want vpopmail to add the folder
called .procmailrc in the user's directory according to that user.

is there any patch for this ?


This type of functionality can be handle through the use of  
"onchange".
 I believe "onchange" became part of the vpopmail with 5.4.18.  You  
can

read more about "onchange" at http://qmail.jms1.net/vpopmail/.


oh yeah... you can also do it that way. write your "onchange" script  
so it checks for an "add_user" command, and if it sees it, creates  
the .procmailrc folder and any default files within the new mailbox  
(whose physical directory name can be gotten using a "vuserinfo -d  
[EMAIL PROTECTED]" command.)



| John M. Simpson---   KG4ZOW   ---Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |

| http://video.google.com/videoplay?docid=-1656880303867390173 |





PGP.sig
Description: This is a digitally signed message part


Re: [vchkpw] is there a patch that provides to add .qmail the user's directory as every user is addded with vadduser ?

2007-09-12 Thread John Simpson

On 2007-09-11, at 1844, Bulent Kolay wrote:


I use vpopmail5.4.17 and procmail.

I am looking for a patch for vpopmail that,

when I add an user with vadduser I want vpopmail to add the folder  
called .procmailrc in the user's directory according to that user.


is there any patch for this ?


usually when this comes up, people want to know how to pre-create  
"Drafts", "Sent", and "Trash" folders within each mailbox. this is  
the same thing, but with a different directory name.


one option is to edit "vpopmail.c" in your source directory. lines  
2110 and 2111 look like this:


   2110  const char *dirnames[] = {"Maildir", "Maildir/new",  
"Maildir/cur",

   2111 "Maildir/tmp"};

this array contains the names of the directories which are created  
within each mailbox when it's created. if you need a ".procmailrc"  
directory, add ".procmailrc" to this array, like so:


   2110  const char *dirnames[] = {"Maildir", "Maildir/new",  
"Maildir/cur",

   2111 "Maildir/tmp", ".procmailrc"};

then do "make distclean", and re-run your "./configure", "make", and  
"make install" commands.


another option... google for "vpopmail skel patch". this is a patch  
which causes vpopmail to copy the entire directory tree from a  
"skeleton" to the new mailbox. this way you can change what gets  
created without having to re-compile the code, by simply creating the  
directories you want within the skeleton directory.


i have a copy of the patch, one of the items on my to-do list is to  
clean it up, test it, fix any bugs, test it again, and then submit it  
into the vpopmail source tree. unless somebody really objects, the  
code will eventually be in vpopmail- it's just not there yet.



| John M. Simpson---   KG4ZOW   ---Programmer At Large |
| http://www.jms1.net/ <[EMAIL PROTECTED]> |

| http://video.google.com/videoplay?docid=-1656880303867390173 |





PGP.sig
Description: This is a digitally signed message part


[vchkpw] vmoduser segmentation fault possible vpasswd file corrupt?

2007-09-12 Thread Jeffrey D. Gordon
I apologize in advance as a Google search didn't bring anything up that 
was helpful.


I'm having issues with one domain for modifications to the vpasswd file 
and qmailadmin file.
Any time I run a vpopmail program on this one domain I'm getting a 
segmentation fault.


It's an unusually large amount of users for one of our domains, and this 
problem has happened before


For example here a not-so typical session (vmoduser options removed as 
well as domain & email address):

[EMAIL PROTECTED]:~# ~vpopmail/bin/vmoduser -v
version: 5.4.20
.
. (options deleted)
.
[EMAIL PROTECTED]:~# cd ~vpopmail/domains/.org/
[EMAIL PROTECTED]:/home/vpopmail/domains/.org# wc -l vpasswd
501 vpasswd
[EMAIL PROTECTED]:/home/vpopmail/domains/.org# ~vpopmail/bin/vmoduser 
-a [EMAIL PROTECTED]

Segmentation fault


Are there any utilities that I can run to check the state of the vpasswd 
file? It seems that the cdb is being created with no issues and an 
'eyeball look' at the file doesn't have anything outstanding, but there 
are 500 lines and as you can imagine the fields start to blur :-)


Server system:
Ubuntu Linux Server 7.04
Quad Core Xeon
4 gigs of RAM
Qmail-1.03
vpopmail-5.4.21 (not sure why vmoduser version reads 5.4.20)

Thanks for any advice!
Jeff

--
   Jeffrey D. Gordon
   Sr. Programmer/Network Administrator
   iThinc.net - Dynamic Media
   www.iThinc.net




[vchkpw] Build error vpopmail 5.4.21

2007-09-12 Thread Bas

Hello,

./configure --enable-ip-alias-domains

make

gives :

vpopmaild.c: In function `get_ip_map':
vpopmaild.c:2122: `ERR_IP_REQUIRED' undeclared (first use in this function)
vpopmaild.c:2122: (Each undeclared identifier is reported only once
vpopmaild.c:2122: for each function it appears in.)
vpopmaild.c: In function `add_ip_map':
vpopmaild.c:2167: `ERR_INVALID_DOMAIN' undeclared (first use in this function)
vpopmaild.c: In function `del_ip_map':
vpopmaild.c:2195: `ERR_IP_REQUIRED' undeclared (first use in this function)
make[2]: *** [vpopmaild.o] Error 1
make[2]: Leaving directory `/temp/vpopmail-5.4.21'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/temp/vpopmail-5.4.21'
make: *** [all] Error 2

Tried on RHEL 3 and 4.

Regards, Bas



[vchkpw] Abnormal query to database

2007-09-12 Thread Marco Spiga
Why when I use the command 'vadddomain domainname', in the logs of
postgresql I see always this message?

ERROR:  the relation "vpopmail" already exists
STATEMENT:  CREATE TABLE
vpopmail ( pw_name varchar(32) NOT NULL, pw_domain varchar(96) NOT NULL,
pw_passwd varchar(40), pw_uid int4, pw_gid int4, pw_gecos varchar(48),
pw_dir varchar(160), pw_shell varchar(20), PRIMARY KEY (pw_name,
pw_domain )  )

Marco


[vchkpw] Emulate some vpopmail commands.

2007-09-12 Thread Marco
That you know, it's possible to emulate some commandos of the type
vadddomain, vadduser also in version reduced through cgi scripts, for
example in perl language?

Marco


Re: [vchkpw] vpopmail and postgresql

2007-09-12 Thread Marco Spiga
On Wed, Sep 12, 2007 at 02:30:07PM +0530, Sandeep Agarwal wrote:
> Date: Wed, 12 Sep 2007 14:30:07 +0530
> From: Sandeep Agarwal <[EMAIL PROTECTED]>
> Subject: Re: [vchkpw] vpopmail and postgresql
> To: vchkpw@inter7.com
> 
> On 9/12/07, Charles Boening <[EMAIL PROTECTED]> wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > I'm not sure about the newer versions of vpopmail (still running
> > 5.4.10), but you may need to edit the vpgsql.h file.
> >
> > After you changed the postgresql configs, did you restart the postgresql
> > service or HUP the postmaster?
> >
> > lsof -i | grep postgres
> >
> > ps ax | grep postmaster
> >
> >
> > Charlie
> >
> >
> >
> > > -Original Message-
> > > From: Marco Spiga [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, September 11, 2007 9:41 AM
> > > To: vchkpw@inter7.com
> > > Subject: Re: [vchkpw] vpopmail and postgresql
> > >
> > > On Mon, Sep 10, 2007 at 12:18:34PM -0700, Charles Boening wrote:
> > > > Date: Mon, 10 Sep 2007 12:18:34 -0700
> > > > From: Charles Boening <[EMAIL PROTECTED]>
> > > > Subject: RE: [vchkpw] vpopmail and postgresql
> > > > To: vchkpw@inter7.com
> > > >
> > > > -BEGIN PGP SIGNED MESSAGE-
> > > > Hash: SHA1
> > > >
> > > >
> > > > In your pg_hba.conf
> > > >
> > > > hostvpopmail   vpopuser   127.0.0.1/32trust
> > > >
> > > >
> > > > Also, in your postgresql.conf, make sure you enable TCP connections.
> > > > listen_addresses = '*'  # set appropriately
> > > > port = 5432
> > > >
> > > Hi Charles!
> > >
> > > My netstat output is:
> > > Active Internet connections (servers and established)
> > > Proto Recv-Q Send-Q Local Address   Foreign Address
> > > State   PID/Program name
> > > tcp0  0 127.0.0.1:5432  0.0.0.0:*
> > > LISTEN  3508/postmaster
> > > udp0  0 127.0.0.1:32768 127.0.0.1:32768
> > > ESTABLISHED 3508/postmaster
> > >
> > > If I try to run 'tcpdump -i lo 5432' and I give the command
> > vadddomain,
> > > I don't see any traffic on loopback interface.
> > >
> > > Where I can setup vpopmail parameters to work with remote address
> > > of postgresql (for example 127.0.0.1 or 172.16.89.4) and one private
> > > password of vpopmail database?
> > >
> > > I tried to create /var/vpopmail/etc/vpopmail.pgsql with this line:
> > > localhost|0|vpopuser|password|vpopmail
> > > but the status don't change (I think this file is useless).
> > >
> > >
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Marco Spiga [mailto:[EMAIL PROTECTED]
> > > > > Sent: Monday, September 10, 2007 11:28 AM
> > > > > To: vchkpw@inter7.com
> > > > > Subject: [vchkpw] vpopmail and postgresql
> > > > >
> > > > > Hello
> > > > >
> > > > > Please help me!!!
> > > > >
> > > > > How can I do to work vpopmail with postgresql over socket tcp and
> > > > > password authentications?
> > > > >
> > > > > If I try the command:
> > > > >
> > > > > /var/vpopmail/bin/vadddomain mydomain.com domainpassword
> > > > >
> > > > > I have this output message:
> > > > >
> > > > >
> > ---
> > > > > vauth_open: can't connect: FATAL:  Ident authentication failed for
> > > > user
> > > > > "vpopuser"
> > > > >
> > > > > Error - Success. Initial open.
> > > > >
> > ---
> > > > >
> > > > > It work only if I insert in pg_hba.conf this line:
> > > > >
> > > > > # TYPE  DATABASEUSERCIDR-ADDRESS  METHOD
> > > > >
> > > > > # "local" is for Unix domain socket connections only
> > > > >
> > > > > local   all postgres  ident
> > sameuser
> > > > > local   vpopmailvpopuser  trust
> > > > >
> > > > > I have inserted in /var/vpopmail/etc/vpopmail.pgsql this line:
> > > > >
> > > > > localhost|0|vpopuser|mypassword|vpopmail
> > > > >
> > > > > I am Sorry for my bad English.
> > > > > Please help me!!!
> > > > >
> > > > > Marco
> 
> i am also using a old version of vpopmail 5.4.13, to connect to
> postgres on a remote machine i made the following changes in vpgsql.h
> file, the changes are
> 
> /* Edit to match your set up */
> #define DB "vpopmail"
> #define DBHOST "hostname"
> #define DBUSER "username"
> #define DBPASSWD "password"
> #define PG_CONNECT "host=" DBHOST " user=" DBUSER " password="
> DBPASSWD " dbname=" DB

Thanks Charles, Thanks Sandeep.

With your AID, I have resolved problem!!

Marco


Re: [vchkpw] vpopmail and postgresql

2007-09-12 Thread Sandeep Agarwal
On 9/12/07, Charles Boening <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I'm not sure about the newer versions of vpopmail (still running
> 5.4.10), but you may need to edit the vpgsql.h file.
>
> After you changed the postgresql configs, did you restart the postgresql
> service or HUP the postmaster?
>
> lsof -i | grep postgres
>
> ps ax | grep postmaster
>
>
> Charlie
>
>
>
> > -Original Message-
> > From: Marco Spiga [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, September 11, 2007 9:41 AM
> > To: vchkpw@inter7.com
> > Subject: Re: [vchkpw] vpopmail and postgresql
> >
> > On Mon, Sep 10, 2007 at 12:18:34PM -0700, Charles Boening wrote:
> > > Date: Mon, 10 Sep 2007 12:18:34 -0700
> > > From: Charles Boening <[EMAIL PROTECTED]>
> > > Subject: RE: [vchkpw] vpopmail and postgresql
> > > To: vchkpw@inter7.com
> > >
> > > -BEGIN PGP SIGNED MESSAGE-
> > > Hash: SHA1
> > >
> > >
> > > In your pg_hba.conf
> > >
> > > hostvpopmail   vpopuser   127.0.0.1/32trust
> > >
> > >
> > > Also, in your postgresql.conf, make sure you enable TCP connections.
> > > listen_addresses = '*'  # set appropriately
> > > port = 5432
> > >
> > Hi Charles!
> >
> > My netstat output is:
> > Active Internet connections (servers and established)
> > Proto Recv-Q Send-Q Local Address   Foreign Address
> > State   PID/Program name
> > tcp0  0 127.0.0.1:5432  0.0.0.0:*
> > LISTEN  3508/postmaster
> > udp0  0 127.0.0.1:32768 127.0.0.1:32768
> > ESTABLISHED 3508/postmaster
> >
> > If I try to run 'tcpdump -i lo 5432' and I give the command
> vadddomain,
> > I don't see any traffic on loopback interface.
> >
> > Where I can setup vpopmail parameters to work with remote address
> > of postgresql (for example 127.0.0.1 or 172.16.89.4) and one private
> > password of vpopmail database?
> >
> > I tried to create /var/vpopmail/etc/vpopmail.pgsql with this line:
> > localhost|0|vpopuser|password|vpopmail
> > but the status don't change (I think this file is useless).
> >
> >
> > >
> > >
> > > > -Original Message-
> > > > From: Marco Spiga [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, September 10, 2007 11:28 AM
> > > > To: vchkpw@inter7.com
> > > > Subject: [vchkpw] vpopmail and postgresql
> > > >
> > > > Hello
> > > >
> > > > Please help me!!!
> > > >
> > > > How can I do to work vpopmail with postgresql over socket tcp and
> > > > password authentications?
> > > >
> > > > If I try the command:
> > > >
> > > > /var/vpopmail/bin/vadddomain mydomain.com domainpassword
> > > >
> > > > I have this output message:
> > > >
> > > >
> ---
> > > > vauth_open: can't connect: FATAL:  Ident authentication failed for
> > > user
> > > > "vpopuser"
> > > >
> > > > Error - Success. Initial open.
> > > >
> ---
> > > >
> > > > It work only if I insert in pg_hba.conf this line:
> > > >
> > > > # TYPE  DATABASEUSERCIDR-ADDRESS  METHOD
> > > >
> > > > # "local" is for Unix domain socket connections only
> > > >
> > > > local   all postgres  ident
> sameuser
> > > > local   vpopmailvpopuser  trust
> > > >
> > > > I have inserted in /var/vpopmail/etc/vpopmail.pgsql this line:
> > > >
> > > > localhost|0|vpopuser|mypassword|vpopmail
> > > >
> > > > I am Sorry for my bad English.
> > > > Please help me!!!
> > > >
> > > > Marco

i am also using a old version of vpopmail 5.4.13, to connect to
postgres on a remote machine i made the following changes in vpgsql.h
file, the changes are

/* Edit to match your set up */
#define DB "vpopmail"
#define DBHOST "hostname"
#define DBUSER "username"
#define DBPASSWD "password"
#define PG_CONNECT "host=" DBHOST " user=" DBUSER " password="
DBPASSWD " dbname=" DB