LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix + Dovecot + virtual users without a database? (https://www.linuxquestions.org/questions/linux-server-73/postfix-dovecot-virtual-users-without-a-database-669308/)

MheAd 09-11-2008 04:07 PM

Postfix + Dovecot + virtual users without a database?
 
Hi there boys 'n girlz.
I've been pulling my hair out for a while now during my tries to set up a functioning mail-server for an internal, virtual network that I'm running in VMWare. All of this is of course exercize for different kinds of scenarios, I simply want to see how things work.

I've managed to set up a simple, Unix-account based mail hub that users can connect to with a prefered IMAP/POP client from other hosts on the network. What I would like to accomplish is virtual user accounts. There are of course many of these guides but all of those that I've found are way too sophisticated. I prefer to do the things in order, first understand the basics before advancing to more hard-core. Every single how-to that I've found involves some kind of database, mostly LDAP or MySQL. What I would like to start with is a "primitive" solution - I still want virtual users on the server, but I want some kind of a "local" solution, like a text-based file or something that functions as database for this. And, of course, I want to know how to implement this for combination Postfix + Dovecot.

Could you please provide me some tips for this subject or at least point me out to a good read? Thanks in advance!

nathacof 09-11-2008 06:02 PM

Try my tutorial, PostFix + Dovecot Virtual Users

Let me know if you have any problem with, and I'd be glad to flesh it out.

MheAd 09-12-2008 07:01 AM

Hi and thanks for the tip.
I just did everything according to your guide (of course, altered the user / domain parts according to my setup) and I cannot authenticate to the server. Neither Postfix or Dovecot are reporting any visable errors in the maillog that could point out to the configuration errors, the only error is the actual authentication error. I'm using Evolution in one of my virtual clients to connect to the server - doesn't work. When following your configuration, which kind of the mechanism am I supposed to choose in Evolution - I figured it was CRAM-MD5. And if it indeed is that encrypting mechanism is that what corresponds to the {HMAC-MD5} in the virt-users shadow-file?

Finally, appart from what you written in your guide, is there anything else I might have missed, maybe something essential but crucial for the function? Maybe you figured "everybody should know that" and didn't mention it at all. :) ?

Thanks in advance!

nathacof 09-12-2008 08:00 AM

This particular configuration supports plain login and CRAM-MD5 authentication mechanisms as described in auth default:

mechanisms = plain login CRAM-MD5

Pretty sure with HMAC-MD5 you can choose any authentication mechanism you'd like.

http://wiki.dovecot.org/Authentication/Mechanisms

This is where testing can come in handy:

http://wiki.dovecot.org/TestInstallation

Run through that real quick, and we can see if your users are setup properly.

If not we'll begin investigating there.

--
One thing I did forget to mention in the tutorial; be sure to reload postfix after making the adjustments to the vmailbox file.

Typically you can run:
service postfix reload
or
/etc/init.d/postfix reload
as root to do so.

MheAd 09-12-2008 03:23 PM

Dovecot and Postfix are up and running.
Telneting both locally and from a remote host in the network to port 143 works and I get the message it (Dovecot) is ready.

Loging in, however, doesnt work. I get

Code:

"a NO Authentication failed."
Funny thing is that maillog doesn't say anything (any way to make it more verbose, the Dovecot-part of log that is?). First when I leave the actual telnet session the maillog would spit out a row like this one:

Code:

Sep 12 22:21:20 virt-postfix dovecot: imap-login: Disconnected: Inactivity: user=<testuser1>, method=PLAIN, rip=::ffff:172.16.80.5, lip=::ffff:172.16.80.100
To clear any confusion, 'virt-postfix' is my machine, running Postfix / Dovecot.

Any ideas?

Did you actually try out the very same configuration in the same/similar scenario / configuration that I'm describing myself and can confirm it actually works?

Thanks in advance!

nathacof 09-12-2008 11:22 PM

I use it on my personal VPS, and I've written internal documentation for my companies knowledge base. This article is a bit slimmed downed compared to my internal article. But you really should have no problem with this setup.

More info on Dovecot's logging mechanisms can be found here, http://wiki.dovecot.org/Logging

Oh any looking at your error log, are you using the full email address of your account as the username? If not Dovecot won't be able to find the associated domain, and you logins will fail.

iSpaZZZ^ 10-18-2011 08:45 AM

Hi Peeps,

I am Also having trouble with a dovecot / postfix setup, It's all setup and running fine, I just don't know how to add users.

Dovecot is authenticating using this method but I have no idea how I would add additional users :(. The only entry for the users is in the file as specified in the link above so nothing in /etc/passwd and no database just /etc/dovecot/vmail-passwd.

I need to know how to add new users, I have a feeling that dovecotpw is used at some point, I'm really surprised that there is no documentation on how to do this (unless I have missed some!)

Thanks for help in advance, I appreciate it.


All times are GMT -5. The time now is 09:02 PM.