Question

postfix store mails in mail directory

i have reconfigured postfix but roundcube can’t read messages then i found that emails stored in mail/new directly not in domainname.com/accountname/new i need to know how to connect postfix to rouncube database and store files in the right directory


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
June 8, 2023

Hi there,

I believe that if emails are not showing up in Roundcube, the issue is more likely with Dovecot (which Roundcube relies on to access emails) rather than Postfix.

You might need to adjust your Dovecot configuration to correctly reference where Postfix is storing emails. You should have a look at your Dovecot configuration files (usually located in /etc/dovecot/), specifically the 10-mail.conf file. Inside this file, you should see a setting for mail_location, which tells Dovecot where to look for mail.

For example:

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

This location should match where Postfix is delivering mail to. Make sure this path aligns with your Postfix configuration. If you make changes, remember to restart Dovecot to apply them:

systemctl restart dovecot

Keep in mind that this might depend based on your setup, you may need additional or slightly different configuration. Feel free to share a link to the guide that you’ve followed to set everything up.

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel