Forum .LRN Q&A: Re: notifcations keeps pumping out messages

Collapse
Posted by Matthew Geddert on
I had something similar things happen a while ago... and it didn't have anything to do with openacs/aolserver/etc. Especially if the server was stopped and the message kept coming I would seriously think that its a mail server might be at fault. What happened to my schools server is that the partition that the mail queue was on had errors and linux (wisely?) attempted to fix itself and automatically remounted the partition read-only. And thus the message remained in the mail server queue, my MTA would read it, send it, attempt to delete, which it couldn't and then attempt to send again. The same hard drive partition remount read-only problem later happenend with the mail storage maildirs (which were accessed through pop). So the email client (i.e. outlook or whatever you use) would download via pop, tell the mail server to delete the message, which it couldn't do and then download the same message again at the interval the computer was set to download the mail in (which being every 2-3 minutes sounds like this could be the case).

To fix this or check if this is the issue you could look at the server logs or dmesg. You can also log into your server, stopping the mail program and unmounting the partition that contains the mail queue and/or mail storage. Then run fsck or whatever program you need to run for your partition type and mount it again with read-write. The other way of doing this if you don't know what I'm talking about is to restart your server since this should automatically do the same steps. Mind you if there are serious hard drive partition problems then this might mean that your server will not reboot. Good luck.

Collapse
Posted by Ryan Gallimore on
This also happened to me once on a forum notification that was stuck in the queue. I think sendmail kept failing (but still sending) due to memory errors so the item was never removed from the queue. I fixed it by clearing the queue but never came up with a real solution. Meanwhile, a user received over 1,000 of the same notificaton. Ouch.
Collapse
Posted by Ben Koot on
My client received over 2000 mails. We checked the system and
found an issue with the mail server itself due to a change recently made to improve the anti-virus scanning. Fixed now ... beyond that, I there doesn't seem to be anything else wrong with the system, we've shutdown and checked the mail
queues,and nothing stuck in there ...

Thanks for your help folks
Ben

Collapse
Posted by Ben Koot on
EMERGENCY STOP

Client just confirmed receipt of another 700 mails. So still no solution. Is there no way to kill the mail loop?

Thanks
Ben

I think we're now down to about 3000 mails AAAUUCH

- Closing down the account does not help
- There's no way to fully remove the email from the system.

logical thinking would cause a simple function like that (so overruling users contribution in the system) would kill the mail process.

Dr Spock 😉

Collapse
Posted by Ben Koot on
Advice from my hosting service... Based on the default info in the mail light info ... "please note that the below changes to Postfix's main.cf file will break your
mail system, so I wouldn't recommend doing them ..."

User Documentation for ACS Mail Lite

Acs Mail Lite handles sending of email via sendmail or smtp and includes a
bounce management system for invalid email accounts.

When called to send a mail, the mail will either get sent immediately or placed
in an outgoing queue (changeable via parameter) which will be processed every
few minutes.

ACS Mail Lite uses either sendmail (you have to provide the location of the
binary as a parameter) or SMTP to send the mail. If the sending fails, the mail
will be placed in the outgoing queue again and be given another try a few
minutes later when processing the queue again.

Each email contains an X-Envelope-From adress constructed as follows:
The adress starts with "bounce" (can be changed by a parameter) followed by the
user_id, a hashkey and the package_id of the package instance that sent the
email, separated by "-". The domain name of this adress can be changed with a
parameter.

The system checks every 2 minutes (configurable) in a certain maildirectory
(configurable) for newly bounced emails, so the mailsystem will have to place
every mail to an address beginning with "bounce" (or whatever the appropriate
parameter says) in that directory. The system then processes each of the bounced
emails, strips out the message_id and verifies the hashkey in the
bounce-address. After that the package-key of the package sending the original
mail is found out by using the package_id provided in the bounce adress. With
that, the system then tries to invoke a callback procedure via a service
contract if one is registered for that particular package-key. This enables each
package to deal with bouncing mails on their own - probably logging this in
special tables. ACS Mail Lite then logs the event of a bounced mail of that
user.

Every day a procedure is run that checks if an email account has to be disabled
from receiving any more mail. This is done the following way:

* If a user received his last mail X days ago without any further bounced
mail then his bounce-record gets deleted since it can be assumed that his email
account is working again and no longer refusing emails. This value can be
changed with the parameter "MaxDaysToBounce".
* If more then Y emails were returned by a particular user then his email
account gets disabled from receiving any more mails from the system by setting
the email_bouncing_p flag to t. This value can be changed with the parameter
"MaxBounceCount".
* To notify users that they will not receive any more mails and to tell them
how to reenable the email account in the system again, a notification email gets
sent every 7 days (configurable) up to 4 times (configurable) that contains a
link to reenable the email account.

To use this system here is a quick guide how to do it with postfix.

* Edit /etc/postfix/main.cf
o Set "recipient_delimiter" to " - "
o Set "home_mailbox" to "Maildir/"
o Make sure that /etc/postfix/aliases is hashed for the alias database

* Edit /etc/postfix/aliases. Redirect all mail to "bounce" (if you leave the
parameter as it was) to "nsadmin" (in case you only run one server).

In case of multiple services on one system, create a bounce email for each of
them (e.g. changeing "bounce" to "bounce_service1") and create a new user that
runs the aolserver process for each of them. You do not want to have service1
deal with bounces for service2.

Collapse
Posted by Ryan Gallimore on
Okay, but I wasn't using postfix when I had a mail stuck in the queue... just using the sendmail binary.
Collapse
Posted by Ben Koot on
I am just using default oacs 5.2.2 and only reposted the system docs explaining our mail system. I am realy stuck right now. It could be the documnetation is out of date, I don't know.

Ben