Add Mailbox through API, Delivery Fails

Discussion for developers using MailEnable.
Post Reply
spraguey
Posts: 69
Joined: Fri Nov 19, 2004 2:35 am

Add Mailbox through API, Delivery Fails

Post by spraguey »

On MailEnable 4 Enterprise... I am adding mailboxes using the asp API example (addmailbox.asp) provided by MailEnable. The mailbox appears to be created, as well as the associated folder on the system. However, when I send mail to one of the created mailboxes I get this in bounce...

---
Message could not be delivered. Error was: The email address is not available on this system

The following recipient(s) could not be reached:
[SF:my.domain.edu/my_username]
---

If I go into the MMC and open the properties screen for the account and just click OK, then attempt to re-send to that account, it works!

I also notice that after the API creates an account, I go to the MAILROOT folder and all it contains is an empty Inbox folder. Once I open that account in the MMC, it add a lot of other files - _folder.xml, _DIRSIZE.TMP, _FOLDER.DAT, etc. Does this have something to do with it?

I really need the API to create the account and allow users to send to it immediately. Why do I need to open it in the MMC to get it to work?

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Re: Add Mailbox through API, Delivery Fails

Post by MailEnable »

I suggest you check the postoffice connector log files.
There is likely to be an indication of the problem reported in the Debug log of the Postoffice Connector at the time the message delivery attempt occured.
I suggest initially checking the log for the my_username string.

FYI - the additional files you mention do not have anything to do with the problem.
Regards, Andrew

spraguey
Posts: 69
Joined: Fri Nov 19, 2004 2:35 am

Re: Add Mailbox through API, Delivery Fails

Post by spraguey »

Here is what I see...

11/17/09 09:33:46 [[SF:my.postoffice.edu/my_username]] Message to (53E5550DE75142D880F1B11C4FA698BC.MAI) could not be delivered because the Postoffice (my.postoffice.edu) has been disabled by the system administrator.

This postoffice has not been disabled at all. It seems like it goes inactive, and then when I open the MMC it "wakes up". Is this possible?

spraguey
Posts: 69
Joined: Fri Nov 19, 2004 2:35 am

Re: Add Mailbox through API, Delivery Fails

Post by spraguey »

More information... It turns out that I found this error in the event viewer ("MySQL server has gone away"). If I don't get any mail for 8 hours, MySQL turns off and MailEnable can't function. Is there any way to keep the connection alive? I know I can increase the timeout on MySQL, but it seems like MailEnable should do a database check every once in a while to keep itself alive.

Post Reply