Changing the default delivery mailbox to something other than INBOX

Ron Garret ron at flownet.com
Mon Jan 18 03:00:45 EET 2021


I groveled around in the docs and discovered the INBOX=… option to the mail_location config parameter.  I tried that, and it didn’t work, but it failed in a very strange way.

I currently have:

mail_location = maildir:/var/mail/vhosts/%d/%n/mail

I tried changing that to:

mail_location = maildir:/var/mail/vhosts/%d/%n/mail:INBOX=incoming

That failed with the following log message:

Jan 17 23:41:17 lmtp(shp at rngh.net)<32476><ruDsCB3LBGDcfgAAa/YOzQ>: Error: Mailbox INBOX: Failed to autocreate mailbox: Permission denied

But the weird thing is that it DID create a directory called incoming, and that directory has the same permissions as the rest of the mailbox hierarchy.

There is something else which I was not expecting, and that is that the directory is a peer to /var/mail/vhosts/%d/%n/mail.  What I want is to create a folder *inside* /var/mail/vhosts/%d/%n/mail.

Advice on how to proceed would be much appreciated.  (BTW, I’d be happy to pay someone a consulting fee for help with this project.  If you’re interested contact me off-list.)

rg

On Jan 17, 2021, at 12:08 PM, Ron Garret <ron at flownet.com> wrote:

> Is there an easy way (i.e. a built-in configuration setting) to change the name of the mailbox that the dovecot LDA delivers mail into?  The default is INBOX but I’d like mail to be delivered to some other mailbox.  The reason for this is that I want all incoming mail to be invisible to the user by default until it has been screened for viruses and spam.  I know I could do this with Sieve, but that is a PITA.
> 
> More details in case anyone is interested:
> 
> The goal of this filter is to make it work with very little training.  To bootstrap the process, the filter is given access to outgoing mail (via a milter) which it uses as a reliable training corpus for good messages.  It then leverages that information to filter incoming messages.  For example, messages from senders which have been the recipients of outgoing messages are presumed to be good.  There is also a spam honeypot to provide a reliable spam corpus.
> 
> One of the heuristics I want to use is to look for the same subject line in multiple messages from unknown users received over a period of an hour or so because those are almost invariably spam.  But that requires a time delay between when a message is received and when it is filtered, and that in turn requires a place to store messages for a while before they are processed.  While they are in that temporary storage, I don’t want them in the user’s face, but I do want them to be accessible if the user wants to see them (e.g. if they know that an important message is coming in which may be stuck in the temp storage).  So I’d like to make something like an INCOMING mailbox where all mail is delivered.  The messages in INCOMING are scanned by the filter and moved to Junk or INBOX as appropriate.
> 
> Thanks,
> rg
> 



More information about the dovecot mailing list