Problems with PostMasterPOP3.pl

Hi, I seem to have found a problem with PostMasterPOP3.pl. I have noticed recently that this script does not appear to check the SQL database is actually up before reading mail from a POP3 account. We had a situation recently where our SQL server was down for maintenance. OTRS will still running on another server and was still happily reading mail from a POP3 account. What I had noticed is that although the mail was read and removed from the POP3 account, the database was down and therefore no tickets were created and those messages were lost. Wouldn't it be a better idea for this script to check whether the SQL server is up before trying to pick up mail? Regards, Dean

Hi,
What I had noticed is that although the mail was read and removed from the POP3 account, the database was down and therefore no tickets were created and those messages were lost.
mmh, if it really behaves this way, I think it's worth opening a bug to otrs's bugzilla...
Wouldn't it be a better idea for this script to check whether the SQL server is up before trying to pick up mail?
Or work in a transactional way: issue the POP3 'dele' command to a message only once this message has been successfully stored into the database. One message after the other. This way any unsaved message will stay in the pop3 server until it's in the database... Eric

Eric Voisard wrote:
Hi,
What I had noticed is that although the mail was read and removed from the POP3 account, the database was down and therefore no tickets were created and those messages were lost.
mmh, if it really behaves this way, I think it's worth opening a bug to otrs's bugzilla...
Yes, it certainly does appear to work this way. Good point about bugzilla. I'll go create one.
Wouldn't it be a better idea for this script to check whether the SQL server is up before trying to pick up mail?
Or work in a transactional way: issue the POP3 'dele' command to a message only once this message has been successfully stored into the database. One message after the other. This way any unsaved message will stay in the pop3 server until it's in the database...
It could be done this way but checking it first would mean that it spent less time trawling through messages only to find the SQL server is not running and not issue the DELE command. Cheers, Dean
participants (3)
-
Dean Baldwin
-
Dean Baldwin
-
Eric Voisard