hi,
i'm in the process of evaluating the migration of a sendmail to exim
and i've hit a problem.
the system is running mars (a netware server emulator), and the users
are accessing their mails using pmail (which is a mua for netware
systems). the structure looks as:
${home}/pmail/ <- this is where pmail does it's stuff
${home}/pmail/in/ <- this is where pmail finds new messages
(the inbox, practically)
${home}/pmail/out/ <- this is where pmail puts messages that
need to be sent.
my problem is putting the mails down in the format pmail expects them.
it's one message in its own file (almost like maildir, but no new/
cur/ tmp/ dirs) with names as "^[0-9]{8}\.cnm$" .
right now, with sendmail, every user has a ~/.procmailrc file which
lists:
:0:
* .*
`/usr/local/bin/sing`
and /usr/local/bin/sing being:
#!/bin/sh
echo "$(date +%s|sed 's/.*\(........\)$/\1/').cnm"
this works very fine - yes, the possible races are obvious, so are the
drawbacks and everything, still i haven't had lost emails reported for
the last four years (it's a low-volume mail server for a hospital
department).
still, i'd like to sort these issues out (particularly get rid of
that ~/.procmailrc kludge), and once i'm there, migrate
to exim, and possibly provide some more flexibility for the users,
would they want it (they don't, but why not :)
i've come up with this logic:
1) if a user has a ${home}/pmail/in directory, assume she's using
pmail, and deliver it in that special format.
2) if a user has a ${home}/Maildir directory, assume she wants her
mails in maildir format, and deliver in maildir format
3) otherwise deliver in mbox format in /var/mail/${local_part}
(yes, the point of the last two used simulatenously are questionnable
- maybe that'll change to a "change to maildir quickly if needed"-kind
of setup).
for the pmail part, config (currently) looks like (haven't yet tested
a single bit if it, i'm just putting bits and pieces together for
now):
#
# director
#
localuser_pmail:
driver = localuser
transport = local_delivery_pmail
require_files = ${home} : ${home}/pmail : ${home}/pmail/in
no_verify
#
#transport
#
local_delivery_pmail:
driver = appendfile
create_file = inhome
create_directory_mode = 0770
create_directory = true
mode_fail_narrower = false
envelope_to_add = true
directory = ${home}/pmail/in
i've learnt that using appendfile with "directory" specified but no
"maildir_format" specified, it will deliver messages as i need it, one
file per message. but, the fundamental question is: how do i tell
appendfile to use a naming convention that suits my needs ? if there's
a way, i suspect appendfile itself is protected against races and it
won't deliver two messages in the same file (what my current solution
would likely do, had the mail traffic been heavier than it is).
finally, if anyone has experiences with pmail and exim together (these
are mainly older [3-4-5 years] dos-based pmail programs, but i suspect
newer win32-based ones work similarly), or just simply has suggestions
or observations to the above, i'd very much appreciate it.
thanks in advance,
--
[-]