Where's my inbox. Dovecot on Rocky9
Posted by daryld_the_cat@reddit | linuxadmin | View on Reddit | 17 comments
I setup a dovecot pop3 server but I cannot get it to list email when I telnet in. I can see in the postfix logs that the message was delivered and i can cat my mailbox and see the messages. But the lisy command shows 0 messages.
archontwo@reddit
Dovecot is a IMAP server. So you can connect to it from any email client. It doesn't have a GUI itself.
You can connect to it from Thunderbird or if you want a web interface use roundcube. If you want to read it locally on the machine set up alpine or mutt.
daryld_the_cat@reddit (OP)
Thanks. I know it's an imap server without a gui. That's fine. What i don't understand is why pop3 clients can't read or don't know how to find my mailbox. Mutt works but it's not the solution i was looking for.
archontwo@reddit
Pop3 is really a poor protocol by today's standards
Is there any particular reason you are wedded to pop3 clients?
daryld_the_cat@reddit (OP)
Because it comes before the chapter on imap in the book I'm reading. It'll be imap next week.
archontwo@reddit
Haha, fairy nuff.
Well IMAP is not what you will see mostly in the modern world. Even Microsoft has elected to ditch it, which, given how MS hangs into legacy stuff way longer than anyone else, kinda demonstrates it is a deprecated technology.
ErasmusDarwin@reddit
I'm not familiar with Dovecot's inner workings, but based on the information here:
Mail Location Settings
Mailbox Formats
Sample 10-mail.conf
It looks like your problem is "maildir". /var/spool/mail/${USER} is in the "mbox" format, so you'll want to set it to something like:
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
You'll also want to remove the symlink in the home directory before you do this, as I suspect otherwise it could wind up trying to copy incoming emails right back into your inbox over and over.
But again, I'm not really a Dovecot user, so I could be wrong here.
daryld_the_cat@reddit (OP)
Thanks. I can now get a list of messages from a telnet session and thunderbird seems to be working as expected. Who names a mail client after the cheapest wine on the earth?
Able-Ambassador-921@reddit
mutt is your friend. if you can "cat your mailbox" then mail is being placed in the correct file no?
daryld_the_cat@reddit (OP)
Mutt was my friend for a couple of hours. Until I noticed it was fucking up the headers and invalidating my spf recor.
daryld_the_cat@reddit (OP)
Yes. I can see messages in the inbox if i cat /var/spool/mail/$mailboxname.
daryld_the_cat@reddit (OP)
and I can send and receive through mutt.
apathyzeal@reddit
POP3 removes them from the server.
daryld_the_cat@reddit (OP)
Right. if the message is downloaded. I'm issuing a list command which doesn't download anything.
Moocha@reddit
In particular for your specific problem, https://doc.dovecot.org/2.3/configuration_manual/mail_location/mbox/
In general, https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/deploying_mail_servers/index -- do note that it's using virtual users and so on, so it's a more advanced and higher maintenance configuration scenario.
You mentioned maildir there: Note that the
maildir
options are for mailboxes stored inmaildir
format and will do nothing useful here; possibly, they will prevent things from working properly. Since you mentioned catting the mailbox, then it's inmbox
format (i.e. everything in one file). Also check the permissions as per the dovecot.org docs, maybe your pop3d can't access the required files; you'd normally see that in the dovecot logs -- what do those have to say?MairusuPawa@reddit
You… use telnet? Why? Do you want your network to be compromised so badly?
Melodic_Respond6011@reddit
Telnet for simulating POP3 protocol, not remote shell.
daryld_the_cat@reddit (OP)
lol. I don't normally use telnet to check email, just for testing. This is my home network so I'm not overly concerned about security.