Hello, I know, there are many articles on this, but for me they miss the simplest things. 1)I just want to setup a dovecot server on some linux machine that holds email for local accounts in Maildirformat and provides them to user-mail-software like evolution locally. 2)I want postfix to send mail locally to dovecot. 3)I want to use fetchmail to pick up mail from my internet provider via pop3 and use postfix to distribute it locally. No mention of sending out mail so far. Except for 3) I don’t want to be bothered by SSL, PAM, LTS … it’s all local.
I pretty much have 1) running. I can connect to dovecot and access my localy stored mail via IMAP.
But I can’t get the communication between postfix and dovecot to work. Do I need virtual-domain, virtual-users to be able to send to dovecot or just local stuff in my use-case. Do I use lda or lmtp? How does the mapping from local mail-addresses to user-accounts (and thus mail-dirs) work. Does postfix do this or dovecot? Currently postfix apparently sends the full email like karl@fritz.box to dovecot and dovecot refuses.
I am kind of lost.
Wolfgang
P.S.: I had all of this running in the past. Postfix put the mail in /var/spool/mail/… and dovecot used that as INBOX. Apprently dovecot cannot read mbox-INBOX files anymore if it is configured to store as maildir. It’s one or the other now.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya @wolfgangbuesser,
It seems like you’re on the right track. I’ll try to address your questions and provide you with a simple guide to achieve your desired setup.
You mentioned that you already have Dovecot running and can access your locally stored email via IMAP. That’s great! Let’s move on to the next step.
To make Postfix send mail locally to Dovecot, you need to configure Postfix to use Dovecot’s LMTP (Local Mail Transfer Protocol) service. LMTP is more efficient than LDA (Local Delivery Agent) and is the recommended method for Dovecot. Here’s a simple configuration to achieve this:
/etc/postfix/main.cf
file and add the following lines:/etc/dovecot/dovecot.conf
or/etc/dovecot/conf.d/10-mail.conf
, and set the mail location:/etc/dovecot/conf.d/10-lmtp.conf
:~/.fetchmailrc
:Replace the placeholders with the appropriate values for your provider and local username. Then, run fetchmail in the background:
This will make fetchmail run as a daemon, checking for new mail every 5 minutes (300 seconds).
With these configurations, you should be able to achieve the setup you described. Let me know if you have any questions or need further assistance.