Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th May 2006, 02:19
sonoffett sonoffett is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix / DNS Problem

Hey guys,

So I installed ubuntu and ISPConfig by following the how2forge guide and didn't run into any troubles. I am not sure if I set up my DNS entries though. I registered a domain at godaddy and edited the DNS entries so that NS1.xxx.com and NS2.xxx.com would both point to my server which is running two static ips, eth0 and eth0:0. I then registered another domain (yyy.com) and pointed it's name servers to NS1.xxx.com and NS2.xxx.com. I also added the site to my ISP config and when I go to yyy.com or www.yyy.com it correctly redirects.

Where I run into trouble is when trying to setup my email client at home to point to my mail server. It sucessfully logs into my mailserver but whenever I try to send a message it says "Relay access denied." If I go through the /webmail/ I can sucessfully send emails out fine, however when I try to email sonoffett@yyy.com from my gmail I get the following error:

Quote:
This is the Postfix program at host ns1.xxx.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The Postfix program

<web7_sonoffett@server1.example.com> (expanded from <sonoffett@yyy.com>): Host or
domain name not found. Name service error for name=server1.example.com
type=A: Host not found
This leads me to believe that maybe I forgot to change the hostname from "server1.example.com" somewhere but I've checked all the obvious places and it's updated.

main.cf

Quote:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = ns1.xxx.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smptd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtpd_use_tls = yes
smtp_use_tls = yes
smtp_tls_key_file = /etc/postfix/ssl/smtpd.key
smtp_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtp_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtp_tls_loglevel = 1
smtp_tls_recieve_header = yes
smtp_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtp_tls_note_starttls_offer = yes
home_mailbox = Maildir/
mailbox_command =

virtual_maps = hash:/etc/postfix/virtusertable
local-host-names

Quote:
localhost
ns1.xxx.com
localhost.ns1.xxx.com
localhost.xxx.com
www.yyy.com
www.xxx.com
yyy.com
xxx.com
hostname -f
ns1.xxx.com

virtusertable
Quote:

sonoffett@www.yyy.com web7_sonoffett
web7_sonoffett@www.yyy.com web7_sonoffett
@www.yyy.com web7_sonoffett
sonoffett@yyy.com web7_sonoffett
web7_sonoffett@yyy.com web7_sonoffett
@yyy.com web7_sonoffett
sonoffett@www.xxx.com web2_sonoffett
web2_sonoffett@www.xxx.com web2_sonoffett
sonoffett@xxx.com web2_sonoffett
web2_sonoffett@xxx.com web2_sonoffett
dig mx yyy.com
Quote:
; <<>> DiG 9.3.1 <<>> mx yyy.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 29803
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

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

;; Query time: 9 msec
;; SERVER: 207.126.96.162#53(207.126.96.162)
;; WHEN: Sun May 14 09:12:20 2006
;; MSG SIZE rcvd: 33
Is it possible that I incorrectly did the mx record for the godaddy domain xxx.com?

dig mx xxx.com
Quote:
admin@ns1:~$ dig mx xxx.com

; <<>> DiG 9.3.1 <<>> mx xxx.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4815
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

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

;; ANSWER SECTION:
xxx.com. 3600 IN MX 10 mail.

;; AUTHORITY SECTION:
xxx.com. 3600 IN NS NS3.SECURESERVER.net.
xxx.com. 3600 IN NS NS4.SECURESERVER.net.

;; ADDITIONAL SECTION:
NS3.SECURESERVER.net. 21648 IN A 64.202.165.10
NS4.SECURESERVER.net. 21648 IN A 68.178.211.105

;; Query time: 111 msec
;; SERVER: 207.126.96.162#53(207.126.96.162)
;; WHEN: Sun May 14 09:15:11 2006
;; MSG SIZE rcvd: 138

are my MX records incorrect? If so, how do I correctly configure them for yyy.com in ISPConfig, or for godaddy DNS xxx.com?

Thanks for the help guys.
Reply With Quote
Sponsored Links
  #2  
Old 15th May 2006, 04:41
sonoffett sonoffett is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also, when I email sonoffett@xxx.com I get no error but nothing shows up in the webmails inbox. I also never changed the mysql hostname from server1.example.com, could it be that? How would I change that?
Reply With Quote
  #3  
Old 15th May 2006, 16:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

What's in /etc/hosts and /etc/hostname?
Can you post your real domain names here?
__________________
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
  #4  
Old 15th May 2006, 17:07
sonoffett sonoffett is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah, thank you for responding Falko.

xxx.com = fluidnetworking.net
yyy.com = silicondawn.com

I reinstalled postfix and sasld with the correct hostname and now I don't recieve any errors when emailing to both my addresses from gmail, however they still don't show up in my inbox.

In webmail I can email my gmail no problem, but I can't recieve email from the gmail or outside. I can recieve and send email between the two (sam@silicondawn.com and sam@fluidnetworking.net) without any problems.

In mozilla thunderbird I can send and recieve emails between the two (sam@silicondawn.com and sam@fluidnetworking.net) without any problems, but if I check "use secure authentication" I get "Mail server does not support authentication" and when I send email to an outside address from Thunderbird I get "Relay access denied".

Maybe sasld?

hostname
Quote:
ns1.fluidnetworking.net
hosts
Quote:
127.0.0.1 localhost.localdomain localhost server1
64.124.13.133 ns1.fluidnetworking.net ns1
64.124.13.134 ns2.fluidnetworking.net ns2
64.124.13.133 silicondawn.com www.silicondawn.com
64.124.13.133 fluidnetworking.net www.fluidnetworking.net

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Once again, thank you very much Falko for your quick response and willingness to help the community.
Reply With Quote
  #5  
Old 15th May 2006, 17:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by sonoffett
I reinstalled postfix and sasld with the correct hostname and now I don't recieve any errors when emailing to both my addresses from gmail, however they still don't show up in my inbox.
Which POP3 daemon do you use? Make sure Postfix delivers to the correct mailbox (mbox <-> Maildir).
__________________
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
  #6  
Old 21st May 2006, 21:37
sonoffett sonoffett is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry about the late response...

I reconfigured the DNS servers and now everything works properly through the mail client (thunderbird), including TLS and SSL. However, if I check "use secure authentication" I get "mail server does not support secure authentication" and also my webmail doesn't show messages from outside addresses. (Could this be a maildir problem?)

Quote:
admin@ns1:~/Maildir/new$ netstat -tap
(No info could be read for "-p": geteuid()=1000 but you should be root.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost.localdo:mysql *:* LISTEN -
tcp 0 0 *:81 *:* LISTEN -
tcp 0 0 ns2.fluidnetwork:domain *:* LISTEN -
tcp 0 0 ns1.fluidnetwork:domain *:* LISTEN -
tcp 0 0 localhost.locald:domain *:* LISTEN -
tcp 0 0 *:ftp *:* LISTEN -
tcp 0 0 *:smtp *:* LISTEN -
tcp 0 0 localhost.localdoma:953 *:* LISTEN -
tcp 38 0 localhost.localdo:46495 localhost.localdo:imaps CLOSE_WAIT -
tcp6 0 0 *:imaps *:* LISTEN -
tcp6 0 0 *op3s *:* LISTEN -
tcp6 0 0 *op3 *:* LISTEN -
tcp6 0 0 *:imap2 *:* LISTEN -
tcp6 0 0 *:www *:* LISTEN -
tcp6 0 0 *:ssh *:* LISTEN -
tcp6 0 0 ip6-localhost:953 *:* LISTEN -
tcp6 0 0 *:https *:* LISTEN -
tcp6 0 0 ns1.fluidnetworking:ssh 64.124.13.130.gat:60416 ESTABLISHED-
tcp6 0 52 ns1.fluidnetworking:ssh 64.124.13.130.gat:60687 ESTABLISHED-
postfix/main.cf

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = ns1.fluidnetworking.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smptd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtpd_use_tls = yes
smtp_use_tls = yes
smtp_tls_key_file = /etc/postfix/ssl/smtpd.key
smtp_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtp_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtp_tls_loglevel = 1
smtp_tls_recieve_header = yes
smtp_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtp_tls_note_starttls_offer = yes
home_mailbox = Maildir/
mailbox_command = procmail -a "$EXTENSION"


virtual_maps = hash:/etc/postfix/virtusertable

smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_relay_domains
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s

Thank you so much for your help.
Reply With Quote
  #7  
Old 21st May 2006, 22:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Can you run
Code:
telnet localhost 25
and then issue
Code:
ehlo localhost
?
What's the output?
__________________
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
  #8  
Old 21st May 2006, 23:09
sonoffett sonoffett is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 ns1.fluidnetworking.net ESMTP Postfix (Ubuntu)
ehlo localhost
250-ns1.fluidnetworking.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
quit
221 Bye
Connection closed by foreign host.
Is "Use Secure Authentication" even necessary when I'm using SSL? What exactly is it for?

Once again, you're commitment to the community is outstanding. Thank you.

Last edited by sonoffett; 22nd May 2006 at 03:59.
Reply With Quote
  #9  
Old 22nd May 2006, 10:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

The output is ok, your server can speak TLS.
No, you don't need "Use secure authentication."
You must tell you email client to use TLS (if you want to use TLS, of course).
__________________
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
  #10  
Old 22nd May 2006, 16:52
sonoffett sonoffett is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thank you very much Falko!

My one last question is how do I fix the webmail? I can send all I want but my inbox is always empty; it never recieves anything. Email client works perfectly with TLS, POP3 and SSL.
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 problems with smtp linkdeb Server Operation 13 15th March 2014 18:58
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 13:20
postfix - MySQL connection problem epo Installation/Configuration 7 4th August 2006 21:49
Postfix problem : read timeout DarkBen General 14 21st April 2006 13:39
postfix problem flourishing General 1 7th December 2005 18:39


All times are GMT +2. The time now is 18:26.


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