Contributing to this document

Many parts of this tutorial were tried, researched and documented by helpful readers. If you would like to contribute to this tutorial you are invited to. Just use the "Add new comment" link at the bottom of each page. If possible your contributions will be added to the tutorial in the right places.

24 Comments

Make Postfix start AFTER Dovecot

Hi,

I had to make Postfix start after Dovecot, changing symlink /etc/rc2.d/S20postfix to /etc/rc2.d/S25postfix.

Without this, I had the following error after rebooting:

Jul 26 09:41:12 nix postfix/smtpd[2111]: warning: SASL: Connect to private/auth failed: No such file or directory
Jul 26 09:41:12 nix postfix/smtpd[2111]: fatal: no SASL authentication mechanisms
Jul 26 09:41:13 nix postfix/master[2048]: warning: process /usr/lib/postfix/smtpd pid 2111 exit status 1
Jul 26 09:41:13 nix postfix/master[2048]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Jul 26 09:41:34 nix dovecot: dovecot v1.1.13 starting up (core dumps disabled)

What is strange is that I do not get this error when I start Postfix while Dovecot is stopped after booting!

Cheers, Julien

Fixed

Hi, It seems it was fixed with a new upload to unstable. Check http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543473 for further information. Cheers, Julien

Thank you so much

Thank you so much for this tutorial. Without, I'd have much more gray hair (and there are so manny by now). Really great: Easy to read, informatove and extremely helpful.

Thank you.

Btw: Ich hab auf einer XJ600 angefangen, zu moppeln. Sehr nett :)

Thank you

Thank you for this great tutorial, my server is now working for several months perfectly and I used 90% of this tutorial.

The only thing I changed was to adapt it to Postfixadmin, which I have to apologize to because of the work you have done to do yours.

People like you are very valuable and respectable because they give to the others so much work and knowledge.

Patrice Vigier

Thank you

Thank you very much for this great tutorial; it is clear, accurate and easy to understand

and implement. so thanks again for your great efforts.

just I think the topic of mailing lists is missing. we need to know how to create a mailing list

such as noc@mydomain.com and add some users to this list..

it will be appreciated if you add this topic to this great tutorial.

thank you very much

easy_install ispwebadmin*.tar.gz Missing

I have gotten to the step of installing your Web Abmin app but when I run easy_install ispwebadmin*.tar.gz I get an error saying no packages found for this. Is there something wrong with the download or another way to get this installed?

 

Thanks!

What error?

Depends on what the actual error message says. Feel free to quote it. It it's complaining about missing Webhelpers then please try to install the newest version at http://workaround.org/sites/default/files/ispwebadmin-1.0.2.tar_.gz

Great!

Hello,


Danke for this great tutorial!

I followed it step by step, but there were some issues that I had to mess around with.

As many others, my biggest problem was dovecot/sasl.
The logfiles contained complainings about non-existing SASL authentification methods.

Well, I'm quite new to Debian (I had a Windows-Server before). But I'm quite clever, with the filemanager of Webmin I saw that /var/run/dovecot/auth-client is a pipe. Seems to me as if this is the pipe postfix and dovecot communicate through. In my opinion, this is a gap in your tutorial. Postfix and Dovecot point to different places. You advise the user who follows your tutorial to change the path to private/auth (relative to postfix chroot /var/spool/postfix). In postfix' chroot I found the private-folder and thought, "Oh, herein should be the 'auth'-pipe!" However, there was no file/folder/pipe/whatever with this name.
Then I got the idea to adjust dovecots config-file. I set the path in socket_listen > client to "/var/spool/postfix/private/auth". (The path under socket_listen > master still remains as is, in my config it is "/var/run/dovecot/auth-master".)

 


Thank you again! =)

What did I miss?

Thanks for your feedbak. Actually I'm not sure I missed anything. It sounds like you didn't find the hint on changing the dovecot.conf file to point to the /var/spool/postfix/private/auth file. Check out the page on setting up Dovecot where it deals with the "socket listen" section and its "client" setting. The reason the pipe/socket is located within /var/spool/postfix is that Postfix does not have access to the file system outside of its /var/spool/postfix directory.

Offering SSMTP

Hi Christoph,

first of all, thank you for the wonderful tutorial(s). I've used parts of your etch tutorial in the past, to set up IMAP on my small home server. It uses getmail to fetch my e-mail from various e-mail accounts and offers all e-mail centralized in a single account via IMAP.

I just finished setting up my first "real" mailserver, hosted on a vserver. So far everything works as expected, I've been able to successfully sent and receive a couple of test e-mails.

One thing I found to be missing is a bit more information on how to set up SSMTP via Port 465. You do mention a few security settings, and you do mention that you typically restrict "TLS only" to port 465, but I couldn't find anything on how to get postfix to actually use this port. Once you find it, the setup is straightforward (just uncomment a few lines in master.cf), but I guess it wouldn't hurt to mention this in the tutorial.

One other thing I found to be very useful on my home server is the ability to forward e-mail received by root or other system accounts to one of the virtual users. This way error messages from crontab etc. which get sent to root end up in my local mail (Just add a .forward file in the users home directory and place the e-mail address inside). Might be another nice addition ;)

Thanks,

Markus

Thanks

Thanks a lot for this tutorial. As it happens my mail server runs on Debian Lenny.

I am fairly proficient in Debian and MySQL, but a complete newbie on mail issues. I followed your

tutorial step by step, and I even understood what I was doing. Very good.

jlinkels

Very helpful tutorial

Thank you very much for putting a lot of effort in this great tutorial! It finally helped me to understand all components of a mailserver and their interfaces. Putting the user info in a database and smptd_auth via dovecot is really nice and simple. Great job!

Cheers and a happy new year ;-)

Thanks for the Work !

Hi,

just wanted to thank you for the tutorial. I set up my first mail server using the old tutorial a few years back. I'm in the process of setting up a replacement (in a virtualbox so far for testing) and was happy to find this new tutorial. It looks even better than the original !

I'm thinking about trying to modify things to share user information with an open xchange installation. I will keep you posted if I can get that working.


Cheers


Chris

thank and mailman :o

Firstly thank you for your tutorial, installing the mail server is really my pet peeve! I think is the first time i have a good mailserver ;)

I installed mailman ,i've used this tutorial : http://www.debianhelp.co.uk/mailman.htm
To integrate it at your setup, i simply changes 1 thing to the main.cf:

  • add "hash: / var / lib / mailman / data / virtual-mailman" to virtual_alias_maps

After three weeks, I finally

After three weeks, I finally have a working e-mail server that I'm satisfied with.  This and another tutorial helped significantly but I ended up doing a lot of legwork and scouring the Internet and reading all sorts of comments and documentation and tutorials because I like to know what I'm doing.  In particular, I saw some important topics that were either missing or needed changes in this tutorial:

1)  I originally wanted to virtualize ALL incoming e-mail.  We've already been over this in another post, but I'll reiterate that the Lenny tutorial clearly spelled out the importance of at least keeping localhost in 'mynetworks' so 'root@localhost' works for handling system errors.

2)  The tutorial appears to fail to mention the requirement for postmaster@[reverseIPlookup] and abuse@[reverseIPlookup] e-mail addresses.  These are IETF/RFC mandated e-mail addresses for every domain - RFC 2821 and RFC 2142 respectively.  They can be aliases as long as they are valid.

3)  This tutorial doesn't set up SSL/TLS.  StartSSL is giving away free SSL certificates that work everywhere.  I added one to my Postfix/Dovecot install and Thunderbird works great with it without complaints.  I also set up SSL/TLS on port 465 and 995, which are useful for those with lame ISPs that block the standard ports.  With free SSL certificates, it makes sense to extend the tutorial to add SSL/TLS.

4)  I set up prefix/extension support.  I haven't tested the feature yet but, in theory, I can do email+sometag@domain and it will correctly arrive at email@domain with the original e-mail address still intact to do directed filtering in my mail client - similar to how GMail works.  I modified my master.cf file as follows:

dovecot   unix  -       n       n       -       -       pipe
  flags=ODRhu user=vmail:vmail null_sender= argv=/usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -f ${sender} -d ${user}@${nexthop}

5)  I added an 'active' column to each table in the database so I can disable entire domains or just a single e-mail address or alias.  I also didn't use foreign key constraints partly because I personally don't like them.

6)  I used the official Python SPF solution for Postfix instead of tumgreyspf, which apparently can't handle long SPF records and hasn't been updated for a while now.

I'll eventually get around to setting up a mailing list.  But forums seem more popular these days and, ever since I discovered that I can do IRC via a web browser, I've been hanging out in IRC channels to get and give help.

Client's changing password

Hi, i've used this toturial several times. And it always works :D

I use roundcube as webmail. And ISPwebAdmin.

And if an client of me wants to change his password, i have to log into my server and change it myself.

Is there a way that the client can change it himself?

No, just look into your

No, just look into your roundcube installation. The plugin "password" is already installed. You just have to configure it. You have to change the sql-query for example. My one looks like this:

$rcmail_config['password_query'] = 'UPDATE `mail`.`view_users` SET `password` = MD5( %p ) WHERE `email` = %u AND `password` = MD5( %o )';

But be careful. I didn't changed the MySQL tables like the author did. My tables looks like the ones in the etch tutorial I think.