| Linode Forum https://forum.linode.com/ |
|
| DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12.04 https://forum.linode.com/viewtopic.php?f=11&t=9047 |
Page 1 of 1 |
| Author: | inteja [ Sat Jun 23, 2012 11:34 pm ] |
| Post subject: | DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12.04 |
I'm new to Linode and also new to setting up Linux mail servers. I created a Ubuntu 12.04 linode then tried to follow the most recent Ubuntu 10.04 (lucid) guide (http://library.linode.com/email/postfix ... 0.04-lucid) to setup my mail server. I finally managed to get it working after much messing about. I can't guarantee it's 100% correct or secure, but I've documented the changes I had to make (see link below, changes highlighted in red) to get it working on Ubuntu 12.04 (precise). It would be great if someone with more knowledge and experience could review this and correct if necessary before submitting for inclusion to the Linode library. http://virtualrealms.com.au/temp/dovecot-mysql-ubuntu-12.04-precise.zip |
|
| Author: | dma0 [ Tue Aug 21, 2012 3:56 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Thanks very much for this. I was stuck on the installation of dovecot and this helped immensely. Most appreciated. inteja wrote: I'm new to Linode and also new to setting up Linux mail servers. I created a Ubuntu 12.04 linode then tried to follow the most recent Ubuntu 10.04 (lucid) guide (http://library.linode.com/email/postfix ... 0.04-lucid) to setup my mail server. I finally managed to get it working after much messing about. I can't guarantee it's 100% correct or secure, but I've documented the changes I had to make (see link below, changes highlighted in red) to get it working on Ubuntu 12.04 (precise). It would be great if someone with more knowledge and experience could review this and correct if necessary before submitting for inclusion to the Linode library.
http://virtualrealms.com.au/temp/dovecot-mysql-ubuntu-12.04-precise.zip |
|
| Author: | Slaquor [ Fri Aug 24, 2012 4:28 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
I hit a snag while using this guide. In the very beginning when it tells you what packages to install: apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server dovecot-common dovecot-imapd dovecot-pop3d postfix libsasl2-2 libsasl2-modules libsasl2-modules-sql sasl2-bin libpam-mysql openssl telnet mailutils The newer version also requires you to install dovecot-mysql, which used to be included in dovecot-common, but is no longer. For reference, my thread. |
|
| Author: | :-| [ Sun Nov 11, 2012 7:36 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Thank you very much for posting this guide! My $0.02: 1. If you plan to use SSL/TLS on port 465 you need to uncomment these lines in /etc/postfix/master.cf: Code: smtps inet n - - - - smtpd 2. To avoid this warning in mail.log: Quote: warning: do not list domain ... in BOTH mydestination and virtual_mailbox_domains I removed all but "localhost, localhost.localdomain" for "mydestination =" in /etc/postfix/main.cf. You can get the same result by changing Code: postconf -e 'mydestination = server.example.com, localhost, localhost.localdomain' to Code: postconf -e 'mydestination = localhost, localhost.localdomain' when following inteja's guide. 3. And, of course, don't forget to add firewall rules for smtp, ssmtp, pop, imap, pops, imaps Code: -A INPUT -p tcp --dport 25 -j ACCEPT to /etc/iptables.firewall.rules and then Code: iptables-restore < /etc/iptables.firewall.rules to update them. I've followed this guide (including dovecot-mysql installation) and everything works perfectly. So I think this manual could be added to Linode Library. This would help a lot of people to avoid problems with Dovecot on modern Ubuntu. |
|
| Author: | sleddog [ Sun Nov 11, 2012 9:51 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Why not use Dovecot for SASL authentication instead of running another daemon.... |
|
| Author: | inteja [ Mon Nov 12, 2012 2:32 am ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
:-| wrote: Thank you very much for posting this guide! My $0.02: Thanks for your additions! I'm glad someone else is getting something out of and improving on my newbie fumblings. I'll update my config with your changes. |
|
| Author: | pannix [ Tue Dec 25, 2012 8:41 am ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
I a following the updated Linode document by inteja http://forum.linode.com/viewtopic.php?f=11&t=9047 on a freshly installed Ubuntu 12.04 LTS. Taking into account the comments from Slaquor and :-|. I got as far as "Configure saslauthd to use MySQL". I completed this part, added the users postfix and sasl, and restarted postfix and saslauthd. These are the warnings I got when I restarted postfix, these 3 warnings were repeated dozens of times: Code: postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes I could of course just remove the parameters, or should I replace them? PS: I started a new thread http://forum.linode.com/viewtopic.php?f=11&t=9650, but as I was referred to this thread I thought it best to ask my questions here. Wondering how many geeks are online on Xmas |
|
| Author: | pannix [ Tue Dec 25, 2012 3:40 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
I decided to continue with inteja;s manual and ignoring the warnings in Postfix for now. I configured Devocot as described. Restarted the service and in the mail.log I found Code: Dec 25 19:34:02 li488-42 dovecot: master: Dovecot v2.0.19 starting up (core dumps disabled) instead of Code: Jan 21 16:19:17 plato dovecot: Dovecot v1.2.9 starting up (core dumps disabled) The telnet test had the some outcome as described: Code: telnet localhost pop3 What am I doing wrong or have I overlooked? |
|
| Author: | pannix [ Tue Dec 25, 2012 3:52 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Continued by testing postfix as described, but didn't get the outcome as advertised: Code: telnet localhost 25 I found the following lines in the mail.log: Code: Dec 25 19:46:15 li488-42 postfix/smtpd[20196]: connect from localhost[127.0.0.1] Firewall settings using ufw: Code: ufw status |
|
| Author: | pannix [ Tue Dec 25, 2012 4:58 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Just for the record. I started questioning my ability to read a tutorial/manual so I tried something else. I set up unison cloud storage between client (Mac OS X) and server (ubuntu 12.04 linode) in less than 30 minutes. |
|
| Author: | glibdud [ Sat Feb 09, 2013 2:00 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
I followed this guide (thanks for the work!), and I'm getting the same results as pannix. In particular, the dead end is: pannix wrote: Continued by testing postfix as described, but didn't get the outcome as advertised: Code: telnet localhost 25 I found the following lines in the mail.log: Code: Dec 25 19:46:15 li488-42 postfix/smtpd[20196]: connect from localhost[127.0.0.1] The weird thing is that I first tried following the 10.04 guide, and actually got to the point where this telnet was working. I paid attention to the differences and don't see what could have broken this. Anyone have any ideas? |
|
| Author: | hampel [ Fri Mar 08, 2013 8:05 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Just curious whether any further progress has been made on this guide yet - I'm really keen to get this working and appreciate those more knowledgeable than me putting it together! |
|
| Author: | hampel [ Sat Mar 09, 2013 2:04 am ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
hampel wrote: Just curious whether any further progress has been made on this guide yet Well I tried it anyway and it seems to be working for me. Haven't done much additional configuration yet, so more testing to be done. |
|
| Author: | sunnyjassal [ Thu Mar 28, 2013 5:48 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Thanks for the instructions! I would like to add that the logs dont appear in mail.log till you change ownership to mail.log. I executed the below in order for the logs to appear. sudo chown syslog.adm /var/log/mail.log sudo chmod 640 /var/log/mail.log |
|
| Author: | rob1308 [ Thu Apr 25, 2013 8:18 pm ] |
| Post subject: | Re: DRAFT Email with Postfix, Dovecot and MySQL on Ubuntu 12 |
Great work inteja! Thanks for posting the guide. Along with the helpful amendments mentioned by :-| I'm successfully up and running. It's frankly a quite shocking that there is no up-to-date defacto guide for Ubuntu 12.04 to get a postfix/dovecot mailserver working anywhere on the net. For that matter having explored various options it's also surprising that creating a mailserver of any sort is still quite a fragmented and drawn-out process. This is certainly the closest to it I've found (after having followed the original guide in the Linode Library and having become quite stuck , various other guides too and eventually having to purge a lot of packages and configs after ugly attempts at trying to resolve the issues myself!) Following the guide I can send and receive on numerous domains with multiple addresses but cannot at the moment figure out what exactly the outgoing SMTP setting should be? What seems to work on one device/client doesn't on another! How could one change the ports and security protocols ? Even though I have uncommented the lines as suggested by :-| and have port 465 open in my firewall I am not allowed a connection to port 465 either with or without SSL/TLS on an Android tablet but then with Thunderbird that seems to work (albeit after a security exception warning due to my unsigned SSL cert). If I leave the port at 25 the tablet eventually seems satisfied, is able to send but when I check the settings it defaults back to port 587 which isn't even open with the firewall? Very odd! Whilst there is a setting on the tablet to accept all certificates, signed or unsigned it seems to not connect to the outbound smtp unless it is on standard unsecure port 25. Perhaps those are more issues with Android than this setup but some pointers from someone in the know would sure help to make the guide more comprehensive. Something that may also be merit in the new guide is a tip on how to do reverse DNS lookups so as to reduce chances of outgoing mail being flagged as spam etc? Thanks for all the efforts in any case, it is much appreciated. Rob. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|