Hi All;
I seem to have broken my qmail installation. A user's machine was compromised by one of the email ecard trojans going around, and started sending out large quantities of spam. I have SME set up to use the SMTP proxy (set in Proxy settings) and I use the ISP's smtp server (set up in E-mail).
The offending machine is off the network now, but in order to clean up the mess I had to remove thousands of emails from the qmail queue. Browsing the forums I found that I could stop qmail services and then delete the emails, then restart qmail. By the way, this is the first time I deal with a qmail problem. So, I did the following:
service qmail stop
This command failed after a few minutes. So I moved on to
service qpsmtpd stop
service sqpsmtpd stop
These two commands worked. Then I deleted all of the contents (including the numbered directories, 0, 1, 2 through 22) of /var/qmail/queue/info, mess, and remote, and then the contents of intd.
Then I did a
service qmail start
service qpsmtpd start
service sqpsmtpd start
Then I went back and added the directories I had deleted, and changed the ownership and permissions to match a clean SME install that I use for reference.
Unfortunately, what I now have is this; email sent by clients arrives at the SME server, lands in the queue, and just stays there. No mail is sent, either local or outside. Here is the output from qmail-qstat:
# ./qmail-qstat
messages in queue: 53
messages in queue but not yet preprocessed: 53
Here is a snip from the current qpsmtpd log:
2007-07-26 22:51:18.495883500 5502 Accepted connection 0/40 from 192.168.0.111 / pc-00111.example.org
2007-07-26 22:51:18.496900500 5502 Connection from pc-00111.example.org [192.168.0.111]
2007-07-26 22:51:18.498662500 5502 running plugin (set_hooks): peers
2007-07-26 22:51:18.500331500 5502 trying to get config for peers/192.168.0
2007-07-26 22:51:18.512669500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.513632500 5502 trying to get config for peers/192.168.0
2007-07-26 22:51:18.514191500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.516214500 5502 peers hooking valid_auth
2007-07-26 22:51:18.516924500 5502 peers hooking set_hooks
2007-07-26 22:51:18.517755500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.518900500 5502 logging::logterse hooking queue
2007-07-26 22:51:18.519572500 5502 logging::logterse hooking deny
2007-07-26 22:51:18.520213500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.521128500 5502 check_relay hooking connect
2007-07-26 22:51:18.522118500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539585500 5502 check_norelay hooking connect
2007-07-26 22:51:18.539590500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539593500 5502 check_basicheaders hooking data_post
2007-07-26 22:51:18.539596500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539598500 5502 check_badmailfrom hooking rcpt
2007-07-26 22:51:18.539601500 5502 check_badmailfrom hooking mail
2007-07-26 22:51:18.539603500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539606500 5502 check_badrcptto_patterns hooking rcpt
2007-07-26 22:51:18.539625500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539628500 5502 check_badrcptto hooking rcpt
2007-07-26 22:51:18.539631500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539633500 5502 check_spamhelo hooking ehlo
2007-07-26 22:51:18.539636500 5502 check_spamhelo hooking helo
2007-07-26 22:51:18.539638500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539641500 5502 check_goodrcptto hooking rcpt
2007-07-26 22:51:18.539644500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539652500 5502 rcpt_ok hooking rcpt
2007-07-26 22:51:18.539655500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539657500 5502 tnef2mime hooking data_post
2007-07-26 22:51:18.539660500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.539905500 5502 virus::clamav hooking data_post
2007-07-26 22:51:18.540995500 5502 trying to get config for plugin_dirs
2007-07-26 22:51:18.542171500 5502 queue::qmail_2dqueue hooking queue
2007-07-26 22:51:18.543712500 5502 Plugin peers, hook set_hooks returned DECLINED,
2007-07-26 22:51:18.544534500 5502 running plugin (connect): check_relay
2007-07-26 22:51:18.545103500 5502 trying to get config for relayclients
2007-07-26 22:51:18.557684500 5502 trying to get config for morerelayclients
2007-07-26 22:51:18.558834500 5502 Plugin check_relay, hook connect returned DECLINED,
2007-07-26 22:51:18.559744500 5502 running plugin (connect): check_norelay
2007-07-26 22:51:18.560381500 5502 trying to get config for norelayclients
2007-07-26 22:51:18.579384500 5502 Plugin check_norelay, hook connect returned DECLINED,
2007-07-26 22:51:18.580112500 5502 trying to get config for smtpgreeting
2007-07-26 22:51:18.598839500 5502 220 smeserver.example.org ESMTP
2007-07-26 22:51:18.600109500 5502 trying to get config for timeoutsmtpd
2007-07-26 22:51:18.600792500 5502 trying to get config for timeout
2007-07-26 22:51:18.601521500 5502 dispatching EHLO [192.168.0.111]
2007-07-26 22:51:18.602697500 5502 running plugin (ehlo): check_spamhelo
2007-07-26 22:51:18.603560500 5502 trying to get config for badhelo
2007-07-26 22:51:18.604506500 5502 Plugin check_spamhelo, hook ehlo returned DECLINED,
2007-07-26 22:51:18.605406500 5502 trying to get config for tls_before_auth
2007-07-26 22:51:18.605942500 5502 trying to get config for me
2007-07-26 22:51:18.606598500 5502 trying to get config for databytes
2007-07-26 22:51:18.607231500 5502 trying to get config for databytes
2007-07-26 22:51:18.608134500 5502 250-example.org Hi pc-00111.example.org [192.168.0.111]
2007-07-26 22:51:18.608651500 5502 250-PIPELINING
2007-07-26 22:51:18.609024500 5502 250-8BITMIME
2007-07-26 22:51:18.609397500 5502 250 SIZE 15000000
2007-07-26 22:51:18.610451500 5502 dispatching MAIL FROM:<person@example.org> SIZE=357
2007-07-26 22:51:18.611305500 5502 full from_parameter: FROM:<person@example.org> SIZE=357
2007-07-26 22:51:18.612651500 5502 from email address : [<person@example.org>]
2007-07-26 22:51:18.614142500 5502 running plugin (mail): check_badmailfrom
2007-07-26 22:51:18.614815500 5502 trying to get config for badmailfrom
2007-07-26 22:51:18.639302500 5502 Plugin check_badmailfrom, hook mail returned DECLINED,
2007-07-26 22:51:18.640454500 5502 getting mail from <person@example.org>
2007-07-26 22:51:18.641027500 5502 250 <person@example.org>, sender OK - how exciting to get mail from you!
2007-07-26 22:51:18.642066500 5502 dispatching RCPT TO:<anotherperson@gmail.com>
2007-07-26 22:51:18.643117500 5502 to email address : [<anotherperson@gmail.com>]
2007-07-26 22:51:18.644188500 5502 running plugin (rcpt): check_badmailfrom
2007-07-26 22:51:18.644839500 5502 Plugin check_badmailfrom, hook rcpt returned DECLINED,
2007-07-26 22:51:18.645364500 5502 running plugin (rcpt): check_badrcptto_patterns
2007-07-26 22:51:18.645935500 5502 Plugin check_badrcptto_patterns, hook rcpt returned DECLINED,
2007-07-26 22:51:18.646366500 5502 running plugin (rcpt): check_badrcptto
2007-07-26 22:51:18.646973500 5502 Plugin check_badrcptto, hook rcpt returned DECLINED,
2007-07-26 22:51:18.647418500 5502 running plugin (rcpt): check_goodrcptto
2007-07-26 22:51:18.648289500 5502 Plugin check_goodrcptto, hook rcpt returned DECLINED,
2007-07-26 22:51:18.648951500 5502 running plugin (rcpt): rcpt_ok
2007-07-26 22:51:18.649608500 5502 trying to get config for me
2007-07-26 22:51:18.650060500 5502 trying to get config for rcpthosts
2007-07-26 22:51:18.650962500 5502 trying to get config for morercpthosts
2007-07-26 22:51:18.651740500 5502 Plugin rcpt_ok, hook rcpt returned OK,
2007-07-26 22:51:18.652906500 5502 250 <anotherperson@gmail.com>, recipient ok
2007-07-26 22:51:18.654748500 5502 dispatching DATA
2007-07-26 22:51:18.655949500 5502 354 go ahead
2007-07-26 22:51:18.656938500 5502 trying to get config for databytes
2007-07-26 22:51:18.657651500 5502 max_size: 15000000 / size: 0
2007-07-26 22:51:18.658534500 5502 trying to get config for timeout
2007-07-26 22:51:18.669596500 5502 spooling message to disk
2007-07-26 22:51:18.716976500 5502 max_size: 15000000 / size: 346
2007-07-26 22:51:18.718143500 5502 trying to get config for me
2007-07-26 22:51:18.719479500 5502 running plugin (data_post): check_basicheaders
2007-07-26 22:51:18.720525500 5502 Plugin check_basicheaders, hook data_post returned DECLINED,
2007-07-26 22:51:18.721238500 5502 running plugin (data_post): tnef2mime
2007-07-26 22:51:18.772092500 5502 Plugin tnef2mime, hook data_post returned DECLINED,
2007-07-26 22:51:18.772587500 5502 running plugin (data_post): virus::clamav
2007-07-26 22:51:18.773334500 5502 virus::clamav plugin: Changing permissions on file to permit scanner access
2007-07-26 22:51:18.773857500 5502 virus::clamav plugin: Running: /usr/bin/clamdscan --stdout --config-file=/etc/clamd.conf --disable-summary /var/spool/qpsmtpd/1185504678:5502:0 2>&1
2007-07-26 22:51:18.811408500 5502 virus::clamav plugin: clamscan results: /var/spool/qpsmtpd/1185504678:5502:0: OK
2007-07-26 22:51:18.812065500 5502 trying to get config for me
2007-07-26 22:51:18.813229500 5502 Plugin virus::clamav, hook data_post returned DECLINED,
2007-07-26 22:51:18.814092500 5502 running plugin (queue): logging::logterse
2007-07-26 22:51:18.815705500 5502 logging::logterse plugin: ` 192.168.0.111 pc-00111.example.org [192.168.0.111] <person@example.org> <anotherperson@gmail.com> queued <46A95E14.60206@example.org>
2007-07-26 22:51:18.816319500 5502 Plugin logging::logterse, hook queue returned DECLINED,
2007-07-26 22:51:18.816727500 5502 running plugin (queue): queue::qmail_2dqueue
2007-07-26 22:51:18.821682500 5507 queue::qmail_2dqueue plugin: (for 5502 ) Queuing qp 5507 to /var/qmail/bin/qmail-queue
2007-07-26 22:51:18.840788500 5502 Plugin queue::qmail_2dqueue, hook queue returned OK, Queued! 1185504678 qp 5507 <46A95E14.60206@example.org>
2007-07-26 22:51:18.841491500 5502 250 Queued! 1185504678 qp 5507 <46A95E14.60206@example.org>
2007-07-26 22:51:18.845161500 5502 dispatching QUIT
2007-07-26 22:51:18.845916500 5502 trying to get config for me
2007-07-26 22:51:18.846398500 5502 221 example.org closing connection. Have a wonderful day.
2007-07-26 22:51:18.846972500 5502 click, disconnecting
2007-07-26 22:51:19.422782500 4095 cleaning up after 5502
Any help with this would be appreciated.
-dtech