Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th December 2007, 19:56
bradhawk bradhawk is offline
Member
 
Join Date: Nov 2007
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default Getting started with Postfix

Can someone point me in the right direction to get me started using Postfix? I set up my server using "The Perfect Server - Ubuntu Gusty Gibbon 7.10" and after resolving some inital issues I'm now turning my focus to email. I just need a manual or something to get me started.

Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 7th December 2007, 16:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

If you want to set up mail boxes, take a look here: http://www.howtoforge.com/forums/showthread.php?t=2
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th December 2007, 00:28
bradhawk bradhawk is offline
Member
 
Join Date: Nov 2007
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Question

Thanks for the tutorial.

I followed all the steps except for :

Code:
useradd -d /home/sample_user -g users sample_user
passwd sample_user
because I assumed I could use the already existing user account that I use when I log onto the server machine.

I didn't receive any error when completing the other steps. So I assume things are working correctly.

How do I test this? I want to set up Microsoft Outlook 2003 to send and receive mail using the mail account that is listed in /etc/postfix/virtusertable. How do I go about doing this?

i have the incoming mail server listed as : mail.cougforlife.com
i have the outgoing mail server listed as : smtp.cougforlife.com

i put my username and password in their respective boxes (same info as logging onto server machine) but when I test the account settings it completes:
- establishing network connection
- find outgoing mail server (SMTP)
- find incoming mail server (POP3)

fails:
- send test e-mail message

log onto incoming mail server doesn't fail or complete

any tips ideas? thanks
Reply With Quote
  #4  
Old 10th December 2007, 01:25
wpwood3 wpwood3 is offline
Senior Member
 
Join Date: Oct 2007
Location: Atlanta, GA USA
Posts: 197
Thanks: 21
Thanked 31 Times in 21 Posts
Default

I would have used an A record in DNS for your SMTP & POP and an MX record for your mail server. Generally, I avoid CNAME but, that may not be your problem.

This is what dig shows:
Code:
; <<>> DiG 9.3.3rc2 <<>> mail.cougforlife.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4642
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mail.cougforlife.com.          IN      A

;; ANSWER SECTION:
mail.cougforlife.com.   3600    IN      CNAME   pop.secureserver.net.
pop.secureserver.net.   1777    IN      A       64.202.165.92

;; AUTHORITY SECTION:
secureserver.net.       1498    IN      NS      cns1.secureserver.net.
secureserver.net.       1498    IN      NS      cns2.secureserver.net.

;; ADDITIONAL SECTION:
cns1.secureserver.net.  134845  IN      A       64.202.167.31
cns2.secureserver.net.  126947  IN      A       216.69.185.100
Code:
; <<>> DiG 9.3.3rc2 <<>> mx cougforlife.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53232
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3

;; QUESTION SECTION:
;cougforlife.com.               IN      MX

;; ANSWER SECTION:
cougforlife.com.        3285    IN      MX      10 mailstore1.secureserver.net.
cougforlife.com.        3285    IN      MX      0 smtp.secureserver.net.

;; AUTHORITY SECTION:
cougforlife.com.        3258    IN      NS      ns15.domaincontrol.com.
cougforlife.com.        3258    IN      NS      ns16.domaincontrol.com.

;; ADDITIONAL SECTION:
mailstore1.secureserver.net. 1288 IN    A       64.202.166.11
ns15.domaincontrol.com. 76419   IN      A       64.202.165.118
ns16.domaincontrol.com. 76419   IN      A       208.109.255.8
Try making A records for:
pop.cougforlife.com
smtp.cougforlife.com
mail.cougforlife.com

and an MX record for:
mail.cougforlife.com

remove the cname
__________________
CentOS 5.4 64bit (the Perfect Setup)
ISPConfig 2.2.40
WP3 Photography

Last edited by wpwood3; 10th December 2007 at 02:23.
Reply With Quote
  #5  
Old 11th December 2007, 10:01
bradhawk bradhawk is offline
Member
 
Join Date: Nov 2007
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default

So here's my setup:

A records (all point at my router's IP):
smtp.cougforlife.com
mail.cougforlife.com
pop.cougforlife.com

CNAMES:
none that have to do with mail

MX (both point at my router's IP):
mail.cougforlife.com
smtp.cougforlife.com

When I try to set up outlook I receive the following errors:

-Send test e-mail message: The specified server was found, but there was no response from the server. Please verify that the port and SSL information is correct. To access these settings close this dialog, then click More Settings and click on the Advanced tab.

-Log onto incoming mail server (POP3): The specified server was found, but there was no response from the server. Please verify that the port and SSL information is correct. To access these settings close this dialog, then click More Settings and click on the Advanced tab.

Any solutions?
Reply With Quote
  #6  
Old 11th December 2007, 20:10
wpwood3 wpwood3 is offline
Senior Member
 
Join Date: Oct 2007
Location: Atlanta, GA USA
Posts: 197
Thanks: 21
Thanked 31 Times in 21 Posts
Question Need more info

Ok it sounds like you are operating behind a router.
Some questions...

1) Is your router's IP address fixed or does it change each time you connect?

2) Is your router setup to forward ports to your server? (25 & 110)

3) What happens when you telnet into your server from another computer on your lan? For example, if the other computer is a Windows box do this:

C:\telnet <server ip address> 25
type "quit" to exit

C:\telnet <server ip address> 110
type "quit" to exit

4) Post the contents of the following WITHOUT comments:
/etc/postfix/main.cf
__________________
CentOS 5.4 64bit (the Perfect Setup)
ISPConfig 2.2.40
WP3 Photography
Reply With Quote
  #7  
Old 12th December 2007, 04:35
bradhawk bradhawk is offline
Member
 
Join Date: Nov 2007
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default

1) the router's IP address is dynamic if the router is unplugged, but it's never unpluged so the router always has the same IP address.

2) yes ports 25 and 110 are port forwarded to my server's local IP address

3) neither of them are able to connect to my server's IP address

4) /etc/postfix/main.cf
Code:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:$(queue_directory)/smtpd_scache
smtp_tls_session_cache_database = btree:$(queue_directory)/smtp_scache

myhostname = cougforlife.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions - permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
home_mailbox = Maildir/
I also must note that I can get my server set up with a static IP such that it will access the internet. I can get it set up to where I could connect to it through my browser and ftp and ssh, but couldn't get on the internet through the server box.

See post http://www.howtoforge.com/forums/showthread.php?t=18288

Please help get my static IP working then I can worry about mail.
Reply With Quote
  #8  
Old 12th December 2007, 05:49
wpwood3 wpwood3 is offline
Senior Member
 
Join Date: Oct 2007
Location: Atlanta, GA USA
Posts: 197
Thanks: 21
Thanked 31 Times in 21 Posts
Default

Ok, your main.cf looks ok but, if you cannot telnet into the server then there's a connectivity issue. When you say "neither of them are able to connect to my server's IP address" do you mean External IP address, Local IP address or both?

Here's what I would do.
Divide the problem into 2 pieces

1) Fix the connectivity issue so you can telnet into your server as I described above. At the least you should be able to telnet to the server using the local IP of the server from another PC on the LAN.

2) Install something like SquirrelMail on your server so you can verify Postfix is working without having to worry about the external issues. You can remove it later if you don't want it.

Once you have done these things then you can focus on connecting via Outlook and making sure there are no DNS issues.
__________________
CentOS 5.4 64bit (the Perfect Setup)
ISPConfig 2.2.40
WP3 Photography
Reply With Quote
  #9  
Old 13th December 2007, 08:07
bradhawk bradhawk is offline
Member
 
Join Date: Nov 2007
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I was able to get my internet problem resolved through the other posts and now my email server works!! Thanks for everyones input!! It is greatly appreciated!!!
Reply With Quote
  #10  
Old 19th March 2008, 10:12
bradhawk bradhawk is offline
Member
 
Join Date: Nov 2007
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default Virtual Users

I have a question. I followed the setup as we've discussed previously on this thread and things work fine. I am curious however if it is possible to setup virtual users that will only be used with postfix and not the system. Is this possible?

I know that it is possible to create virtual users that will only work with ftp, I am curious if I can do the same for email??

Thanks for responses in advance.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: connection refused error tosin Server Operation 1 30th October 2007 18:30
Issues with Postfix using "Virtual Users And Domains With Postfix, Courier And MySQL" Kyse HOWTO-Related Questions 15 6th January 2007 16:35
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 16:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 16:36
postfix starts and stops why lhatle Installation/Configuration 2 21st December 2005 16:20


All times are GMT +2. The time now is 00:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.