LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-04-2008, 09:36 AM   #1
dkiousis
LQ Newbie
 
Registered: Mar 2008
Location: Austria
Distribution: Ubuntu 7.10
Posts: 3

Rep: Reputation: 0
Ubuntu server postfix TLS configuration


Dear Ubuntu users,

Recently I installed an Ubuntu7.04 server (with Apache, MySQL, php).
The last days I am trying to install a mail server in order to use the php mail() function and to create email accounts user@server.myserver.com.

I followed (almost blindly) the manual given here:
howtoforge.com/perfect_setup_ubuntu704
installing postfix, bind9, TLS and so on...

At the end, this is how my postfix/main.cf file looks like:

Code:
myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

myhostname = server.myserver.com
mydestination = server.myserver.com, localhost.localdomain, localhost
mynetworks = 127.0.0.0/8

relayhost =

#mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

home_mailbox = Maildir/

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
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
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
tls_random_source = dev:/dev/urandom
Next I tried:
Code:
sudo telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 server.myserver.com ESMTP Postfix (Ubuntu)
ehlo localhost
250-server.myserver.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

mail from: user@server.myserver.com
250 2.1.0 Ok
rcpt to: user@server.myserver.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Test
.
250 2.0.0 Ok: queued as 23FE08685FC
quit
221 2.0.0 Bye
and everything works fine! I can read the email at my ~/Maildir and I can download it using Evolution mail.

HOWEVER, when I try (with telnet) to send an email to a non-local account (user@gmail.com) I get NO warnings but the mail NEVER arrives.
When I try to do the same with Evince, I get:
Please enter the SMTP password for user on host [NUMERIC IP]
and when I give the user's password, the warning comes:
Unable to authenticate to SMTP server.
Bad authentication response from server.

Additionally, when I try to send an email from gmail to myserver, nothing arrives.

Any help please?
 
Old 03-05-2008, 02:36 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Start with your logs. probably /var/log/maillog, but not sure in Ubuntu
 
Old 03-05-2008, 03:15 AM   #3
dkiousis
LQ Newbie
 
Registered: Mar 2008
Location: Austria
Distribution: Ubuntu 7.10
Posts: 3

Original Poster
Rep: Reputation: 0
Logs

Hello there,

I opened the /var/log/mail.log file and this is what I get (last lines) when I try to send an email to the address dk [AT] dqdev [DOT] net:
Code:
Mar  5 12:16:41 server postfix/smtp[8443]: connect to mail.dqdev.net[69.72.212.86]: No route to host (port 25)
Mar  5 12:16:41 server postfix/smtp[8443]: 674268685FC: to=<dk [AT] dqdev [DOT] net>, relay=none, delay=20, delays=17/0.01/3/0, dsn=4.4.1, status=deferred (connect to mail.dqdev.net[69.72.212.86]: No route to host)
What can the warning No route to host mean?

Additionally, when I check the file mail.warn I get:
Code:
Mar  5 12:16:07 server postfix/smtpd[8438]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Any ideas?
Thanks
 
Old 03-05-2008, 03:37 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you post the output of

route

iptables -L
 
Old 03-05-2008, 04:45 AM   #5
dkiousis
LQ Newbie
 
Registered: Mar 2008
Location: Austria
Distribution: Ubuntu 7.10
Posts: 3

Original Poster
Rep: Reputation: 0
route and iptables

Route
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.192 U     0      0        0 eth0
default         129.27.219.65   0.0.0.0         UG    0      0        0 eth0
sudo iptables -L
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
kubuntu and ubuntu - stuck on postfix configuration llm385 Linux - Newbie 5 02-25-2008 04:23 PM
Postfix + Tls + Sasl riotpunk Linux - Server 0 10-30-2007 08:11 PM
Postfix TLS error grant-skywalker Debian 3 09-11-2006 01:11 PM
postfix gives me tls handshake failure kryptonite0110 Linux - Software 0 01-02-2006 10:05 PM
Building Postfix with SASL + TLS mcd Linux - Networking 0 10-08-2005 09:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration