Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-15 Thread foo
Jeremy Kitchen <[EMAIL PROTECTED]> wrote:
> On Mon, 2003-12-15 at 13:26, [EMAIL PROTECTED] wrote:
>> This is because spamc is a perlscript, as well as spamd.  Spamc has
>> the '-w' perl flag in the interpreter line.  Remove it.  -w just
>> adds additional warnings.
> 
> err... spamc is written in C bud.  spamd is the perl script.

asdljfkajsdfl

I was close :(


-Robertson






Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-15 Thread Jeremy Kitchen
On Mon, 2003-12-15 at 13:26, [EMAIL PROTECTED] wrote:
> This is because spamc is a perlscript, as well as spamd.  Spamc has the '-w'
> perl flag in the interpreter line.  Remove it.  -w just adds additional
> warnings.

err... spamc is written in C bud.  spamd is the perl script.

-Jeremy

-- 
Jeremy Kitchen
Systems Administrator
[EMAIL PROTECTED]
Kitchen @ #qmail on EFNet - Join the party!
.
Inter7 Internet Technologies, Inc.
www.inter7.com
866.528.3530 toll free
847.492.0470 int'l
847.492.0632 fax
GNUPG key ID: 93BDD6CE




Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-15 Thread foo
Rodney M <[EMAIL PROTECTED]> wrote:
> If I use your spamd line (/usr/bin/spamd -v -a -c), I get the
> following error in /var/log/maillog:

I don't use -d because I run spamd via daemontools.  It has a tendancy to
crash on occasion..


> Dec 15 12:12:32 gigantic spamd[46584]: connection from localhost
> [127.0.0.1] at port 2529
> Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at
> /usr/local/bin/spamd line 1101,  chunk 2.
> Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at
> /usr/local/bin/spamd line 1123,  chunk 2.
> Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at
> /usr/local/bin/spamd line 1130,  chunk 2.
> Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at
> /usr/local/bin/spamd line 1130,  chunk 2.
> Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at
> /usr/local/bin/spamd line 657.

This is because spamc is a perlscript, as well as spamd.  Spamc has the '-w'
perl flag in the interpreter line.  Remove it.  -w just adds additional
warnings.


> Now Spamassassin creates the .spamassassin folder in the vpopmail
> users folder (ex:
> /home/vpopmail/domains/debaser.net/test/.spamassassin) the first time
> an email is sent to that users address.  The .razor folder and it's
> settings are still saved in the /home/vpopmail folder.

That's odd, I don't know what to tell you about that...


> The question is how do I get spamassassin to copy a default user_prefs
> file to the users vpopmail folder (so eventually my users can edit
> there own spamassassin settings)?  I setup a user_prefs file in
> usr/local/share/spamassassin/ but spamassassin didn't copy it to the
> vpopmail users .spamassassin folder.  Any ideas?

It won't copy existing files, it will only create new files.  Any variables
a user DOESN'T set in their home directory, gets loaded with whatever your
system defaults are.


-Robertson





Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-15 Thread Rodney M
[EMAIL PROTECTED] wrote:
Rodney M <[EMAIL PROTECTED]> wrote:

Thanks for the tip.  Over the weekend I finally fixed my problem.  For
starters, in order to use spamc (instead of spamassassin) you have to
have spamd running.  I'm starting spamd like so:
spamd -d -a -v -x -u vpopmail -H /home/vpopmail/

For some reason maildrop didn't like my original mailfilter so I used
the following that was posted on the qmailadmin list recently:


Remove the -u from the spamd startup line, you shouldn't need the -H either.
Your mailfilter calls spamc with the -u command, so you don't need it with
spamd.
By the way, I use the same filter, and it works great.

My spamd line is: /usr/bin/spamd -v -a -c

-Robertson
If I use your spamd line (/usr/bin/spamd -v -a -c), I get the following 
error in /var/log/maillog:

Dec 15 12:12:32 gigantic spamd[46584]: connection from localhost 
[127.0.0.1] at port 2529
Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at 
/usr/local/bin/spamd line 1101,  chunk 2.
Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at 
/usr/local/bin/spamd line 1123,  chunk 2.
Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at 
/usr/local/bin/spamd line 1130,  chunk 2.
Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at 
/usr/local/bin/spamd line 1130,  chunk 2.
Dec 15 12:12:32 gigantic spamd[46609]: Use of uninitialized value at 
/usr/local/bin/spamd line 657.

My mailfilter invokes spamc as "/usr/local/bin/spamc -f -u [EMAIL PROTECTED]". 
 Any idea why I'm getting that error?  Also, shouldn't you be using the 
-d flag to daemonize spamd?

I changed my spamd.sh start-up script as follows (the only change from 
my previous start-up script is that I removed the -x and the -H 
/home/vpopmail option):

---start---
# Startup / shutdown script for SpamAssassin daemon
case "$1" in
start)
/usr/local/bin/spamd -d -a -v -u vpopmail && echo -n ' spamd'
;;
stop)
spamdpid=`ps -ax | grep spamd | grep -v grep | grep -v sh | awk 
'{ print $1 }'`
if [ "$spamdpid" != "" ]; then
kill $spamdpid > /dev/null 2>&1
echo -n " spamd"
fi
;;

*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0
---end---
Now Spamassassin creates the .spamassassin folder in the vpopmail users 
folder (ex: /home/vpopmail/domains/debaser.net/test/.spamassassin) the 
first time an email is sent to that users address.  The .razor folder 
and it's settings are still saved in the /home/vpopmail folder.

The question is how do I get spamassassin to copy a default user_prefs 
file to the users vpopmail folder (so eventually my users can edit there 
own spamassassin settings)?  I setup a user_prefs file in 
usr/local/share/spamassassin/ but spamassassin didn't copy it to the 
vpopmail users .spamassassin folder.  Any ideas?

Rodney




Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-15 Thread foo
Rodney M <[EMAIL PROTECTED]> wrote:
> Thanks for the tip.  Over the weekend I finally fixed my problem.  For
> starters, in order to use spamc (instead of spamassassin) you have to
> have spamd running.  I'm starting spamd like so:
>
> spamd -d -a -v -x -u vpopmail -H /home/vpopmail/
>
> For some reason maildrop didn't like my original mailfilter so I used
> the following that was posted on the qmailadmin list recently:

Remove the -u from the spamd startup line, you shouldn't need the -H either.
Your mailfilter calls spamc with the -u command, so you don't need it with
spamd.

By the way, I use the same filter, and it works great.

My spamd line is: /usr/bin/spamd -v -a -c

-Robertson





Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-15 Thread Rodney M
[EMAIL PROTECTED] wrote:
Rodney M wrote:

Dec 13 12:55:08 gigantic imapd: Connection, ip=[:::127.0.0.1]
Dec 13 12:55:08 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#1 of 3): Connection refused
Dec 13 12:55:09 gigantic imapd: LOGIN, [EMAIL PROTECTED], 
ip=[:::127.0.0.1], protocol=IMAP
Dec 13 12:55:09 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#2 of 3): Connection refused
Dec 13 12:55:10 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#3 of 3): Connection refused
Dec 13 12:55:11 gigantic spamc[31970]: connection attempt to spamd 
aborted after 3 retries
Dec 13 12:55:11 gigantic maildrop[31965]: Unable to open mailbox.
Dec 13 12:55:11 gigantic qmail: 1071338111.882389 delivery 1266: 
deferral: /usr/local/bin/maildrop:_Unable_to_open_mailbox./


For starters, spamd isn't running.  The maildrop 'unable to open 
mailbox' error is probably your mailfilter rules.  It's probably trying 
to dump mail into an invalid path or something similar.

Add this to your maildrop main filter file:

VERBOSE="5"

Then send the message, and watch the maillog.  Maildrop should dump very 
verbose error messages into the maillog.
Thanks for the tip.  Over the weekend I finally fixed my problem.  For 
starters, in order to use spamc (instead of spamassassin) you have to 
have spamd running.  I'm starting spamd like so:

spamd -d -a -v -x -u vpopmail -H /home/vpopmail/

For some reason maildrop didn't like my original mailfilter so I used 
the following that was posted on the qmailadmin list recently:

---start---
import EXT
import HOST
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
`test -d $VHOME/Maildir/.Spam`
if( $RETURNCODE = 1 )
{
  `/usr/local/bin/maildirmake -f Spam $VHOME/Maildir`
}
if ( $SIZE < 262144 )
{
  xfilter "/usr/local/bin/spamc -f -u [EMAIL PROTECTED]"
  if (/^X-Spam-Flag: *YES/)
  {
 to $VHOME/Maildir/.Spam
 exit
  }
  else
  {
 to $VHOME/Maildir
 exit
  }
}
else
{
  to $VHOME/Maildir
  exit
}
---finish---
Now it's working great.  My next step is trying to figure out how to get 
spamassassin to setup/read individual user prefs for vpopmail accounts. 
   Has anyone done this successfully?

Rodney




Re: [vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-13 Thread [EMAIL PROTECTED]
Rodney M wrote:

Dec 13 12:55:08 gigantic imapd: Connection, ip=[:::127.0.0.1]
Dec 13 12:55:08 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#1 of 3): Connection refused
Dec 13 12:55:09 gigantic imapd: LOGIN, [EMAIL PROTECTED], 
ip=[:::127.0.0.1], protocol=IMAP
Dec 13 12:55:09 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#2 of 3): Connection refused
Dec 13 12:55:10 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#3 of 3): Connection refused
Dec 13 12:55:11 gigantic spamc[31970]: connection attempt to spamd 
aborted after 3 retries
Dec 13 12:55:11 gigantic maildrop[31965]: Unable to open mailbox.
Dec 13 12:55:11 gigantic qmail: 1071338111.882389 delivery 1266: 
deferral: /usr/local/bin/maildrop:_Unable_to_open_mailbox./


For starters, spamd isn't running.  The maildrop 'unable to open 
mailbox' error is probably your mailfilter rules.  It's probably trying 
to dump mail into an invalid path or something similar.

Add this to your maildrop main filter file:

VERBOSE="5"

Then send the message, and watch the maillog.  Maildrop should dump very 
verbose error messages into the maillog.

--

-Robertson




[vchkpw] Re: vpopmail, maildrop and spamassassin problem

2003-12-13 Thread Rodney M
slim wrote:
When I try to send a message to [EMAIL PROTECTED], I see this in 
/var/log/maillog:
Dec 12 22:30:27 gigantic qmail: 1071286227.908530 starting delivery 
756: msg 321 to local [EMAIL PROTECTED]
Dec 12 22:30:27 gigantic qmail: 1071286227.908975 status: local 1/10 
remote 0/120
Dec 12 22:30:27 gigantic maildrop[68428]: Unable to open mailbox.
Dec 12 22:30:27 gigantic qmail: 1071286227.927171 delivery 756: 
deferral:Unable_to_execute_/nonexistent/Unable_to_execute_/nonexistent/
Unable_to_execute_/nonexistent//usr/local/bin/maildrop:_Unable_to_open_mai 
lbox./


Make sure the vpopmail user has a valid shell in passwd.
I am not sure if that the problem in this instance... But I ran into 
that problem before.
I added a shell to the vpopmail user.  Here is the entry in /etc/passwd:

vpopmail:*:89:89:Vpopmail Account:/home/vpopmail:/bin/sh

Now when I send an email to [EMAIL PROTECTED], I see this in 
/var/log/maillog:

Dec 13 12:55:08 gigantic imapd: Connection, ip=[:::127.0.0.1]
Dec 13 12:55:08 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#1 of 3): Connection refused
Dec 13 12:55:09 gigantic imapd: LOGIN, [EMAIL PROTECTED], 
ip=[:::127.0.0.1], protocol=IMAP
Dec 13 12:55:09 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#2 of 3): Connection refused
Dec 13 12:55:10 gigantic spamc[31970]: connect(AF_INET) to spamd at 
127.0.0.1 failed, retrying (#3 of 3): Connection refused
Dec 13 12:55:11 gigantic spamc[31970]: connection attempt to spamd 
aborted after 3 retries
Dec 13 12:55:11 gigantic maildrop[31965]: Unable to open mailbox.
Dec 13 12:55:11 gigantic qmail: 1071338111.882389 delivery 1266: 
deferral: /usr/local/bin/maildrop:_Unable_to_open_mailbox./

Maildrop is still not working.  Maildrop was installed with UID=vpopmail 
and GID=vchkpw.  Any ideas?

Rodney




[vchkpw] Re: vpopmail & maildrop

2003-10-02 Thread til
Hi, 

thanks for this. Just out of curiosity, when and by which program is the 
variable part ([EMAIL PROTECTED]) set ? This is obviously a stupid question but i 
am still just a beginner with all this stuff... 

Thanks,
Till 

Jonathan Viney writes: 

Hi, 

On Sat, 2003-09-27 at 01:29, til wrote:
Hi,  

after fiddling around with my mailserver configuration, everything seems to 
work now except for one thing. I'd like to Catch-All non existent accounts 
to postmaster, so i tried to change the delivery instruction in .qmail / 
.qmail-default to filter messages to postmaster. the problem is, that once i 
change the delivery instructions, i catch ALL mail, even to other existing 
accounts. anyone got a clue (although this may be a little offtopic on this 
list) ? 
In your maildrop filter you could have something like... 

# Get maildir to deliver to
VHOME=`/home/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
 
# If it wasn't a valid user... set user to postmaster
if ($RETURNCODE != 0)
{
EXT="postmaster"
} 

That would probably do what you are after. 

Cheers,
Jonathan