HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   getnameinfo failed Postfix Virt domains - falko (http://www.howtoforge.com/forums/showthread.php?t=26947)

almeister9 19th September 2008 12:16

getnameinfo failed Postfix Virt domains - falko
 
Hi all.
I have installed postfix using virtual domains on a fresh ubuntu install using falko great howto: Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)
All tests appear to reply with correct responses as per the howto. I can get into database using phpmyadmin. I have setup two user accounts this way, 'news@scribalpublishingmail.com.au' and 'test@scribalpublishingmail.com.au'.
using mailx I have sent each a welcome email.
I have registered the domain name and arranged DNS hosting. they say they can see the mail server. I have forwarded the required ports on my router.
I have sent an email to news@scribalpublishingmail.com.au from two seperate external email accounts and neither of them have bounced.

I can browse to suirrelmail across my network using the ipaddress/squirrelmail/ but it will not let me sign in to either of the accounts that I setup.

Then I noticed that the result of
netstat -tap
Quote:

root@smail:/home/alan# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 localhost.localdo:10024 *:* LISTEN 4371/amavisd (maste
tcp 0 0 localhost.localdo:10025 *:* LISTEN 4992/master
tcp 0 0 localhost.localdo:mysql *:* LISTEN 4445/mysqld
tcp 0 0 *:www *:* LISTEN 5098/apache2
tcp 0 0 *:smtp *:* LISTEN 4992/master
tcp6 0 0 [::]:imaps [::]:* LISTEN 4888/couriertcpd
tcp6 0 0 [::]:pop3s [::]:* LISTEN 4927/couriertcpd
tcp6 0 0 [::]:pop3 [::]:* LISTEN 4907/couriertcpd
tcp6 0 0 [::]:imap2 [::]:* LISTEN 4868/couriertcpd
tcp6 0 0 [::]:ssh [::]:* LISTEN 4336/sshd
getnameinfo failed
tcp6 0 0 smail.scribalpublis:ssh [UNKNOWN]:3018 ESTABLISHED 5126/sshd: alan [pr
on the second last line it says: getnameinfo failed

here is my postfix info

vi /etc/postfix/main.cf
Quote:

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


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = smail.scribalpublishingmail.com.au
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = smail.scribalpublishingmail.com.au
mydestination = smail.scribalpublishingmail.com.au, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
I noticed in another thread that falko advised someone to change

myorigin = /etc/mailname
to
myorigin = their fqdn

as I have done above but it has not changed anything
and below:
Quote:

root@smail:/home/alan# netstat -tap | grep mysql
tcp 0 0 localhost.localdo:mysql *:* LISTEN 4445/mysqld
getnameinfo failed
root@smail:/home/alan#
result of telnet localhost 25
Quote:

Connected to localhost.localdomain.
Escape character is '^]'.
220 smail.scribalpublishingmail.com.au ESMTP Postfix (Ubuntu)
does anyone have anyideas where I should look. Im sure there are no typos as I copy and pasted everything in (being very careful about extra spaces as many have warned.)

Any help would be greatly appreciated.
Cheers

almeister9 19th September 2008 16:35

started again. got as far as page 2
 
I decided to start again from scratch. reformat. fresh install. pages 1 to 3 of The Perfect Server - Ubuntu Hardy Heron (Ubuntu 8.04 LTS Server) then page 1 of Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.04 LTS)
I omitted installing postfix-tls because it cannot find a source for it and I have read in other threads that it is not needed as it is included in the latest postfix.
Quote:

New password for the MySQL "root" user: <-- yourrootsqlpassword
Repeat password for the MySQL "root" user: <-- yourrootsqlpassword
Create directories for web-based administration? <-- No
General type of mail configuration: <-- Internet Site
System mail name: <-- server1.example.com (changed to my fqdn <omitted the server1. part becasue the instructions on the screen said to>
SSL certificate required <-- Ok
Web server to reconfigure automatically: <-- apache2
I skipped section 3 Apply The Quota Patch To Postfix
I completed section 4 Create The MySQL Database For Postfix/Courier
I checked to see that I could log into phpmyadmin and I could.

On to page 2

section 5 Configure Postfix

/etc/mysql/my.cnf already had:
bind-address = 127.0.0.1
I restarted MySql anyway.
/etc/init.d/mysql restart

then:
netstat -tap | grep mysql
and got:
Quote:

root@smail:~# netstat -tap | grep mysql
getnameinfo failed
tcp 0 0 localhost.localdo:mysql *:* LISTEN 4972/mysqld
I dont understand what I could be doing wrong, this early in the piece.
my hosts file looks like this:
Quote:

vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.1.1.55 servername.myfqdn servername

# 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
and my network interfaces file looks like this:
Quote:

vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 10.1.1.55
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.1

there isnt anything else. I havent even gotten as far as creating the six text files. I dont understand what I could have done wrong. can anybody please help me understand this?

falko 19th September 2008 18:04

What's in /etc/resolv.conf? Does the internet connection work on the server?

ralic 19th September 2008 21:40

Quote:

Originally Posted by almeister9 (Post 145815)
netstat -tap | grep mysql
and got:
Quote:

root@smail:~# netstat -tap | grep mysql
getnameinfo failed
tcp 0 0 localhost.localdo:mysql *:* LISTEN 4972/mysqld
I dont understand what I could be doing wrong, this early in the piece.

Take a look here getnameinfo failed

almeister9 20th September 2008 03:16

More learningnessment
 
Thank you Falko and Ralic for your propmt replies.

I think I will take Ralic's advice and ignore it, now that I know what is going on, and since if I do it from the actual server terminal instead of ssh the error is not there.

just to be on the safe side, the contents of /etc/resolv.conf is one line

nameserver 10.1.1.1 (which is my DSL 504T adsl modem router).

I did do a search in this forum for 'getnameinfo failed' but there were no results.
again I thank you both for your help and I will continue on with the build. This is the 5th time I have started again from scratch but each time I get better results and each time I am learning more.

Cheers

p.s. is there a way to mark posts as "resolved" in this forum.

falko 20th September 2008 13:04

Can you try
Code:

nameserver 145.253.2.75
instead?

almeister9 21st September 2008 15:44

Many thanks.
 
Thanx Falko.
it works when I use the ip address you gave me. What is this IP address? I assume I now have to put in the IP address of the name server for my ISP. I can see it in the status area of my router.

Again thank you.

With your help and a few others, I have been able to build and get working, my own mail server, in a week, without ever having touched linux before. I can see that I have embarked on a journey that I am going to enjoy.

Thank you.

falko 22nd September 2008 13:13

Quote:

Originally Posted by almeister9 (Post 146071)
What is this IP address?

It's a working nameserver from a German DSL provider. Instead of this one you can use your provider's nameservers.


All times are GMT +2. The time now is 22:45.

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