Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: yudidw2 on April 19, 2012, 04:58:40 am

Title: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 19, 2012, 04:58:40 am
Hallo,

please help me...
i'm using zentyal for email server,
Email successfully send in Thunderbird client if i set smtp using the IPAddress of email server,
but when i set smtp using mydomain.com or smtp.mydomain.com, user getting the connection time out send the message.
something wrong with zentyal configuration?

Thanks you.
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 19, 2012, 08:05:52 am
DNS  ???

Can you check that client is able to resolve names?
Is there any DNS somewhere? If yes, is this DNS defined as DNS to use at client level and if yes, does this DNS contain entry for "smtp.yourdomain.com"?

Nothing wrong with Zentyal conf here  :P
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 19, 2012, 09:29:35 am
DNS  ???

Can you check that client is able to resolve names?
Is there any DNS somewhere? If yes, is this DNS defined as DNS to use at client level and if yes, does this DNS contain entry for "smtp.yourdomain.com"?

Nothing wrong with Zentyal conf here  :P

sorry, i mean my zentyal configuration..
how to check that the client is able to resolve names?

Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 19, 2012, 09:31:04 am
ping smtp.yourdomain.com from command line

what is client OS?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 19, 2012, 09:35:30 am
ping smtp.yourdomain.com from command line

what is client OS?

ping smtp.mydomain.com RTO
ping mydomain.com Reply
ping mail.mydomain.com Reply

client OS (windows &) using thunderbird mail client
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 19, 2012, 09:39:02 am
RTO ???? what does it mean ? (sorry if I'm dumb  :-[ )
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 19, 2012, 09:40:24 am
btw, are mail.domain.com and smtp.domain.com supposed to be same server (Zentyal hehehe)?
If yes, why not using mail.domain.com in your Thunderbird conf?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 19, 2012, 09:44:20 am
btw, are mail.domain.com and smtp.domain.com supposed to be same server (Zentyal hehehe)?
If yes, why not using mail.domain.com in your Thunderbird conf?
it is the same server, but using mail.domain.com or smtp.domain.com always getting connection timeout.
when i use manual config and set smtp server to local network ipaddress(zentyal), the message succesfully send
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 19, 2012, 09:45:05 am
RTO ???? what does it mean ? (sorry if I'm dumb  :-[ )
Request Time Out
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 19, 2012, 09:50:47 am
so, you have 2 different issues if I understand well:

- your DNS doesn't contain any entry for smtp.domain.com  (but do you need one as mail.domain.com already exists and can be used)
- Thunderbird doesn't work when using FQDN. Strange  :o  are you sure that config is really the same when switching from IP address to FQDN? I mean in term of port to be used, TLS, authentication ...
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 20, 2012, 03:20:23 am
so, you have 2 different issues if I understand well:

- your DNS doesn't contain any entry for smtp.domain.com  (but do you need one as mail.domain.com already exists and can be used)
- Thunderbird doesn't work when using FQDN. Strange  :o  are you sure that config is really the same when switching from IP address to FQDN? I mean in term of port to be used, TLS, authentication ...

did you mean DNS settings in zentyal ebox menu?
In Domain name server resolver I entered with the ip address of DNS domain.
In Infrastructure DNS menu list of domain I entered with :
domain.com --> hostname  : mail, mail exchanger : mail, name servers : mail
ip address : 192.168.1.10 (local ip)

this is main.cf postfix config :

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

# require helo
smtpd_delay_reject  = yes
smtpd_helo_required = yes

strict_rfc821_envelopes = yes
disable_vrfy_command = yes

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

myorigin = /etc/mailname
myhostname = mail.domain.com
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain
smtp_helo_name = mail.domain.com
alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases
local_recipient_maps = proxy:unix:passwd.byname $alias_maps

relayhost =

transport_maps = hash:/etc/postfix/transport
zarafa_destination_recipient_limit = 1



mynetworks = 127.0.0.0/8

message_size_limit = 4194304
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all

# Virtual Aliases
virtual_alias_maps = ldap:valiases
valiases_server_host = 127.0.0.1
valiases_search_base = ou=mailalias,ou=postfix,dc=dove
valiases_query_filter = (&(mail=%s)(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
aliases_bind = no

# Virtual Domains
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
#virtual_transport = virtual
virtual_mailbox_base = /var/vmail/
virtual_mailbox_maps= ldap:ldapvirtualmap

ldapvirtualmap_server_host = 127.0.0.1:389
ldapvirtualmap_bind = no
ldapvirtualmap_search_base = ou=Users,dc=dove
ldapvirtualmap_query_filter = (&(mail=%s)(!(quota=-1))(objectClass=CourierMailAccount))
ldapvirtualmap_result_attribute = mailbox

virtual_mailbox_domains = ldap:vmaildomains
vmaildomains_server_host = 127.0.0.1
vmaildomains_bind = no
vmaildomains_search_base =  ou=postfix,dc=dove
vmaildomains_query_filter = (|(&(objectclass=domain)(domainComponent=%s))(&(objectclass=CourierMailAlias)(mail=@%s)))
vmaildomains_result_attribute = dc, maildrop


virtual_minimum_uid = 100
virtual_uid_maps = static:108
virtual_gid_maps = static:115


## TLS/SSL
smtpd_use_tls = yes
smtpd_tls_note_starttls = yes
smtpd_tls_key_file  = /etc/postfix/sasl/postfix.pem
smtpd_tls_cert_file = /etc/postfix/sasl/postfix.pem
smtpd_tls_loglevel = 1


smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access pcre:/etc/postfix/helo_checks.pcre


#SASL authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =  $myorigin

content_filter=smtp-amavis:127.0.0.1:10024




Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 20, 2012, 08:45:47 am
Frankly I did look yet at your postfix conf. I don't think any problem there would generate this behaviour.
However, looking at your DNS settings, it appears that you do not describe "smtp" but "mail". I'm not surprised you can't resolve "smtp". I'm surprised you try to use it.
As you have defined everything with "mail", configure Thunderbird with "mail" instead.

Then last point will be to understand why, assuming problem still exists, "mail.yourdomain.com" is not found from Thunderbird.
I rather suspect some typo or use of host name instead of fqdn  ::)
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 20, 2012, 09:27:25 am
Frankly I did look yet at your postfix conf. I don't think any problem there would generate this behaviour.
However, looking at your DNS settings, it appears that you do not describe "smtp" but "mail". I'm not surprised you can't resolve "smtp". I'm surprised you try to use it.
As you have defined everything with "mail", configure Thunderbird with "mail" instead.

Then last point will be to understand why, assuming problem still exists, "mail.yourdomain.com" is not found from Thunderbird.
I rather suspect some typo or use of host name instead of fqdn  ::)

ok... i use mail.domain.com at thunderbird but problem still exist.
what should i do? where i can change ?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 20, 2012, 09:32:28 am
so, to summarize:
- Thunderbird is configured to user mail.yourdomain.com as smtp server
- on this same PC, if you type "ping mail.yourdomain.com" it resolves this name and reaches mail server
- .... but from Thunderbird, you get time out

correct ?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 20, 2012, 11:28:12 am
so, to summarize:
- Thunderbird is configured to user mail.yourdomain.com as smtp server

correct

- on this same PC, if you type "ping mail.yourdomain.com" it resolves this name and reaches mail server
- .... but from Thunderbird, you get time out
correct ?

correct
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: Marcus on April 20, 2012, 09:50:18 pm
Hello yudidw2,

Since the start of this thread, have you rebooted your PC ?

You may also try to flush your DNS:
1) Click Start

2) Search for "cmd.exe" (it should start your shell)

3) type:
Code: [Select]
ipconfig /flushdns
4) restart ThunderBird and test

**Also, please make sure that you leave the DNS auto-configuration to your desktop.  See this howto if you aren't familiar with this configuration:
http://support.microsoft.com/kb/323380/en

Keep us updated.

Best,

Marcus

 
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 23, 2012, 06:33:53 am
Hello yudidw2,

Since the start of this thread, have you rebooted your PC ?

You may also try to flush your DNS:
1) Click Start

2) Search for "cmd.exe" (it should start your shell)

3) type:
Code: [Select]
ipconfig /flushdns
4) restart ThunderBird and test

**Also, please make sure that you leave the DNS auto-configuration to your desktop.  See this howto if you aren't familiar with this configuration:
http://support.microsoft.com/kb/323380/en

Keep us updated.

Best,

Marcus

already done that, but still thunderbird can't connect to the server.
all pc in office cannot connect via thunderbird to that mail server (domain.com)
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 23, 2012, 07:12:51 am
I suspect - again - something wrong client side.
Look at attached pic. This is how it looks on my own Thunderbird (Ubuntu).
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 23, 2012, 11:10:52 am
I suspect - again - something wrong client side.
Look at attached pic. This is how it looks on my own Thunderbird (Ubuntu).
same with mine
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 23, 2012, 11:18:57 am
No this is not the same  ;)
You target port 587 but no security (e.g. STARTTLS) and you provide login (here test@domain.com) and authentication method differs too.
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 23, 2012, 11:20:02 am
this is the capture of error
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 23, 2012, 11:45:27 am
your last capture is showing that you even can't resolve this name at OS level (while you explained the opposite  ::) ) thus there is no chance it works using Thunderbird  8)
Could you please post the result of:
Code: [Select]
ipconfig /all
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 23, 2012, 11:49:33 am
your last capture is showing that you even can't resolve this name at OS level (while you explained the opposite  ::) ) thus there is no chance it works using Thunderbird  8)
Could you please post the result of:
Code: [Select]
ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : Titan
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection 4:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : D-Link DFE-538TX 10/100 Adapter
   Physical Address. . . . . . . . . : 00-05-5D-42-84-B4
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Local Area Connection 3:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Atheros AR8131 PCI-E Gigabit Ethernet Con
troller (NDIS 6.20)
   Physical Address. . . . . . . . . : F4-6D-04-D9-2E-E8
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::d84a:cea1:c9dc:f3b7%20(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.42.181(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.42.1
   DHCPv6 IAID . . . . . . . . . . . : 435449092
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-15-72-D7-42-00-15-58-24-CC-E0

   DNS Servers . . . . . . . . . . . : 192.168.42.1
   NetBIOS over Tcpip. . . . . . . . : Enabled
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 23, 2012, 11:52:36 am
Is 192.168.42.1 your Zentyal server?
Type, from your client:
Code: [Select]
nslookup mail.mydomain.com
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 23, 2012, 11:56:31 am
Is 192.168.42.1 your Zentyal server?
Type, from your client:
Code: [Select]
nslookup mail.mydomain.com

Server:  xxx.mydomain.com (firewall)
Address:  192.168.xxx.xxx

Non-authoritative answer:
Name:    mail.mydomain.com
Address:  xxx.xxx.xxx.xxx
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 23, 2012, 12:29:34 pm
 ;D ;D ;D I realize now that you made some effort to hide everything in your previous attachment reason why I tough name was not resolved (I read it too quickly too  :-[)

However I notice you can't ping (reach ?) it.

PS: no need to hide your internal IP (192.168.42.x): this is RFC1817 compliant => no one will access it from outside  ;)
even in your last reply, you replace your DNS IP with xxx. Who cares if this is 192.168.42.1 or 192.168.42.254?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 24, 2012, 03:44:20 am
;D ;D ;D I realize now that you made some effort to hide everything in your previous attachment reason why I tough name was not resolved (I read it too quickly too  :-[)

However I notice you can't ping (reach ?) it.

PS: no need to hide your internal IP (192.168.42.x): this is RFC1817 compliant => no one will access it from outside  ;)
even in your last reply, you replace your DNS IP with xxx. Who cares if this is 192.168.42.1 or 192.168.42.254?

192.168.42.1 is the firewall server
192.168.42.2 is the zentyal server (mail server).
at client i can ping the mail.mydomain.com or the ip address of zentyal server.
but when connect using thunderbird time out
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 24, 2012, 06:27:39 am
1 - did you try, from command line:
Code: [Select]
telnet 25 mail.mydomain.com
2 - Did you look at firewall logs for rejected or dropped packets?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 24, 2012, 08:52:29 am
1 - did you try, from command line:
Code: [Select]
telnet 25 mail.mydomain.com
2 - Did you look at firewall logs for rejected or dropped packets?
Connecting To 25...Could not open connection to the host, on port mail.mydomain.com: Connect failed
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 24, 2012, 09:18:38 am
So do not wonder why Thunderbird fails.

I definitely advise you to look at firewall rules and log to ensure you can access.
What is very strange to me is that you can access using IP.
Can you try to make it simple, from Thunderbird standpoint (for testing purpose) and set up your SMTP server using port 25 (no TLS, no auth...)?
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: yudidw2 on April 26, 2012, 03:24:08 am
So do not wonder why Thunderbird fails.

I definitely advise you to look at firewall rules and log to ensure you can access.
What is very strange to me is that you can access using IP.
Can you try to make it simple, from Thunderbird standpoint (for testing purpose) and set up your SMTP server using port 25 (no TLS, no auth...)?

nothing block in firewall.
still with no tls and auth mydomain timeout
Title: Re: SMTP using ipaddress ok but using mydomain.com timeout
Post by: christian on April 26, 2012, 07:02:17 am
For what I understand (i.e. very little for the time being  :-[), mail.yourdomain.com do not point to IP you are using or at least this is my current feeling.
Let me explain:

if
Code: [Select]
telnet 192.168.42.2 25works but
Code: [Select]
telnet mail.yourdomain.com 25doesn't, then this is most likely not the same server.
I also realize, reading again and again what you wrote, thet firewall and mail are different servers. Am I correct?
1 - Does it mean that firewall if not Zentyal server?
2 - when you wrote "nothing in FW logs", does it mean at 192.168.42.1 or FW at 192.168.42.2 (BTW is FW running on Zentyal server?)