[vchkpw] Integration of vpopmail+maildrop+chkuser

2006-02-17 Thread Muhammad Naeem
I have setup a new mail server for my company with the following
configurations on Fedora Core 4:

1. Netqmail 1.05
2. vpopmail 5.4.10
3. maildrop 2.0.1
4. chkuser 2.0
5. Qmailadmin 1.2.9

I am using Bitdefender as antivirus and antispam solution. Everything
is working great besides a little issue which i am still unable to
resolve.

I have written a script for maildrop to move all of the spam mails in
a folder bulk, the script is in /home/vpopmail/etc/mailfilter with the
contents:

VPOP=| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

if (/^X-BitDefender-Spam: *YES/)
{
`test -d $VHOME/Maildir/.Bulk`
if( $RETURNCODE == 1 )
{
  `/usr/local/bin/maildirmake -f Bulk $VHOME/Maildir`
  `/bin/echo INBOX.Bulk  $VHOME/Maildir/courierimapsubscribed`
}


exception {
# to $VPOP
to $VHOME/Maildir/.Bulk/
}

exception {
to $VPOP
}
}
else
{
exception {
to $VPOP
}
}

My .qmail-default is:

| /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter

The problem is when i use .qmail-default as:
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
it works great, chkuser performs valid recipient checking during smtp
negotiation but all spam mails also directly go in the inbox of the
user and if i enable the above mailfilter script to move spam in bulk
folder in the user inbox  by changing .qmail-default as:
| /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter
then chkuser stop checking the existence of valid recipients and
receives all of the mails that are intended for non-existing users.

I have searched through the archives and read the administration
manual of vpopmail but I am unable to find out what could be right
solution so that if i enable this script to move spam mails to a bulk
folder chkuser still perform the existence of valid users and reject
mail s during smtp if the user does not exist.

If anybody has any idea i would love to try and listen, please tell me
if you need any more information regarding my setup.


[vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread Yavuz Maslak



I use netqmail1.05 with vpopmail5.4.x

After I patchednetqmail-1.05 with 
qmail-toaster-0.8.1.patchsuccessfully, I wanted to patch it with 
netqmail-1.05_chkuser-2.0.8.patch.
But I could not patch beause I gotsome 
errors.

What shall I do ?






RE: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread Michael Bellears





  What shall I do ?
  
  Provide the errors you received at the very 
least


Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread Yavuz Maslak
First
tar zxvf netqmail-1.0.5.tar.gz
cd netqmail-1.0.5
./collate.sh
cp qmail-toaster-0.8.1.patch netqmail-1.05/netqmail-1.05
cp netqmail-1.05_chkuser-2.0.8.patch netqmail-1.05/netqmail-1.05
cd netqmail-1.05/netqmail-1.05
patch  qmail-toaster-0.8.1.patch

I did not any error
I patched successfully it.
After that
patch  netqmail-1.05_chkuser-2.0.8.patch
But I got some errors as below;Does qmail-toaster-0.8.1.patch comprise
the patch called  netqmail-1.05_chkuser-2.0.8.patch ?
THANKS

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./Makefile ../netqmail-1.05-chkuser-2.0.8-release/Makefile
|--- ./Makefile Mon Jul 26 11:05:52 2004
|+++ ../netqmail-1.05-chkuser-2.0.8-release/MakefileWed Dec  1 18:00:19
2004
--
Patching file Makefile using Plan A...
Hunk #1 succeeded at 1 with fuzz 1.
Hunk #2 succeeded at 324 with fuzz 2 (offset 20 lines).
Hunk #3 failed at 1564.
1 out of 3 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./TARGETS ../netqmail-1.05-chkuser-2.0.8-release/TARGETS
|--- ./TARGETS  Mon Jun 15 12:53:16 1998
|+++ ../netqmail-1.05-chkuser-2.0.8-release/TARGETS Wed Dec  1 18:00:19
2004
--
Patching file TARGETS using Plan A...
Hunk #1 succeeded at 408 (offset 23 lines).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./chkuser.c ../netqmail-1.05-chkuser-2.0.8-release/chkuser.c
|--- ./chkuser.cThu Jan  1 01:00:00 1970
|+++ ../netqmail-1.05-chkuser-2.0.8-release/chkuser.c   Tue Dec  7 11:04:27
2004
--
Patching file chkuser.c using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./chkuser.h ../netqmail-1.05-chkuser-2.0.8-release/chkuser.h
|--- ./chkuser.hThu Jan  1 01:00:00 1970
|+++ ../netqmail-1.05-chkuser-2.0.8-release/chkuser.h   Wed Dec  1 18:34:53
2004
--
Patching file chkuser.h using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./chkuser_settings.h
../netqmail-1.05-chkuser-2.0.8-release/chkuser_settings.h
|--- ./chkuser_settings.h   Thu Jan  1 01:00:00 1970
|+++ ../netqmail-1.05-chkuser-2.0.8-release/chkuser_settings.h  Tue Dec  7
12:00:32 2004
--
Patching file chkuser_settings.h using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./conf-cc ../netqmail-1.05-chkuser-2.0.8-release/conf-cc
|--- ./conf-cc  Mon Jun 15 12:53:16 1998
|+++ ../netqmail-1.05-chkuser-2.0.8-release/conf-cc Wed Dec  1 18:00:19
2004
--
Patching file conf-cc using Plan A...
Hunk #1 succeeded at 1 with fuzz 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff -NU3 ./qmail-smtpd.c
../netqmail-1.05-chkuser-2.0.8-release/qmail-smtpd.c
|--- ./qmail-smtpd.cMon Jul 26 11:05:52 2004
|+++ ../netqmail-1.05-chkuser-2.0.8-release/qmail-smtpd.c   Mon Dec  6
13:14:26 2004
--
Patching file qmail-smtpd.c using Plan A...
Hunk #1 succeeded at 12 (offset 11 lines).
Hunk #2 succeeded at 49 with fuzz 2 (offset 15 lines).
Hunk #3 failed at 269.
Hunk #4 failed at 283.
Hunk #5 failed at 294.
3 out of 5 hunks failed--saving rejects to qmail-smtpd.c.rej
done




- Original Message - 
From: Michael Bellears
To: vchkpw@inter7.com
Sent: Friday, February 17, 2006 2:20 PM
Subject: RE: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch



What shall I do ?

Provide the errors you received at the very least



Re: [vchkpw] Integration of vpopmail+maildrop+chkuser

2006-02-17 Thread Rick Macdougall

Muhammad Naeem wrote:

The problem is when i use .qmail-default as:
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
it works great, chkuser performs valid recipient checking during smtp
negotiation but all spam mails also directly go in the inbox of the
user and if i enable the above mailfilter script to move spam in bulk
folder in the user inbox  by changing .qmail-default as:
| /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter
then chkuser stop checking the existence of valid recipients and
receives all of the mails that are intended for non-existing users.


Hi,

Leave the | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox as the 
first line but comment it out with a #


Or edit the chkusr code and change the bounce-no-mailbox check to 
mailfilter.


Regards,

Rick


Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread Bob Hutchinson
On Friday 17 Feb 2006 11:18, Yavuz Maslak wrote:
 I use netqmail1.05 with vpopmail5.4.x

 After I patched netqmail-1.05 with qmail-toaster-0.8.1.patch successfully,
 I wanted to patch it with netqmail-1.05_chkuser-2.0.8.patch. But I could
 not patch beause I got some errors.

chkuser-2.0.8 is already in the qmail-toaster-0.8.1.patch

look in your source tree, you should find chkuser_settings.h, in which the 
version number is stated.
It also contains a number of things which you might want to enable/disable, 
depending on your setup

-- 
-
Bob Hutchinson
Midwales dot com
-


Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread Yavuz Maslak
Well
I have 10 domains.
I want to check users for 3 domains.
How can I set  chkuser_settings.h that ?
Thanks

- Original Message - 
From: Bob Hutchinson [EMAIL PROTECTED]
To: vchkpw@inter7.com
Sent: Friday, February 17, 2006 3:20 PM
Subject: Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch


 On Friday 17 Feb 2006 11:18, Yavuz Maslak wrote:
  I use netqmail1.05 with vpopmail5.4.x
 
  After I patched netqmail-1.05 with qmail-toaster-0.8.1.patch
successfully,
  I wanted to patch it with netqmail-1.05_chkuser-2.0.8.patch. But I could
  not patch beause I got some errors.

 chkuser-2.0.8 is already in the qmail-toaster-0.8.1.patch

 look in your source tree, you should find chkuser_settings.h, in which the
 version number is stated.
 It also contains a number of things which you might want to
enable/disable,
 depending on your setup

 -- 
 -
 Bob Hutchinson
 Midwales dot com
 -




[vchkpw] Requeueing question

2006-02-17 Thread Joshua Megerman
This probably is better posted to the qmail mailing list, but I can't seem
to get to cr.yp.to right now and I'm not on the list at this time...

Is there any (known) way to force qmail to immediately requeue a message
upon delivery deferral rather than having it wait until the next send
time?  I just finished a qmail patch that allows a limit on the number of
concurrent attempts made to any given IP address (well, any given hash -
there's only so many semaphores I'm willing to create :)).  This allows
mail to continue processing on high-volume servers without bogging down
because a remote server (e.g., AOL or YAHOO) is throttling or just too
busy to accept more than 8-10 connections from a single server at once. 
The patch will cause that MX IP to be skipped and the next one in line to
be tried - if no MX is reachable it defers the mesage.  However, in that
case I would like to force qmail to immediately retry the message as the
deferral was on the local system rather than cause by the remote system.

After looking at how qmail runs its queue, I don't think there's a way to
do it, but I figured I'd throw the question out anyway.  I'll be making
the patch available at some point in the future once I've tested it some
more...

Josh
-- 
Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
  - Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]




Re: [vchkpw] vdominfo is giving incorrect info

2006-02-17 Thread Ken Jones

Mark DeGroot wrote:

-Original Message-
From: Mark DeGroot [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 1:58 PM
To: vchkpw@inter7.com
Subject: RE: [vchkpw] vdominfo is giving incorrect info



-Original Message-
From: Tom Collins [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 15, 2006 1:25 AM
To: vchkpw@inter7.com
Subject: Re: [vchkpw] vdominfo is giving incorrect info

On Feb 13, 2006, at 9:59 AM, Mark DeGroot wrote:


The directory structure looks ok.  Permissions look ok - at least they
are
the same as the other domains and as far as I can tell all the email
accounts are working properly.
cat vpasswd.cdb |cdbdump |wc -l gives me 43 addresses.  Everything
there
looks ok.  Any ideas what I should do to try and find out why vdominfo
is
giving me inaccurate info on this domain?


It's probably a problem with the .dir-control file for that domain.
Edit that file, and change the 2147483645 number to 43.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
You don't need a laptop to troubleshoot high-speed Internet:
sniffter.com



Thanks I'll try that  report back.
Mark




Sure enough you were right:
[EMAIL PROTECTED] cat .dir-control
2147483644
0
3
0 0 0
61 61 61
0 2 2
0 0 0

OT, but what does this file do and how is it created typically? I couldn't
find much about it on google / google groups.  Also notice that I removed
some email accounts and the # 2147483645 decreased in size.
Thanks, 
Mark





This file keep track of which directory the next email account
should be placed. It's the best I could come up with to manage
that information.

Ken Jones



Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread tonix (Antonio Nati)

At 17.18 17/02/2006, you wrote:

Well
I have 10 domains.
I want to check users for 3 domains.
How can I set  chkuser_settings.h that ?


No need. Leave it as it is, and use qmailadmin to enable blouncing on 
the domains you want.


Tonino


Thanks

- Original Message -
From: Bob Hutchinson [EMAIL PROTECTED]
To: vchkpw@inter7.com
Sent: Friday, February 17, 2006 3:20 PM
Subject: Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch


 On Friday 17 Feb 2006 11:18, Yavuz Maslak wrote:
  I use netqmail1.05 with vpopmail5.4.x
 
  After I patched netqmail-1.05 with qmail-toaster-0.8.1.patch
successfully,
  I wanted to patch it with netqmail-1.05_chkuser-2.0.8.patch. But I could
  not patch beause I got some errors.

 chkuser-2.0.8 is already in the qmail-toaster-0.8.1.patch

 look in your source tree, you should find chkuser_settings.h, in which the
 version number is stated.
 It also contains a number of things which you might want to
enable/disable,
 depending on your setup

 --
 -
 Bob Hutchinson
 Midwales dot com
 -






Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

2006-02-17 Thread Bob Hutchinson
On Friday 17 Feb 2006 16:18, Yavuz Maslak wrote:
 Well
 I have 10 domains.
 I want to check users for 3 domains.
 How can I set  chkuser_settings.h that ?
 Thanks

have a careful read on
http://www.interazioni.it/opensource/chkuser/documentation/

CHKUSER_STARTING_VARIABLE   2.0.5commented  CHKUSER_START
Sets the variable that must be read, at qmail-smtpd start, in order to 
understand how to use chkuser for any domain. The variable must be filled 
with the following values:

* NONE = chkuser will not work
* ALWAYS = chkuser will work always
* DOMAIN = chkuser will work depending on single domain settings



 - Original Message -
 From: Bob Hutchinson [EMAIL PROTECTED]
 To: vchkpw@inter7.com
 Sent: Friday, February 17, 2006 3:20 PM
 Subject: Re: [vchkpw] I could not patch netqmail-1.05_chkuser-2.0.8.patch

  On Friday 17 Feb 2006 11:18, Yavuz Maslak wrote:
   I use netqmail1.05 with vpopmail5.4.x
  
   After I patched netqmail-1.05 with qmail-toaster-0.8.1.patch

 successfully,

   I wanted to patch it with netqmail-1.05_chkuser-2.0.8.patch. But I
   could not patch beause I got some errors.
 
  chkuser-2.0.8 is already in the qmail-toaster-0.8.1.patch
 
  look in your source tree, you should find chkuser_settings.h, in which
  the version number is stated.
  It also contains a number of things which you might want to

 enable/disable,

  depending on your setup
 
  --
  -
  Bob Hutchinson
  Midwales dot com
  -

-- 
-
Bob Hutchinson
Midwales dot com
-


Re: [vchkpw] Integration of vpopmail+maildrop+chkuser

2006-02-17 Thread Muhammad Naeem
On 2/17/06, Rick Macdougall [EMAIL PROTECTED] wrote:
 Muhammad Naeem wrote:
  The problem is when i use .qmail-default as:
  | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
  it works great, chkuser performs valid recipient checking during smtp
  negotiation but all spam mails also directly go in the inbox of the
  user and if i enable the above mailfilter script to move spam in bulk
  folder in the user inbox  by changing .qmail-default as:
  | /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter
  then chkuser stop checking the existence of valid recipients and
  receives all of the mails that are intended for non-existing users.

 Hi,

 Leave the | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox as the
 first line but comment it out with a #

 Or edit the chkusr code and change the bounce-no-mailbox check to
 mailfilter.

 Regards,

 Rick


Thanks very much Rick. I have applied your first suggested solution by
leaving the line of vdelivermail in .qmail-default as it is and
commenting it out and it is working fine now the validity of existing
users is being checked by chkuser at smtp level.

Now there is another issue and that is lets suppose that i have a user
whose mailbox size is 1MB and if i send a test email to that account
containing an attachment of 1.5MB means more than the size of its
mailbox the mail gets deferred and stuck in the qmail queue and qmail
logs it:

2006-02-18 11:15:00.290014500 delivery 7: deferral:
user_is_over_quota//usr/local/bin/maildrop:_Unable_to_open_mailbox./

what i want is to return this oversize email to sender immediately
with a message like user is over quota

I don't know how to implement this, i will be obliged if you can help
me out in this regard.

Regards,
Naeem


Re: [vchkpw] Integration of vpopmail+maildrop+chkuser

2006-02-17 Thread Muhammad Naeem
On 2/18/06, Muhammad Naeem [EMAIL PROTECTED] wrote:
 On 2/17/06, Rick Macdougall [EMAIL PROTECTED] wrote:
  Muhammad Naeem wrote:
   The problem is when i use .qmail-default as:
   | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
   it works great, chkuser performs valid recipient checking during smtp
   negotiation but all spam mails also directly go in the inbox of the
   user and if i enable the above mailfilter script to move spam in bulk
   folder in the user inbox  by changing .qmail-default as:
   | /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter
   then chkuser stop checking the existence of valid recipients and
   receives all of the mails that are intended for non-existing users.
 
  Hi,
 
  Leave the | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox as the
  first line but comment it out with a #
 
  Or edit the chkusr code and change the bounce-no-mailbox check to
  mailfilter.
 
  Regards,
 
  Rick
 

 Thanks very much Rick. I have applied your first suggested solution by
 leaving the line of vdelivermail in .qmail-default as it is and
 commenting it out and it is working fine now the validity of existing
 users is being checked by chkuser at smtp level.

 Now there is another issue and that is lets suppose that i have a user
 whose mailbox size is 1MB and if i send a test email to that account
 containing an attachment of 1.5MB means more than the size of its
 mailbox the mail gets deferred and stuck in the qmail queue and qmail
 logs it:

 2006-02-18 11:15:00.290014500 delivery 7: deferral:
 user_is_over_quota//usr/local/bin/maildrop:_Unable_to_open_mailbox./

 what i want is to return this oversize email to sender immediately
 with a message like user is over quota

 I don't know how to implement this, i will be obliged if you can help
 me out in this regard.

 Regards,
 Naeem


I want to add some more info to it, the over quota message is bounced
back to the sender after the expiration of queuelifetime which is
too long like i set it to 172800 seconds means two days but i want to
notify the sender immediately that the user is over quota.

any help will be appreciated.

Regards,
Naeem