The original specification of the Maildir format would be good start to answer your question.
The requirement is that each new message will be stored with a unique name.
Unless you're writing messages to a maildir, the format of a unique
name is none of your business.
A unique name can be anything that
doesn't contain a colon (or slash) and doesn't start with a dot. Do
not try to extract information from unique names.
Okay, so you're
writing messages. A unique name has three pieces, separated by dots.
On the left is the result of time() or the second counter from
gettimeofday(). On the right is the result of gethostname(). (To deal
with invalid host names, replace / with \057 and : with \072.) In the
middle is a delivery identifier, discussed below.
Old-fashioned delivery identifiers use the following formats for the delivery identifier:
n, where n is the process ID, and where this process has been forked to make one delivery. Unfortunately, some foolish operating systems repeat process IDs quickly, breaking the standard time+pid combination.
n_m, where n is the process ID and m is the number of deliveries made by this process.
Now the second part of your question, simply put the unique filename is not something that you can configure, unless you go and modify the source code of the local delivery agent.
A work-around would be .forward and pipe the email to script that will store the message with filenames to your liking, essentially creating your own local delivery agent. That should be fairly trivial.