ENTRIES
Welcome to Eric Cheng's online journal! You are not logged in. [ Log in ]
«  :: index ::  »

PLESK loop back vulnerability and qmail queues

:: Tuesday, November 8th, 2005 @ 9:18:53 pm

:: Tags:

My friend Dan told me one day, “Eric, you have more computer problems than anyone I know.”

Well, no shit! I use computers more than anyone else he knows. I lose hard disks all the time because I have 20 of spinning at any given moment. I also host something like 18 domains for various people, and computers basically all suck — especially when you aren’t an educated sysadmin (I am not). Also, Windows XP sucks on notebooks. My desktops are all rock solid, but my notebooks all tend to have driver problems.

But this entry is about PLESK, qmail, and spammers.

In July, one of my servers was hacked by Brazilians, which sucked. The one ISP in Brazil wouldn’t do anything about it, so we had to block out the entire country. Luckily, Chris managed to bring it back online while I was in Bonaire for the Digital Shootout, which saved all of the domains on the box.

A couple of weeks ago, the server stopped sending mail. Chris suggested that we reinstall everything because something might have been screwed up when the hackers got in last time. And so, we did (took a few days to get it right, and I had to migrate gigabytes of data to and from another server — several times), but a week after the reinstall, the problem started happening again. At this point, I started poking around the PLESK forums and found a few links, which Chris used to find a thread detailing a PLESK vulnerability that leads to a qmail queue of hundreds of thousands — or millions — of messages. Bastard spammers were sending mail from my box, and understandably, this prevents all mail from being sent out for hours, days, or weeks. (this is why my mail was failing)

The fix, of course, was to do this, in PLESK:

Go to CP >> Server >> Mail
… and change the whitelist IP from 127.0.0.1/8 to 127.0.0.1/32

Stupid PLESK. But it still didn't fix the problem. My box and domains are now getting nailed by dictionary-style spam attacks (where they take every possible name at a domain and send spam to it), and the bounce-back messages are clogging up the queue.

I poked around and read the following links, which helped me to devise a partial solution:

[PLESK forum talking about the vulnerability]
[Queue Management for Qmail (qmail-cleaner.py)]
[Qmail-Remove 0.95]
[qmHandle - a tool for the qmail queue]

What I've done is set up a daily cron job that runs:

qmHandle -S'failure notice'

... and e-mails me the output. The command deletes everything in the queue with the subject, 'failure notice', which is what my server sends back when it receives an e-mail to an illegal address. qmHandle is great; it automatically stops and starts the qmail service during its selective purging of messages.

Another solution would have been to prevent bounce-backs when mail to an illegal address is received, but that isn't great for people sending legitimate messages. I'll have to resort to that, if the queue fills up even with constant purging.

| Oakland, CA | link | trackback | Nov 8, 2005 21:18:53
  • http://www.lars-kirchhoff.de/journal/ Lars Kirchhoff

    Be careful with qmHandle. I used it and sometimes it fails to restart qmail. That happpened mostly, when large numbers of mails (500+) were deleted.

  • echeng

    lars — what would you recommend? manually restarting it (in the script), instead?

  • http://angelsworld.de Angels

    Just got here by doing a search on google. I have the same problem for months now (plesk8 – debian setup). I tried to disable (double-)bouncebacks. But so far the config is totally ignored. I am still searching for the “best” solution which stops this insanity.

  • http://www.davidhurst.co.uk David Hurst

    Nice idea with the Cron job.

    QMail really is a festering heap of steaming turd. We have set up our own Debian servers with Postfix. Unlike Qmail, which just accepts all messages and then worries about what to do with them, Postfix terminates connections from mail servers that have messages addressed to invalid recipients.

    QMail perpetually chokes on its own failure notice vomit. Completely useless for providing mail hosting services, unless you particularly like your customers constantly complaining.

    One of our Plesk/QMail boxes has taken it upon itself to send random numbers of multiple copies of every email sent through it. Thanks QMail.

  • http://www.ernaehrungsplan24.de Michael

    Its not working on my machine. What did I do wrong? Can anybody support? Thanks!

ARCHIVES
Journal Home
Where is Eric? (password)
Stuff for Sale
June 2013 (3)
May 2013 (2)
April 2013 (3)
March 2013 (1)
February 2013 (2)
January 2013 (3)
November 2012 (2)
October 2012 (3)
September 2012 (8)
August 2012 (8)
July 2012 (8)
June 2012 (8)
May 2012 (5)
April 2012 (8)
March 2012 (15)
February 2012 (7)
January 2012 (6)
December 2011 (8)
November 2011 (10)
October 2011 (12)
September 2011 (8)
August 2011 (14)
July 2011 (9)
June 2011 (9)
May 2011 (11)
April 2011 (11)
March 2011 (12)
February 2011 (23)
January 2011 (22)
December 2010 (16)
November 2010 (17)
October 2010 (26)
September 2010 (24)
August 2010 (24)
July 2010 (30)
June 2010 (26)
May 2010 (21)
April 2010 (26)
March 2010 (19)
February 2010 (17)
January 2010 (29)
December 2009 (21)
November 2009 (23)
October 2009 (32)
September 2009 (19)
August 2009 (34)
July 2009 (21)
June 2009 (30)
May 2009 (23)
April 2009 (18)
March 2009 (6)
February 2009 (25)
January 2009 (5)
December 2008 (6)
November 2008 (22)
October 2008 (27)
September 2008 (25)
August 2008 (34)
July 2008 (34)
June 2008 (32)
May 2008 (26)
April 2008 (15)
March 2008 (19)
February 2008 (31)
January 2008 (43)
December 2007 (33)
November 2007 (29)
October 2007 (29)
September 2007 (9)
August 2007 (19)
July 2007 (10)
June 2007 (17)
May 2007 (26)
April 2007 (38)
March 2007 (39)
February 2007 (13)
January 2007 (35)
December 2006 (35)
November 2006 (14)
October 2006 (6)
September 2006 (20)
August 2006 (24)
July 2006 (32)
June 2006 (17)
May 2006 (23)
April 2006 (16)
March 2006 (16)
February 2006 (26)
January 2006 (34)
December 2005 (17)
November 2005 (21)
October 2005 (18)
September 2005 (17)
August 2005 (5)
July 2005 (15)
June 2005 (20)
May 2005 (25)
April 2005 (7)
March 2005 (22)
February 2005 (20)
January 2005 (38)
December 2004 (6)
November 2004 (24)
October 2004 (16)
September 2004 (22)
August 2004 (12)
July 2004 (17)
June 2004 (15)
May 2004 (11)
April 2004 (35)
March 2004 (40)
February 2004 (29)
January 2004 (36)
December 2003 (20)
November 2003 (18)
October 2003 (10)
September 2003 (18)
August 2003 (10)
July 2003 (34)
June 2003 (12)
May 2003 (49)
April 2003 (42)
March 2003 (42)
February 2003 (15)
January 2003 (7)
December 2002 (17)
November 2002 (19)
October 2002 (24)
September 2002 (22)
August 2002 (20)
July 2002 (21)
June 2002 (14)
May 2002 (15)
April 2002 (11)
March 2002 (13)
February 2002 (20)
January 2002 (17)
December 2001 (16)
Even Older Journal
Travel Journals

CATEGORIES / TAGS
(25) (2) (1) (3) (1) (1) (1) (6) (2) (3) (11) (8) (3) (1) (1) (4) (2) (4) (2) (1) (6) (1) (1) (1) (6) (2) (1) (1) (3) (1) (5) (1) (1) (23) (1) (1) (1) (1) (1) (14) (1) (10) (1) (1) (1) (1) (1) (27) (6) (3) (2) (4) (4) (1) (41) (11) (12) (4) (38) (1) (3) (2) (4) (1) (1) (1) (2) (1) (1) (1) (1) (1) (10) (25) (8) (3) (2) (3) (2) (1) (5) (1) (1) (2) (1) (1) (14) (1) (4) (1) (1) (5) (43) (1) (3) (24) (1) (1) (1) (1) (5) (1) (4) (1) (1) (10) (3) (1) (1) (1) (1) (6) (5) (1) (1) (1) (3) (1) (3) (1) (1) (1) (69) (4) (3) (7) (3) (1) (16) (6) (1) (29) (1) (7) (1) (3) (4) (4) (1) (1) (1) (1) (1) (1) (1) (10) (4) (4) (2) (1) (89) (14) (1) (2) (79) (2) (2) (1) (1) (1) (1) (1) (1) (3) (2) (3) (1) (1) (24) (3) (5) (4) (1) (2)
MOST POPULAR
Most Popular Posts of All Time


Eric Cheng's RSS Journal Journal RSS
Eric Cheng's RSS Journal Comments RSS

proudly powered by wordpress
script exec time: 0.93s
i hate computers.