You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by JWM <te...@malcolms.com> on 2006/11/18 05:29:47 UTC
Rogue Email on spool pegs CPU
For the past 2 days, the CPU on my server has been pegged at 100%. I have
Apache, Tomcat, DNS, FTP, etc. on the same box, but I isolated it to James.
Stopping James caused the CPU to go down to nothing. The second I restarted
James, it pegged. I tried disabling SpamAssassin and my virus scan figuring
it was getting overwhelmed. No change. I know spam is increasing. But I
couldn't believe it could spike this quickly and hold forever at levels to
peg the CPU.
Well that's the background. I finally started scouring the logs. I found
an entry repeated many many times in the mailet log. (see bottom of this
note). No idea where the note came from (the webmaster id is mine... but I
didn't send it). But this one mail was definitely the culprit. James was
basically in an infinite tight loop sending to the 'remote server' named
localhost, which brought it right back in the front door to be sent out the
back door again to the remote server... ad infinitum.
Obviously, either it's something in my config or something inherent in
James. But I now know James doesn't get along well with email delivered to
null@localhost.
OK, once known, easy enough to fix... kill the server, delete that email
record from the spool table in the db, and life is good. But my main
question now is how to prevent this from occurring again should another
rogue email like this get in the system again. Is there something I can put
in the config to make James handle this more gracefully?
I am on 2.2.0a17.
Thanks.
Jerry
==============================
snippit of the repetitive entry from the mailet log
17/11/06 19:38:45 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
17/11/06 19:38:45 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
webmaster@jwmxxxxxxx.com is local
17/11/06 19:38:48 INFO James.Mailet: RemoteDelivery: Attempting delivery of
Mail1163813922470-90-to-localhost to host localhost at 127.0.0.1 to
addresses [null@localhost]
17/11/06 19:38:53 INFO James.Mailet: RemoteDelivery: Mail
(Mail1163813922470-90-to-localhost) sent successfully to localhost at
127.0.0.1
17/11/06 19:38:58 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
17/11/06 19:38:58 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
webmaster@jwmxxxxxxx.com is local
17/11/06 19:39:00 INFO James.Mailet: RemoteDelivery: Attempting delivery of
Mail1163813931080-92-to-localhost to host localhost at 127.0.0.1 to
addresses [null@localhost]
17/11/06 19:39:04 INFO James.Mailet: RemoteDelivery: Mail
(Mail1163813931080-92-to-localhost) sent successfully to localhost at
127.0.0.1
17/11/06 19:39:05 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
17/11/06 19:39:05 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
webmaster@jwmxxxxxxx.com is local
17/11/06 19:39:07 INFO James.Mailet: RemoteDelivery: Attempting delivery of
Mail1163813942470-94-to-localhost to host localhost at 127.0.0.1 to
addresses [null@localhost]
17/11/06 19:39:12 INFO James.Mailet: RemoteDelivery: Mail
(Mail1163813942470-94-to-localhost) sent successfully to localhost at
127.0.0.1
17/11/06 19:39:15 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
17/11/06 19:39:15 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
webmaster@jwmxxxxxxx.com is local
17/11/06 19:39:17 INFO James.Mailet: RemoteDelivery: Attempting delivery of
Mail1163813950017-95-to-localhost to host localhost at 127.0.0.1 to
addresses [null@localhost]
17/11/06 19:39:21 INFO James.Mailet: RemoteDelivery: Mail
(Mail1163813950017-95-to-localhost) sent successfully to localhost at
127.0.0.1
17/11/06 19:39:22 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
17/11/06 19:39:22 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
webmaster@jwmxxxxxxx.com is local
17/11/06 19:39:25 INFO James.Mailet: RemoteDelivery: Attempting delivery of
Mail1163813960080-96-to-localhost to host localhost at 127.0.0.1 to
addresses [null@localhost]
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Rogue Email on spool pegs CPU
Posted by Stefano Bagnara <ap...@bago.org>.
Hi JWM,
can you post your config.xml ?
Have you more information on the mail "Mail1163813922470-90-to-localhost" ?
"localhost" should be listed as local servername, so it is weird that
your mail has reached the RemoteDelivery.
James 2.2.0 should already have a protection for loops. In James 2.3.0
we didn't change anything about this, so it would be interesting to
understand how it happens so we can fix it in the next release.
Stefano
JWM wrote:
> For the past 2 days, the CPU on my server has been pegged at 100%. I have
> Apache, Tomcat, DNS, FTP, etc. on the same box, but I isolated it to James.
> Stopping James caused the CPU to go down to nothing. The second I restarted
> James, it pegged. I tried disabling SpamAssassin and my virus scan figuring
> it was getting overwhelmed. No change. I know spam is increasing. But I
> couldn't believe it could spike this quickly and hold forever at levels to
> peg the CPU.
>
> Well that's the background. I finally started scouring the logs. I found
> an entry repeated many many times in the mailet log. (see bottom of this
> note). No idea where the note came from (the webmaster id is mine... but I
> didn't send it). But this one mail was definitely the culprit. James was
> basically in an infinite tight loop sending to the 'remote server' named
> localhost, which brought it right back in the front door to be sent out the
> back door again to the remote server... ad infinitum.
>
> Obviously, either it's something in my config or something inherent in
> James. But I now know James doesn't get along well with email delivered to
> null@localhost.
>
> OK, once known, easy enough to fix... kill the server, delete that email
> record from the spool table in the db, and life is good. But my main
> question now is how to prevent this from occurring again should another
> rogue email like this get in the system again. Is there something I can put
> in the config to make James handle this more gracefully?
>
> I am on 2.2.0a17.
>
> Thanks.
>
> Jerry
>
> ==============================
> snippit of the repetitive entry from the mailet log
>
> 17/11/06 19:38:45 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
> webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
> 17/11/06 19:38:45 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
> webmaster@jwmxxxxxxx.com is local
> 17/11/06 19:38:48 INFO James.Mailet: RemoteDelivery: Attempting delivery of
> Mail1163813922470-90-to-localhost to host localhost at 127.0.0.1 to
> addresses [null@localhost]
> 17/11/06 19:38:53 INFO James.Mailet: RemoteDelivery: Mail
> (Mail1163813922470-90-to-localhost) sent successfully to localhost at
> 127.0.0.1
> 17/11/06 19:38:58 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
> webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
> 17/11/06 19:38:58 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
> webmaster@jwmxxxxxxx.com is local
> 17/11/06 19:39:00 INFO James.Mailet: RemoteDelivery: Attempting delivery of
> Mail1163813931080-92-to-localhost to host localhost at 127.0.0.1 to
> addresses [null@localhost]
> 17/11/06 19:39:04 INFO James.Mailet: RemoteDelivery: Mail
> (Mail1163813931080-92-to-localhost) sent successfully to localhost at
> 127.0.0.1
> 17/11/06 19:39:05 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
> webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
> 17/11/06 19:39:05 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
> webmaster@jwmxxxxxxx.com is local
> 17/11/06 19:39:07 INFO James.Mailet: RemoteDelivery: Attempting delivery of
> Mail1163813942470-94-to-localhost to host localhost at 127.0.0.1 to
> addresses [null@localhost]
> 17/11/06 19:39:12 INFO James.Mailet: RemoteDelivery: Mail
> (Mail1163813942470-94-to-localhost) sent successfully to localhost at
> 127.0.0.1
> 17/11/06 19:39:15 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
> webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
> 17/11/06 19:39:15 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
> webmaster@jwmxxxxxxx.com is local
> 17/11/06 19:39:17 INFO James.Mailet: RemoteDelivery: Attempting delivery of
> Mail1163813950017-95-to-localhost to host localhost at 127.0.0.1 to
> addresses [null@localhost]
> 17/11/06 19:39:21 INFO James.Mailet: RemoteDelivery: Mail
> (Mail1163813950017-95-to-localhost) sent successfully to localhost at
> 127.0.0.1
> 17/11/06 19:39:22 INFO James.Mailet: SenderIsLocal: SenderIsLocal:
> webmaster@jwmxxxxxxx.com -- org.apache.james.James@1f17e77
> 17/11/06 19:39:22 INFO James.Mailet: SenderIsLocal: SenderIsLocal: Sender:
> webmaster@jwmxxxxxxx.com is local
> 17/11/06 19:39:25 INFO James.Mailet: RemoteDelivery: Attempting delivery of
> Mail1163813960080-96-to-localhost to host localhost at 127.0.0.1 to
> addresses [null@localhost]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org