mail spooling

mail spooling

by Fabrizio Balliano -
Number of replies: 6
hi to all,
i'm managing a moodle community with 1500 users but i've problems when sending mail (when posting to global forum) because my smtp allows me to send only 200 mails/hour.

does moodle have a mail spooler to send some mails every hour, not all in one time?

it is possible to integrate moodle mail sending with external mailing software such as mailman?

thank you to all!
fabrizio
Average of ratings: -
In reply to Fabrizio Balliano

Re: mail spooling

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I guess the easier way to do it is installing a local SMTP server and let it deal with spooling, throttling, et al.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: mail spooling

by Fabrizio Balliano -
thank you very much for your answer

actually I can't, it would be enaught to have the mail sender just send a few mail/hour, sleep and continue sending later...
In reply to Fabrizio Balliano

Re: mail spooling

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm afraid the changes you propose are not trivial at all. That's why I said the easier thing would be to run your own local smtp server...

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: mail spooling

by Fabrizio Balliano -
hum, ok i'm going to change the mail sending inserting a sleep(6)
not nice but that's what i nedd at the moment

cheers and thank you!
fabrizio
In reply to Fabrizio Balliano

Re: mail spooling

by Martín Langhoff -
Not entirely sure, but you may end up with the same forum message being sent more than once if the mailout takes more than 5 minutes to exec. The mailout code is quite conservative, but I suspect that there are a few race conditions that your sleep(6) will make painfully evident.

Possible workaround: have a lock on cron runs, so they never overlap -- take a look at dotlockfile. But bear in mind this has its own problems too.