PDA

View Full Version : Queue and Maildrop problem


Colin
04-20-2005, 05:05 AM
My Qmail is up and running on Sparc/Solaris9.

However, outbound mail seems to be getting queued indefinitely and nothing is being delivered locally...seems I have a bunch of problems

My qmail-send/current log shows:

@40000000426624c00113526c delivery 1013: deferral: /usr/local/bin/maildrop:_Unable_to_open_filter_file,_errno=2./
@40000000426624c001137594 status: local 3/10 remote 1/120
@40000000426624c001179ffc delivery 1015: deferral: Temporary_error_on_maildir_delivery._(#4.3.0)/
@40000000426624c00117bf3c status: local 2/10 remote 1/120
@40000000426624c0011c8db4 delivery 1019: deferral: /usr/local/bin/maildrop:_Unable_to_open_filter_file,_errno=2./
@40000000426624c0011cb0dc status: local 1/10 remote 1/120
@40000000426624c001f26f9c delivery 1020: deferral: /usr/local/bin/maildrop:_Unable_to_open_filter_file,_errno=2./
@40000000426624c001f29e7c status: local 0/10 remote 1/120
@40000000426624c8310896e4 delivery 2: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connecti on._(#4.4.1)/


My qmail-smtpd/current doesn't seem to show anything bad:

@40000000426600e61648950c tcpserver: status: 0/30
@400000004266062c398bc5fc tcpserver: status: 0/30

My qmHandle -s shows:

Messages in local queue: 1018
Messages in remote queue: 0

Qmailctl stat:

/service/qmail-send: up (pid 27615) 1204 seconds
/service/qmail-send/log: up (pid 27620) 1204 seconds
/service/qmail-smtpd: up (pid 27621) 1204 seconds
/service/qmail-smtpd/log: up (pid 27619) 1204 seconds
messages in queue: 1018
messages in queue but not yet preprocessed: 0

My readproctitle service errors:

root 326 323 0 Apr 09 ? 5:09 readproctitle service errors: .................................................

My /etc/passwd has the following users :

alias:x:10003:103::/var/qmail/alias:/bin/false
qmaild:x:10004:103::/var/qmail:/bin/false
qmaill:x:10005:103::/var/qmail:/bin/false
qmailp:x:10006:103::/var/qmail:/bin/false
qmailq:x:10007:104::/var/qmail:/bin/false
qmailr:x:10008:104::/var/qmail:/bin/false
qmails:x:10009:104::/var/qmail:/bin/false
vpopmail:x:10010:105:Vpopmail:/var/qmail/vpopmail:/bin/false
clamav:x:10011:106::/tmp:/bin/false
spamd:x:10012:107::/home/spamd:/bin/false
qscand:x:10013:108::/tmp:/bin/false

And I have the following groups:

qmail::104:
vchkpw::105:vpopmail
clamav::106:
spamd::107:
qscand::108:

My vpopmail is installed in /usr/local/vpopmail



I've worked through doc/TEST.deliver (local-local, local-error, local-remote, local-postmaster, double-bounce and group embership). The local-remote doesn't seem to work but doesn't give any useful error. The Group memberhsip test is a mystery and doesn't seem to do anything for me.

The doc/TEST.recieve SMTP test seems to work - but nothing gets delivered-


SYMPTOM SUMMARY

Sending from me@gmail to myuser@myvirtualdomain.com on my qmailhost fails.

Sending from cmd line on my qmailhost to me@gmail succeeds.

Sending mail from cmd line to a local account on my qmailhost with echo to:myuser@myvirtualdomain | /var/qmail/bin/qmail-inject seems to fail

All the current mails in the queue are locally generated from another unrelated application.

My ISP insists these ports are open (http://solaris.qmailrocks.org/checklist_solaris.htm)

qmHandle -a produces the log errors above


I'm unsure where to go from here. Any suggestions??? Anybody? Please?

Donboy
04-20-2005, 09:16 AM
Maybe you need to compile mysql support into your maildrop?

If you have the source for maildrop already on your machine, just check to be sure /etc/maildropmysql.config is correct, then do...

./configure --enable-maildropmysql --with-mysqlconfig=/etc/maildropmysql.config
make
make install-strip
make install-man

Colin
04-20-2005, 10:02 AM
Donboy

Thanks. Before I try this...

will this mean that maildrop will require a mysql backend? What does it use it for?

I don't really want to have to setup and run mysql on this host too...

Donboy
04-20-2005, 10:55 AM
oh, nevermind. I was just taking a stab in the dark. If you're not using mysql with this, then don't worry about it.

It could be permissions on the filter files. I think the manual says they need to be chmod 666. You may also have a parent directory of your filter files that isn't executable.

If not this, then I dont know. Maildrop isn't my thing.

Colin
04-20-2005, 11:33 AM
I'll check them out - thanks for the suggestions

Colin
04-20-2005, 01:27 PM
ok... I think I'm closing in on this one.

I'm running maildrop 1.8.0 and virtual domains with user accounts is in ~vpopmail/domains

My users dirs contains a .qmail which says :

|preline /usr/local/bin/maildrop /etc/mailfilter

Unfortunately I don't seem to have a mailfilter or maildroprc file in /etc

Can anyone point me to an example/template?

Any ideas why this didn't get installed when I compiled maildrop at make-strip time?

parsec
04-20-2005, 09:18 PM
Because it doesn't know what you want in your filter rules.

Generally the mailfilter file has rules specific to the domain or email account.

You are best off changing |preline /usr/local/bin/maildrop /etc/mailfilter to |preline /usr/local/bin/maildrop mailfilter and include the mailfilter file in the same directory as your .qmail file.

Ensure the mailfilter file is owned by vpopmail:vchkpw and is chmod 600 (same as the .qmail file).

Btw, why are you using maildrop to deliver the mail?

Google for some mailfilter examples.

Colin
04-21-2005, 04:17 AM
I'm using maildrop in accordance with the instruction here -
http://solaris.qmailrocks.org/maildrop.htm
I assume it's the agent that calls Spamassassin...

Even with a mailfilter file, mail is not being delivered and my qmail-send/current log is now saying this -

@40000000426770362b8fae14 new msg 1836
@40000000426770362b8fdcf4 info msg 1836: bytes 645 from <my virtualuser@myvirtualdomain.com> qp 19616 uid 10013
@4000000042677036327d6464 starting delivery 14: msg 1836 to local myvirtualdomain.com-myvirtualuser@myvirtualdomain.com
@4000000042677036327d972c status: local 1/10 remote 0/120
@40000000426770370fc78ef4 delivery 14: success: maildrop:_error_writing_to_filter./did_0+0+1/

@40000000426771b3027f80e4 status: local 2/10 remote 1/120
@40000000426771b30502f38c delivery 26: deferral: Temporary_error_on_maildir_delivery._(#4.3.0)/
@40000000426771b30503226c status: local 1/10 remote 1/120
@40000000426771b3053601dc delivery 27: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/


Any idea why maildrop wants to write to the filter?

My maildirs live in ~vpopmail/domains/virtualdomain.com/user/Maildir
Their perms are 700 with vpopmail:vchkpw
The domains and users are created with vqadmin

I have a global mailfilter like this:

import EXT
import HOST
VHOME=`/var/qmail/vpopmail/bin/vuserinfo -d $EXT@$HOST`

if ( $SIZE < 262144 )
{
exception {
xfilter "/usr/bin/spamc -f -u $EXT@$HOST"
}
}

if (/^X-Spam-Flag: *YES/)
{
# try filtering it using user-defined rules
exception {
include $VHOME/Maildir/.mailfilter
}
# then try delivering it to the Trash folder
exception {
# to "$VPOP"
to "$VHOME/Maildir/.Trash/"
}
# or uncomment the following to send it to the .spam folder
# exception {
# # to "$VPOP"
# to "$VHOME/Maildir/.spam/"
# }

# if not go on with delivery
exception {
to "$VPOP"
}
}
else
{
exception {
include $VHOME/Maildir/.mailfilter
}
exception {
to "$VPOP"
}
}

Any advice/suggestions on where to go from here?

parsec
04-21-2005, 10:50 AM
Ok I don't use Solaris but I had a brief look and it appears mostly the same as the other distributions setups.

Spamassassin and clamav are called via the qmail scanner section using that as a preprocess by defining the qmailqueue in the qmail run files. Maildrop has nothing to do with it at all.

What I dont understand is why your deliver isn't the same as normal vpopmail setups and using ~/vpopmail/bin/vdelivermail to deliver the mail to the mailboxes. Maybe its a solaris thing. Hopefully someone else knows more.

verinux
10-21-2005, 07:27 AM
Try adding this line under VHOME

VPOP="$VHOME/Maildir/"

Hope this will helps

Indra T
http://www.verinux.com
http://www.rtrw.net