LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-11-2008, 04:07 PM   #1
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 11.04
Posts: 186

Rep: Reputation: 36
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!
 
Old 09-11-2008, 06:02 PM   #2
nathacof
Member
 
Registered: Aug 2004
Location: Bear, DE, USA
Distribution: Slackware 11, CentOS 5.2, Ubuntu
Posts: 124

Rep: Reputation: 17
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.

Last edited by nathacof; 09-11-2008 at 06:09 PM.
 
Old 09-12-2008, 07:01 AM   #3
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 11.04
Posts: 186

Original Poster
Rep: Reputation: 36
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!
 
Old 09-12-2008, 08:00 AM   #4
nathacof
Member
 
Registered: Aug 2004
Location: Bear, DE, USA
Distribution: Slackware 11, CentOS 5.2, Ubuntu
Posts: 124

Rep: Reputation: 17
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.

Last edited by nathacof; 09-12-2008 at 10:29 AM.
 
Old 09-12-2008, 03:23 PM   #5
MheAd
Member
 
Registered: Jun 2007
Distribution: Ubuntu 11.04
Posts: 186

Original Poster
Rep: Reputation: 36
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!

Last edited by MheAd; 09-12-2008 at 03:25 PM.
 
Old 09-12-2008, 11:22 PM   #6
nathacof
Member
 
Registered: Aug 2004
Location: Bear, DE, USA
Distribution: Slackware 11, CentOS 5.2, Ubuntu
Posts: 124

Rep: Reputation: 17
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.

Last edited by nathacof; 09-13-2008 at 09:10 AM.
 
Old 10-18-2011, 08:45 AM   #7
iSpaZZZ^
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Postfix Virtual Hosting With LDAP Backend & Dovecot As IMAP/POP3 Server On Ubun LXer Syndicated Linux News 0 08-03-2008 01:41 PM
!!!!!!!!!!!!!!!virtual users config in dovecot !!!!!!!!!!!!!!!!! lasantha Linux - Server 3 01-16-2008 05:52 AM
Postfix - Virtual Database ]SK[ Linux - Software 0 09-13-2005 03:49 PM


All times are GMT -5. The time now is 10:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration