Getmail6 and Dovecot

NethServer Version: 8
Module: mail

My incoming email is received at external mailboxes and until now (pre-NS) has been retrieved by fetchmail.

On NS I’m planning to set up a shared mailbox with its own address. Configuring that is straightforward. The question is how to get the emails transferred into it.

I’m a little nervous about using imapsync just to retrieve incoming messages and in any case it’s not clear to me how to configure delivery that way (as a non-Inbox folder belonging to one of my real users?)

So I’m inclined to set up getmail6 externally and have that do the delivery. For dovecot the recommendation is to use “deliver” straight into the mailbox rather than sending in via SMTP, but it looks like I’d need to know a path for the mailbox. I don’t know how I can look inside my “mail1” to answer my own question.

Can anyone advise me? Either specifically or in general

Thanks

UPDATE: I want to file some incoming emails into subfolders. This I have been doing with sieve but my shared mailbox was a full mailbox accessed directly by multiple people rather than being accessible via their personal mailboxes. Can one have sieve rules on shared mailboxes in general on Dovecot and in particular with Nethserver’s mail module? Maybe I need to continue sharing a regular mailbox? Doing that would require me to create a new dummy user in the domain but that would have benefits elsewhere.

It should be possible with imapsync, see https://imapsync.lamiral.info/FAQ.d/FAQ.Folders_Selection.txt
In that case you’d need to use a custom script, it’s not possible in the UI, see GitHub - NethServer/ns8-imapsync: Imapsync for NethServer 8

There’s also a fetchmail community app but it needs to be configured on CLI.

See Howto manage or customize NS8 podman containers for a general documentation about podman containers.

To enter for example the dovecot container to get the directory structure:

runagent -m mail1 podman exec -ti dovecot sh

The mails are stored in /var/lib/vmail

Yes, that seems to work but you have to care about permissions, see Sieve 'fileinto' Public Mailbox gives "Permission denied" - #7 by hinzberlin

Thanks, but I wasn’t asking about filing messages into a shared (by which I meant public) mailbox, but filing messages delivered directly to a public mailbox (rather than to a user)

In any case now I’m considering creating a full user/mailbox for the shared email and data, rather than only accounts for real people and then public/shared mailboxes/address books etc for what needs to be shared. In the former case I think I’d have more control. Certainly I’d have an easy way to access the sieve rules.

Regarding delivery, I would try to get getmail working but it’s important that mail which arrives that way goes through the spam filter. Where does the NS spam filter fit into the mail module? On the path between Postfix and Dovecot, or in the initial stages of the Dovecot processing (in which case it may apply to messages delivered via LMTP)?

1 Like