[BlueOnyx:23960] Re: 5210R: Postfix SNI support + MailDir
mstauber at blueonyx.it
Tue Jun 9 23:43:48 -05 2020
> On mine the 10-mail.conf change was:
> mail_location = maildir:~/Maildir:LAYOUT=fs:DIRNAME=MailDiR
> and the procmailrc change was:
> Which is really not 100% correct because it ends up putting all the
> mail one level deeper (Maildir/INBOX/MailDiR/) than it should be
> but by the time I got it working I was too frustrated to go back and
> change it.
Ah, I see. Here is what worked for me:
[root at jarvis ~]# cat /etc/procmailrc
[root at jarvis ~]# cat /etc/dovecot/conf.d/10-mail.conf|grep ^mail
mail_location = maildir:~/Maildir:LAYOUT=fs
So I now have that sorted for 5210R and the result is in the BlueOnyx
"5210R-testing" YUM repository. Attached is a screenshot of the new
"Network Services" / "Email" GUI page.
As you can see there:
The Email server is configurable: Sendmail (default) or Postfix.
You can set the "Mailbox Format": Mbox (default) or Maildir.
Additionally there is a checkbox "Convert Mailboxes". If ticked, it'll
run a conversion of all mailboxes that currently have emails. It'll
convert *to* the format that's chosen under "Mailbox Format" after you save.
So you can change the format, save and then can go back later and can
convert. Or you can change the format *and* tick the checkbox to convert
the mailboxes and save only once.
HOWEVER: The mouse-over helptext makes it clear that this is risky, that
it can fail and that the recommended way is to do the conversion of
mailboxes from the Shell in SSH as "root" via this little tool:
[root at jarvis 5210R-Postfix]# /usr/sausalito/sbin/mbox_maildir_convert.pl
│ BlueOnyx Mbox/Maildir & Maildir/Mbox converter │
usage: /usr/sausalito/sbin/mbox_maildir_convert.pl [OPTIONS]
Example: /usr/sausalito/sbin/mbox_maildir_convert.pl --mbox
Example: /usr/sausalito/sbin/mbox_maildir_convert.pl --maildir
--mbox Converts all mailboxes to mbox format
--maildir Converts all mailboxes to maildir format
-h|--help This help text
That will do the trick quite nicely.
Additionally "base-blueonyx" has been updated with provisions that once
the mailbox format has been set and /etc/sysconfig/bxmbox is present,
then /etc/procmailrc will not be messed with anymore during YUM updates.
Code changes for the Mailbox feature:
And here is the code for /usr/sausalito/sbin/mbox_maildir_convert.pl:
For mbox to maildir conversions it makes a call to
/usr/sausalito/sbin/mb2md.pl (it's inlcuded).
For maildir to mbox conversions I hacked something together based on a
few code-snippets that I found elsewhere.
It basically checks /Maildir for subdirectories containing 'cur' and
'new' subdirectories. If it finds emails in them, then it escapes single
quotes and cobbles it all into a new mbox file.
When you DO a conversion and a target "mbox" or "Maildir" are already
present? Then they will be renamed and that backup is then left alone.
With best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 166378 bytes
Desc: not available
More information about the Blueonyx