[Dovecot] Confusion when trying to set up a first postfix+dovecot mailserver
I'm trying to set up a first test for a dovecot + postfix (+ many other things) mail server for about 1000 accounts, and I keep stumbling on confusing inconsistencies in the HowTo documents I'm trying to follow.
I tried to do a simple setup with virtual users using a howto saying it was for just that and that it's for Dovecot 2.x, and it shows a few text chunks to put in files, and then says it's better to do the changes in the example-config conf file....
And then the whole structure of config files and dirs is totally different from what is implied in the howto. And of course it won't run. Probably because of the structure of a conf.d dir is multiple files, and the instructions are explicitly written for the case of having a single conf file.
Can anyone suggest an order in which to read docs that will take me thru w/o being totally confusing? I would very much like to be able to enable bit by bit, rather than have to understand all of dovecot before I can even begin to test it.
P.S: I want to setup a server using postfix+dovecot+tls+virtualusers+maildir+dspam+mailman, at least that's the target I'm aiming for. Please suggest a good HowTo for this setup that will not be too confusing. Also, Sorry if I sound like a whining kid: I am new to dovecot and postfix, but I was a software support engineer for Sun for ages, and I should really be able to manage this if I just had some consistent and non-confusing HowTo or Tutorial to follow as a first try.
On 2012-07-21 5:24 AM, Hans J. Albertsson hans.j.albertsson@branneriet.se wrote:
Also, Sorry if I sound like a whining kid: I am new to dovecot and postfix, but I was a software support engineer for Sun for ages, and I should really be able to manage this if I just had some consistent and non-confusing HowTo or Tutorial to follow as a first try.
Which 'HowTo' were you following?
If it wasn't the dovecot 'official' docs on the wiki, try those:
$random_howtos on the internet is not the way to build a secure mail server.
Some of the wiki2 docs still have some v1 cruft in them, but for the most part they should be all you need (along with asking questions here for clarification), and it is a wiki - anything that you encounter that you find confusing or incomplete, by all means come here for clarification, and then update the wiki to help others who encounter the same issues as you.
You haven't even provided the most basic of details of the problem(s) you're having (like, for example, OS/platform, dovecot -n output, logs exhibiting the problem(s), etc...
First, take a step back, and start with one thing at a time (testing and making sure each step is working as expected before moving to the next one)...
install postfix, secure it, and get it delivering mail to at least one (test if desired) virtual domain/users maildirs using its built-in virtual delivery agent,
add dovecot into the mix to serve up the users mail,
switch to the dovecot delivery agent (I recommend LMTP, but at a minimum use the Dovecot LDA),
enable dovecot-sasl,
integrate dspam,
integrate mailman
Obviously, each step requires you to know how you want things to work - ie, do you want to provide POP+IMAP, or only IMAPS access, etc...
Last - to answer the one specific complaint that you had - dovecot will use all of those separate config files in the conf.d directory, or you can put all of your settings into one config file, the choice is yours - see the wiki for details:
http://wiki2.dovecot.org/BasicConfiguration
--
Best regards,
Charles
On 2012-07-21 12:35, Charles Marcus wrote:
On 2012-07-21 5:24 AM, Hans J. Albertsson hans.j.albertsson@branneriet.se wrote:
Also, Sorry if I sound like a whining kid: I am new to dovecot and postfix, but I was a software support engineer for Sun for ages, and I should really be able to manage this if I just had some consistent and non-confusing HowTo or Tutorial to follow as a first try.
Which 'HowTo' were you following?
If it wasn't the dovecot 'official' docs on the wiki, try those:
http://wiki2.dovecot.org/ I followed the
http://wiki2.dovecot.org/ -> HOWTOs, examples and tutorials http://wiki2.dovecot.org/#HOWTOs.2C_examples_and_tutorials -> _A simple virtual passwd file installation http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall_
HowTo.
$random_howtos on the internet is not the way to build a secure mail server.
Some of the wiki2 docs still have some v1 cruft in them, but for the most part they should be all you need (along with asking questions here for clarification), and it is a wiki - anything that you encounter that you find confusing or incomplete, by all means come here for clarification, and then update the wiki to help others who encounter the same issues as you.
You haven't even provided the most basic of details of the problem(s) you're having (like, for example, OS/platform, dovecot -n output, logs exhibiting the problem(s), etc...
First, take a step back, and start with one thing at a time (testing and making sure each step is working as expected before moving to the next one)...
- install postfix, secure it, and get it delivering mail to at least one (test if desired) virtual domain/users maildirs using its built-in virtual delivery agent,
Done, tested, works.
- add dovecot into the mix to serve up the users mail,
And that's where I get lost: I keep fiddling back and forth wondering where I am... I suppose I should instead think like this: (comment, please!) Read the HowTo Look at the text chunks For each element, find where that happens in conf.d, and do it there, with the minimum change possible And then the LDA and later LMTP. I suppose if one succeeds in getting the LDA working, one can then move over to LMTP, with less effort?
- switch to the dovecot delivery agent (I recommend LMTP, but at a minimum use the Dovecot LDA),
OK.
- enable dovecot-sasl,
integrate dspam,
integrate mailman
Obviously, each step requires you to know how you want things to work
- ie, do you want to provide POP+IMAP, or only IMAPS access, etc...
Last - to answer the one specific complaint that you had - dovecot will use all of those separate config files in the conf.d directory, or you can put all of your settings into one config file, the choice is yours - see the wiki for details:
Actually I now tried to follow slavishly one other HowTo from the dovecot.org "official (??? really??? ) web site: The VirtualUserFlatFilesPostfix http://wiki2.dovecot.org/HowTo/VirtualUserFlatFilesPostfix?action=fullsearch&context=180&value=linkto%3A%22HowTo%2FVirtualUserFlatFilesPostfix%22 HowTo...
As an example of my woes: I hit a snag here when I got to the
Mail Location and Namespaces
bit. The config seems a bit confusing in that the public namespace config says
location = maildir:/var/vmail/public:LAYOUT=fs:INDEX=~/public
but the comments on the next line talks about
User Home directory structure:/var/vmail/<domain>/<user>/
I personally want the vmail user under /export/home/vmail, but that's not the confusion here. Isn't the<domain> part supposed to part of the "location" spec in the public namespace settings? Or what am I missing?
Postfix has at least two books that have been proofread, but it doesn't look as if people proofread or vet the dovecot documentation wiki.
Or is there something better to read than the HowTos, for a beginner?
On 2012-07-21 13:07, Hans J. Albertsson wrote:
On 2012-07-21 12:35, Charles Marcus wrote:
On 2012-07-21 5:24 AM, Hans J. Albertsson hans.j.albertsson@branneriet.se wrote:
Also, Sorry if I sound like a whining kid: I am new to dovecot and postfix, but I was a software support engineer for Sun for ages, and I should really be able to manage this if I just had some consistent and non-confusing HowTo or Tutorial to follow as a first try.
Which 'HowTo' were you following?
If it wasn't the dovecot 'official' docs on the wiki, try those:
http://wiki2.dovecot.org/ I followed the
http://wiki2.dovecot.org/ -> HOWTOs, examples and tutorials http://wiki2.dovecot.org/#HOWTOs.2C_examples_and_tutorials -> _A simple virtual passwd file installation http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall_
HowTo.
$random_howtos on the internet is not the way to build a secure mail server.
Some of the wiki2 docs still have some v1 cruft in them, but for the most part they should be all you need (along with asking questions here for clarification), and it is a wiki - anything that you encounter that you find confusing or incomplete, by all means come here for clarification, and then update the wiki to help others who encounter the same issues as you.
You haven't even provided the most basic of details of the problem(s) you're having (like, for example, OS/platform, dovecot -n output, logs exhibiting the problem(s), etc...
First, take a step back, and start with one thing at a time (testing and making sure each step is working as expected before moving to the next one)...
- install postfix, secure it, and get it delivering mail to at least one (test if desired) virtual domain/users maildirs using its built-in virtual delivery agent,
Done, tested, works.
- add dovecot into the mix to serve up the users mail,
And that's where I get lost: I keep fiddling back and forth wondering where I am... I suppose I should instead think like this: (comment, please!) Read the HowTo Look at the text chunks For each element, find where that happens in conf.d, and do it there, with the minimum change possible And then the LDA and later LMTP. I suppose if one succeeds in getting the LDA working, one can then move over to LMTP, with less effort?
- switch to the dovecot delivery agent (I recommend LMTP, but at a minimum use the Dovecot LDA),
OK.
- enable dovecot-sasl,
integrate dspam,
integrate mailman
Obviously, each step requires you to know how you want things to work
- ie, do you want to provide POP+IMAP, or only IMAPS access, etc...
Last - to answer the one specific complaint that you had - dovecot will use all of those separate config files in the conf.d directory, or you can put all of your settings into one config file, the choice is yours - see the wiki for details:
Am 21.07.2012 um 16:49 schrieb Hans J. Albertsson:
location = maildir:/var/vmail/public:LAYOUT=fs:INDEX=~/public
This namespace is defined for "public/shared" mailboxes <> private mailboxes:
See: http://wiki2.dovecot.org/SharedMailboxes/Public
Basically something different from the setting you appear to be looking for.
User Home directory structure:/var/vmail/<domain>/<user>/
This is indeed the structure used in this example. The mail location is set to:
mail_location = maildir:~/Maildir
In this configuration this translates to the actual location being read from the userdb (dynamically):
[…] args = username_format=%u /var/vmail/auth.d/%d/passwd
[ file: /var/vmail/auth.d/<domain>/passwd ] <user>@<domain>:{SSHA}xxxx:5000:5000::/var/vmail/<domain>/<user>/... […]
While this may not be the easiest configuration example to start with, it is a quite scalable and flexible approach though. You may find more background on this here:
http://wiki2.dovecot.org/MailLocation http://wiki2.dovecot.org/UserDatabase
Regards Thomas
I find your answer a bit confusing:
I was showing these problems off as sources of confusion, not as examples of what I want to achieve!
My view of what a HowTo or a Tutorial is supposed to be is:
To the point: Explain what you are going to demonstrate, and explain to what extent it can or cannot serve as a boiler-plate for more advanced configs. Complete ( in the appropriate manner ): For every single thing you display, explain what the reader is supposed to do about it, and make sure you explain what is going to appear automagically and what the reader must do to achieve what won't appear as a result of dovecot's own actions. Do not point the reader to other docs unless those docs agree with the current one in both form and perspective. If they don't, copy in and adjust to fit the current doc.
Many of the "other docs" pointed to by the HowTos (and there appears to be no tutorials at all ) leave the uninitiated confused, because they appear to make slightly different assumptions from the referring doc.
Many docs say "you must first configure THIS," LMTP refers you back to the LDA config, and that may be absolutely correct, but me not being an initiate, I get lost. Because it seems that the perspective and the assumptions are slightly skewed or totally different, how can I tell at the first attempt?
I started out doing postfix config: that was easy, very easy, and I have set up several different ones now, none of which took more than an hour. The first one was Chap 3 in Book Of Postfix by the German fellows, and that is just about the best tutorial I have ever seen. I did that w/o understanding the first thing about postfix vs sendmail,and it taught me a lot, and I could then read the rest of the book much faster.
On 2012-07-21 21:00, Thomas Leuxner wrote:
Am 21.07.2012 um 16:49 schrieb Hans J. Albertsson:
location = maildir:/var/vmail/public:LAYOUT=fs:INDEX=~/public This namespace is defined for "public/shared" mailboxes<> private mailboxes:
See: http://wiki2.dovecot.org/SharedMailboxes/Public
Basically something different from the setting you appear to be looking for.
User Home directory structure:/var/vmail/<domain>/<user>/ This is indeed the structure used in this example. The mail location is set to:
mail_location = maildir:~/Maildir
In this configuration this translates to the actual location being read from the userdb (dynamically):
[…] args = username_format=%u /var/vmail/auth.d/%d/passwd
[ file: /var/vmail/auth.d/<domain>/passwd ] <user>@<domain>:{SSHA}xxxx:5000:5000::/var/vmail/<domain>/<user>/... […]
While this may not be the easiest configuration example to start with, it is a quite scalable and flexible approach though. You may find more background on this here:
http://wiki2.dovecot.org/MailLocation http://wiki2.dovecot.org/UserDatabase
Regards Thomas
On 2012-07-22 11:39, Hans J. Albertsson wrote:
To the point: Explain what you are going to demonstrate, and explain to what extent it can or cannot serve as a boiler-plate for more advanced configs. Complete ( in the appropriate manner ): For every single thing you display, explain what the reader is supposed to do about it, and make sure you explain what is going to appear automagically and what the reader must do to achieve what won't appear as a result of dovecot's own actions. Do not point the reader to other docs unless those docs agree with the current one in both form and perspective. If they don't, copy in and adjust to fit the current doc.
And also, make sure that if you write in english, the meaning of your words in absolutely unequivocal, there must not appear in any reader's mind the slightest doubt as to how (s)he's supposed to use the info given.
As an example, to wit, in the http://wiki2.dovecot.org/SharedMailboxes/Public doc, there's a line
"In the above example, you would then create Maildir mailboxes under the /var/mail/public/ directory."
and a colour plate plate showing a directory listing.
# ls -la /var/mail/public/ drwxr-s--- 1 root mail 0 2007-03-19 03:12 . drwxrws--- 1 root mail 0 2007-03-19 03:12 .lkml drwxrws--- 1 root mail 0 2007-03-19 03:12 .bugtraq -rw-rw---- 1 root mail 0 2007-03-19 03:12 dovecot-shared
I am guessing that this means I'm supposed to do mkdir dovecot-shared inside /var/mail/public.
But "creating Maildir mailboxes" might mean more than just mkdir, and not explaining that bit at this point in the doc slows the reader down, especially if (s)he's not already well versed in the mysteries of dovecot wizardry. And if (s)he is that, why should (s)he read the doc at all?
Sorry if I'm being horridly difficult, but I think (from experiencing it as a user) dovecot is too good not to have proper tutorials and howtos.
On 2012-07-22 5:53 AM, Hans J. Albertsson > As an example, to wit, in the
http://wiki2.dovecot.org/SharedMailboxes/Public doc, there's a line
"In the above example, you would then create Maildir mailboxes under the /var/mail/public/ directory."
and a colour plate plate showing a directory listing.
# ls -la /var/mail/public/ drwxr-s--- 1 root mail 0 2007-03-19 03:12 . drwxrws--- 1 root mail 0 2007-03-19 03:12 .lkml drwxrws--- 1 root mail 0 2007-03-19 03:12 .bugtraq -rw-rw---- 1 root mail 0 2007-03-19 03:12 dovecot-shared
I am guessing that this means I'm supposed to do mkdir dovecot-shared inside /var/mail/public.
Since it isn't listed as a directory, I'm confused as to why would you guess that?
dovecot-shared is a FILE, not a directory.
The 3rd line below that example on that page specifically says:
"The dovecot-shared FILE..."
It seems to me that you aren't even bothering to read these docs, andit is more like all you want to do is complain that there is nothing already written holding your hand through every possible config that you want to accomplish.
Dovecot is primarily written by one guy (Timo), and he does a remarkable job of both coding and documenting dovecot on the wiki, as well as answering support questions here on the list, and while sometimes there are a few days before he answers many questions, serious bug reports generally get prompt attention, and I don't think I've ever seen him not respond to a question in time.
There is no doubt that dovecot could really use some good, experienced technical writers that could help Timo with documenting dovecot to make it easier to learn by someone new to it, and I'm sure he would welcome that help - are you volunteering?
Sorry if I'm being horridly difficult, but I think (from experiencing it as a user) dovecot is too good not to have proper tutorials and howtos.
Well, dovecot's intended audience isn't a 'user', it is experienced system/mail admins, but if you are volunteering to help Timo (and the dovecot community) out by improving the wiki documentation and/or creating some of these HowTos from the perspective of someone totally new to dovecot (and maybe even IMAP servers in general), then I am quite certain that Timo will welcome such help.
And as for documentation in the form of books, you cannot compare dovecot to postfix in this regard.
Postfix is one of the most mature, stable projects out there - it's core functionality basically never changes (only the rare bug fixes), and major new features are pretty rare too, so even books written 8 years ago are still fairly relevant (and generally are only missing the new features).
With dovecot, things are very different. It is still very young and changing rapidly, and probably will continue to do so as Timo adds new features on his ToDo list. A book written even a year ago would not have much use to someone using the current version today. As it matures and features stabilize, this will change, and I'm hopeful that in a year or two, dovecot will stabilize to the point that some of the talented book writers out there will take on such a huge project - but none of them want to do that right now because dovecot is such a fast moving target.
--
Best regards,
Charles
Sorry, you're right: I was stressed out when writing this. I meant mkdir .lkml and mkdir .bugtraq and touch dovecot-shared. Of course.
It is not the best example, I agree.
Still it should say something like "create the file dovecot-shared if you want a shared mailbox named dovecot-shared" (can probably be whittled down).
And, yes, if I can get thru setting up dovecot properly ( I know I can, it will just take longer ) I will of course do a writeup in the style I want to see myself.
When it comes to dovecot, I am a user (that IS a terribly derogative term, isn't it?), but I have been actively supporting large farms of servers running other forms of mail delivery agents in Sun's various OSes since 1986 up to 2008, so I do think I ought to be able to get my head around dovecot, too.
I will just have to read the wiki thru, all of it... :-)
On 2012-07-22 12:41, Charles Marcus wrote:
On 2012-07-22 5:53 AM, Hans J. Albertsson > As an example, to wit, in the
http://wiki2.dovecot.org/SharedMailboxes/Public doc, there's a line
"In the above example, you would then create Maildir mailboxes under the /var/mail/public/ directory."
and a colour plate plate showing a directory listing.
# ls -la /var/mail/public/ drwxr-s--- 1 root mail 0 2007-03-19 03:12 . drwxrws--- 1 root mail 0 2007-03-19 03:12 .lkml drwxrws--- 1 root mail 0 2007-03-19 03:12 .bugtraq -rw-rw---- 1 root mail 0 2007-03-19 03:12 dovecot-shared
I am guessing that this means I'm supposed to do mkdir dovecot-shared inside /var/mail/public.
Since it isn't listed as a directory, I'm confused as to why would you guess that?
dovecot-shared is a FILE, not a directory.
The 3rd line below that example on that page specifically says:
"The dovecot-shared FILE..."
It seems to me that you aren't even bothering to read these docs, andit is more like all you want to do is complain that there is nothing already written holding your hand through every possible config that you want to accomplish.
Dovecot is primarily written by one guy (Timo), and he does a remarkable job of both coding and documenting dovecot on the wiki, as well as answering support questions here on the list, and while sometimes there are a few days before he answers many questions, serious bug reports generally get prompt attention, and I don't think I've ever seen him not respond to a question in time.
There is no doubt that dovecot could really use some good, experienced technical writers that could help Timo with documenting dovecot to make it easier to learn by someone new to it, and I'm sure he would welcome that help - are you volunteering?
Sorry if I'm being horridly difficult, but I think (from experiencing it as a user) dovecot is too good not to have proper tutorials and howtos.
Well, dovecot's intended audience isn't a 'user', it is experienced system/mail admins, but if you are volunteering to help Timo (and the dovecot community) out by improving the wiki documentation and/or creating some of these HowTos from the perspective of someone totally new to dovecot (and maybe even IMAP servers in general), then I am quite certain that Timo will welcome such help.
And as for documentation in the form of books, you cannot compare dovecot to postfix in this regard.
Postfix is one of the most mature, stable projects out there - it's core functionality basically never changes (only the rare bug fixes), and major new features are pretty rare too, so even books written 8 years ago are still fairly relevant (and generally are only missing the new features).
With dovecot, things are very different. It is still very young and changing rapidly, and probably will continue to do so as Timo adds new features on his ToDo list. A book written even a year ago would not have much use to someone using the current version today. As it matures and features stabilize, this will change, and I'm hopeful that in a year or two, dovecot will stabilize to the point that some of the talented book writers out there will take on such a huge project - but none of them want to do that right now because dovecot is such a fast moving target.
participants (3)
-
Charles Marcus
-
Hans J. Albertsson
-
Thomas Leuxner