Re: [vchkpw] Aliases not working with maildrop & spamassassin?

2003-06-06 Thread Peter Palmreuther
Hi Alan,

On Thu, 5 Jun 2003 09:31:37 -0400 (EDT) Alan Murrell wrote:

>> is sent to [EMAIL PROTECTED], qmail just dumps it
>> directly into user's mailbox,completely out of the
>> spam checking task.

> My understanding is that when delivering mail,
> vpopmail looks for these files in the following order:
> 
>   ~vpopmail/domains/domain.com/.qmail-user
>   ~vpopmail/domains/domain.com/user/.qmail
>   ~vpopmail/domains/domain.com/.qmail/default

No. It's slightely different.

qmail-local looks for

~vpopmail/domains/domain.com/.qmail-user

and if this lookup fails it looks for 

~vpopmail/domains/domain.com/qmail-default

At _THIS_ stage control is given to vpopmail (with default
.qmail-default that calls 'vdelivermail').

vdelivermail is the one that looks up the user in vpasswd.cdb and, if
present, processes user/.qmail.

> So what is happening in your situation, is the
> .qmail-test file is prcessed by delivering the mail to
> "user", and then no further processing is done 

That's correct in so far as qmail-local already uses this file and
vpopmail never gains control over the delivery process.

> I am not sure why this was done this way, 

Read the qmail documentation and try to understand the "Big qmail
picture"[1].
Both together explain how delivery is done in qmail and where vpopmail
"steps in".

> If I was a coder, I would prolly see if I could change that behaviour
> myself :-)

If you were a coder and would have understood the qmail delivery system
you'd know how you can change this behavior.
It's all about _where_ to step in and "why e.g. qmailadmin is not
designed to support this kind of interception yet".
Creating aliases manually and including spamassassin in the delivery
chain ain't a problem, the only problem is keeping this persistent when
modifying aliases with qmailadmin.

[1] http://www.nrg4u.com/
-- 
Ciao,
 Pit



Re: [vchkpw] Aliases not working with maildrop & spamassassin?

2003-06-06 Thread Dzuy Nguyen
I thought I had solved this problem for a client of mine.

At the domain level, qmail seems to read .qmail- then .qmail-default file
for delivery instruction.  So if your .qmail-test file says /user/Maildir
(default by qmailadmin), it'll completely bypass .qmail-default.  Yes, your
.qmail-test should include   like in .qmail-default, which
will invoke maildrop but spam tagging rule will be ignored because it can't find
you "test" alias in the database.
You can choose to fix it at the database schema level, which probably will
require a re-architecting the whole system.  Fortunately, maildrop can be
scripted to manipulate the way mail is delivered.  What I've done was added a
little code in the mailfilter file:
# Environment variables needed
import HOME
import EXT  # user
import HOST # domain
ALIASTO=$1
if("$xALIAS" ne "x")
{
EXT=$ALIASTO
}
and my .qmail-test would say:

/path/to/maildrop /path/to/mailfilter user

so when maildrop is invoked, mailfilter checks to see if there's a command line
option passed to it.  If there is, change the environment variable EXT and pass
it through spamd.
If you choose to do it at the user level, i.e. Maildir/.qmail, it might not work
(depending on your mailfilter) because it'll execute maildrop and then
delivermail, which would then reads .qmail-ext and .qmail-default, then
Maildir/.qmail and the cycle is repeated.  Even if you can program your
mailfilter to break the cycle, CPU time is wasted in another qmail cycle.
Then again, my approach runs into problem when you have a .qmail- file
because of the loosely defined .qmail- system, but that's another topic.
Dzuy

Jasper Metselaar wrote:
Hi,

I have a real [EMAIL PROTECTED] which is tagged for spam checking. The .qmail-default contains

| /usr/local/bin/maildrop 

which calls maildrop and in mailfilter, runs through spamd to check for spam then pass 
it back to vdelivermail to deliver to the proper mailbox. Then I created a [EMAIL 
PROTECTED], which is an alias to [EMAIL PROTECTED] A .qmail-test is created which 
points to mydomain.com/user/Maildir. When an email
is sent to [EMAIL PROTECTED], qmail just dumps it directly into user's 
mailbox,completely out of the spam checking task.
Shouldn't the .qmail-test file's content be the same as the .qmail-default file?
How do you enable alias to behave the same as the account that it's aliased to? Of 
course I can use a forwarder to [EMAIL PROTECTED] instead, but I don't think this is 
the best wayor?
Thanks in advance for your suggestions!

Jasper

___








Re: [vchkpw] Aliases not working with maildrop & spamassassin?

2003-06-05 Thread matthew berardi
On Thu, 5 Jun 2003 04:39:56 -0400
Jasper Metselaar <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have a real [EMAIL PROTECTED] which is tagged for spam checking. The 
> .qmail-default contains
> 
> | /usr/local/bin/maildrop 
> 
> which calls maildrop and in mailfilter, runs through spamd to check for spam then 
> pass it back to vdelivermail to deliver to the proper mailbox. Then I created a 
> [EMAIL PROTECTED], which is an alias to [EMAIL PROTECTED] A .qmail-test is created 
> which points to mydomain.com/user/Maildir. When an email
> is sent to [EMAIL PROTECTED], qmail just dumps it directly into user's 
> mailbox,completely out of the spam checking task.
> 
> Shouldn't the .qmail-test file's content be the same as the .qmail-default file?
> How do you enable alias to behave the same as the account that it's aliased to? Of 
> course I can use a forwarder to [EMAIL PROTECTED] instead, but I don't think this is 
> the best wayor?
> 
> Thanks in advance for your suggestions!
> 
> Jasper
> 
> ___
> 
> 
> 
it is actually very simple, /mydomain/user/Maildir/ is a delivery statement, you are 
telling it to deliver to that mailbox, that's what is says. if you don't want the mail 
to be delivered to that box, don't put a delivery statement in the .qmail.

if you put "| /path/to/maildrop ..." you'd be telling it to run maildrop
if you put "&[EMAIL PROTECTED]" you'd be telling it to redeliver the message as though 
it was for user, at which point it would go through the process of reading .qmail 
files for user

read http://www.qmail.org/man/man5/dot-qmail.html, it explains it all.



Re: [vchkpw] Aliases not working with maildrop & spamassassin?

2003-06-05 Thread Rick Macdougall
Hi,

You want to use forwards instead of aliases to get around that.

Ie you want
&[EMAIL PROTECTED] in the .qmail-test
not
/home/vpopmail/domains/domain.com/someguy/Maildir/
Doing it that way, it gets re-submitted and scanned by the .qmail-default

Regards,

Rick

Alan Murrell wrote:

Hi Jaspar,


is sent to [EMAIL PROTECTED], qmail just dumps it
directly into user's mailbox,completely out of the
spam checking task.


My understanding is that when delivering mail,
vpopmail looks for these files in the following order:
  ~vpopmail/domains/domain.com/.qmail-user
  ~vpopmail/domains/domain.com/user/.qmail
  ~vpopmail/domains/domain.com/.qmail/default
It will process according to the first one it comes
across, then stop further checking.
So what is happening in your situation, is the
.qmail-test file is prcessed by delivering the mail to
"user", and then no further processing is done (i.e.,
it does not then process the mail through the
recipient's .qmail* files).
As such, Aliases and Forwards will not be processed by
spamd.
I am not sure why this was done this way, but that the
way it is.  If I was a coder, I would prolly see if I
could change that behaviour myself :-)
HTH,

Alan Murrell <[EMAIL PROTECTED]>

__ 
Post your free ad now! http://personals.yahoo.ca






Re: [vchkpw] Aliases not working with maildrop & spamassassin?

2003-06-05 Thread Alan Murrell
Hi Jaspar,

> is sent to [EMAIL PROTECTED], qmail just dumps it
> directly into user's mailbox,completely out of the
> spam checking task.

My understanding is that when delivering mail,
vpopmail looks for these files in the following order:

  ~vpopmail/domains/domain.com/.qmail-user
  ~vpopmail/domains/domain.com/user/.qmail
  ~vpopmail/domains/domain.com/.qmail/default

It will process according to the first one it comes
across, then stop further checking.

So what is happening in your situation, is the
.qmail-test file is prcessed by delivering the mail to
"user", and then no further processing is done (i.e.,
it does not then process the mail through the
recipient's .qmail* files).

As such, Aliases and Forwards will not be processed by
spamd.

I am not sure why this was done this way, but that the
way it is.  If I was a coder, I would prolly see if I
could change that behaviour myself :-)

HTH,

Alan Murrell <[EMAIL PROTECTED]>


__ 
Post your free ad now! http://personals.yahoo.ca