Author Topic: Mail server  (Read 2085 times)

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Mail server
« on: April 30, 2012, 04:49:47 PM »
I want to set up a mail server on pclinuxos.  I have been playing around, and have a lamp server setup, and directed my domain name from godaddy to my router, and forwarded it to port 80.  That all seems to be working great.  But now now I would like to add an e-mail server so I can have e-mail sent to me at my domain name.  So far I figured that I need to install Postfix, and dovecot.  But I am a little lost.  Does anyone know of some instructions on how to do this?

Thanks

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Mail server
« Reply #1 on: April 30, 2012, 10:53:32 PM »
I want to set up a mail server on pclinuxos.  I have been playing around, and have a lamp server setup, and directed my domain name from godaddy to my router, and forwarded it to port 80.  That all seems to be working great.  But now now I would like to add an e-mail server so I can have e-mail sent to me at my domain name.  So far I figured that I need to install Postfix, and dovecot.  But I am a little lost.  Does anyone know of some instructions on how to do this?

Thanks

Have you installed the software from synaptic ? If not load the software and than we can go from there. You will need to install the following packages

postfix
libpostfix1
dovecot




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #2 on: May 01, 2012, 08:04:31 AM »
Yes, I installed those three from synaptic.  That is where I am currently at.

Thanks

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Mail server
« Reply #3 on: May 01, 2012, 02:15:25 PM »
Yes, I installed those three from synaptic.  That is where I am currently at.

Thanks

Are the services currently running?

If not you can set them up in PCC to start at boot.

Also you can start them from the command line as the root user  IE:
[root@findmoore html]# service postfix start
[root@findmoore html]# service dovecot start

Both should display an [OK] during start up. If either display [FAILED] go to  /var/log/mail and see what is in the error log.





Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #4 on: May 01, 2012, 03:23:52 PM »
booth are set to start at boot.  I manually started them, and postfix said ok, but dovecot gave errors, but the error log is empty.

this is the output:

Quote
# service dovecot start
Starting IMAP daemon (dovecot): Error: Error in configuration file /etc/dovecot.conf line 81: Unknown setting: login
Fatal: Invalid configuration in /etc/dovecot.conf
                                                                [FAILED]

I think the line it is talking about says login = imap

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Mail server
« Reply #5 on: May 01, 2012, 09:10:16 PM »
booth are set to start at boot.  I manually started them, and postfix said ok, but dovecot gave errors, but the error log is empty.

this is the output:

Quote
# service dovecot start
Starting IMAP daemon (dovecot): Error: Error in configuration file /etc/dovecot.conf line 81: Unknown setting: login
Fatal: Invalid configuration in /etc/dovecot.conf
                                                                [FAILED]

I think the line it is talking about says login = imap

Yes I am getting the same error no matter what I use or try.  Now I remember why I didn't use it. Screw it.....  Got into Synaptic and load imap and imap-utils. After they are loaded as root in a console window type in chkconfig imap on
That will start the imap service when ever it is requested.
Be sure to go into PCC and uncheck Dovecot to automatically start up at boot





Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #6 on: May 01, 2012, 09:30:33 PM »
Ok.  That is done.

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Mail server
« Reply #7 on: May 01, 2012, 09:43:56 PM »
Well now you just have to setup your client (example: thunderbird) to use it. Do you have your own domain name? A static IP or dynamic IP?




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #8 on: May 01, 2012, 10:12:45 PM »
I have a domain name I used to use, but still have the name at godaddy.com.  I am just trying to learn how all this works right now, so I thought I would use the name, and redirect it to my router ip.  I forwarded port 80 to my internal computer ip, and the web site is working.  Now I thought I would add a mail server.  The website is www.learn2tradenow.com, and so I thought I would add an e-mail something like david@learn2tradenow.com.  I am guessing I would need to forward port 25?  And configure an email account on the server (which I am not sure how to do).

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Mail server
« Reply #9 on: May 02, 2012, 12:04:26 AM »
I have a domain name I used to use, but still have the name at godaddy.com.  I am just trying to learn how all this works right now, so I thought I would use the name, and redirect it to my router ip.  I forwarded port 80 to my internal computer ip, and the web site is working.  Now I thought I would add a mail server.  The website is www.learn2tradenow.com, and so I thought I would add an e-mail something like david@learn2tradenow.com.  I am guessing I would need to forward port 25?  And configure an email account on the server (which I am not sure how to do).


Port 25 (SMTP)
Port 110 (POP3)
Port 143 (IMAP)




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline GermanTux

  • Hero Member
  • *****
  • Posts: 693
Re: Mail server
« Reply #10 on: May 02, 2012, 07:32:17 AM »
Warning: Many residential ISP's block port 25 outgoing and incoming.  You may have issues once you finish setting things up sending and receiving mail. 

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #11 on: May 02, 2012, 07:51:38 AM »
Ok, I forwarded those ports.  How do I test to see if they are blocked, and how to I add an account?


Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Mail server
« Reply #12 on: May 02, 2012, 10:55:17 AM »
Ok, I forwarded those ports.  How do I test to see if they are blocked, and how to I add an account?



Well there is a hard way and a easy way to add an account. Either you can do it by hand with a text file and than compile it into the required database or you can install webmin and do it through webmin's gui.  I choose to do the later. It is so much faster and it is a lot less error prone.

As for checking the ports. Run this from the machine that you need to check the ports on  http://www.canyouseeme.org/




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #13 on: May 02, 2012, 03:11:04 PM »
It looks like 25, and 110 are blocked.  Is there a way around this? 

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Mail server
« Reply #14 on: May 02, 2012, 03:22:42 PM »
Ok, I have webmin, and logged into it using root.  But how do I add an e-mail account?