>I was trying to write mails directly to the main.mbx file. I was able to
>write, but after writing there are 2 problems
I wouldn't recommend writing directly to the main.mbx file. You might want
to consider using imail1.exe instead.
>1. The total read/unread gives an error in the web messaging part. Unread
>count will be more than the read count. But after refreshing the page, the
>count becomes proper. I solved this problem by deleting the main.uid file.
>The problem with this approach is that the previous mails in the Inbox
>gets marked as "UNREAD".
>2. If I dont delete the main.uid file, then also all the mails inthe inbox
>folder.
That is to be expected, and one of the drawbacks of altering the main.mbx
file without updating the index/ID files.
Although the .mbx file format is easy to figure out (even though it is not
documented), the .SRT and .UID files aren't as easy to figure out, and are
also undocumented. They contain information such as the sort order (IE in
web messaging, when you sort based on the date), as well as which messages
have been read and which haven't.
So, you either need to update those files as well (which would be a very
difficult and risky task), or accept the problems with not changing the
files, or delete them and have IMail re-create them. If you delete those
files, you have deleted the information about the sort order, which
messages have been read, etc. So although IMail can recreate the file, it
has to use the default settings.
>Can anyone tell me if I have any way of writing mails directly to the
>users INBOX.
It's kind of like making changes to the internal database of a program --
you can try to do it, and you may be able to make changes, but you risk
causing unforeseen problems. You may be able to do it properly, by
figuring out the format of the undocumented .SRT/.UID files. But you have
to have a thorough understanding of them -- a single flag that seems to
always be set to zero isn't necessarily always zero, for example.
> I have more than 1 lakh users and i have to send mails to selected
> users. If I use imail1.exe to send mail, the problem is I have to create
> these many text files and the system goes too slow.
Ah, I see. Would it be possible to send the E-mails from another server?
You may also want to try to figure out why the system goes too
slowly. When IMail receives an E-mail by SMTP, it creates 2 files in the
spool directory (as well as writing log file entries). So I wouldn't think
that having those extra files would really slow things down much.
-Scott
---
Declude: Anti-virus, Anti-spam and Anti-hijacking solutions for
IMail. http://www.declude.com
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/