Koozali.org: home of the SME Server

smtp Problem (outgoing)

leonix

smtp Problem (outgoing)
« on: March 30, 2007, 03:49:56 PM »
I can not send emails (SME Server 7.1.2). Using direct delivery is not possible for most providers, so I tried to use the SMTP-Server of my providers, but this failed.

I am using the SME-Server behind a DSL-Router - and dynamic IP's. However reverse look up for the dynamic IP is ok
nslookup 195.4.185.11
Server:         192.168.139.1
Address:        192.168.139.1#53
Non-authoritative answer:
11.185.4.195.in-addr.arpa       name = Fb90b.f.ppp-pool.de.

when I use smtp.1und1.de (and my login and password) I get:
delivery 147: deferral: Connected_to_127.0.0.1_but_sender_was_rejected./Remote_host_said:_421_dns_lookup_failed_for_sender_domain/

then I changed the password (to a wrong one) and I get

148: deferral: Connected_to_127.0.0.1_but_greeting_failed./Remote_host_said:_451_Could_not_auth_to_mail_server/

So it seems that the smtp-server is recognizing my login but reject it because ... what reason?

for mail.gmx.net (as smtp-Server) I get:
delivery 154: failure: Connected_to_127.0.0.1_but_sender_was_rejected./Remote_host_said:_550_5.1.8_Cannot_resolve_your_domain_{mp053}/

for smtp.web.de I get:
delivery 160: failure: Connected_to_127.0.0.1_but_sender_was_rejected./Remote_host_said:_501_ungueltige_mail-adresse_/_invalid_mail-address/

For that case I disabled smtp-auth:
 delivery 172: failure: Connected_to_217.72.192.157_but_sender_was_rejected./Remote_host_said:_501_Keine_Authentifizierung,_oder_POP3-Anmeldung_zu_weit_in_der_Vergangenheit_._/_Authentification_failed,_or_POP3_logon_too_old._/

(Logs are from /var/log/mail/current )

Any ideas to solve the problem? It is strange that with auth the IP address
is 127.0.0.1 but without auth it is 217.72.192.157 (smtp-ha.web.de).
I only changed the auth/no auth drop down box.
A bug???

Thx

Leo

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
smtp Problem (outgoing)
« Reply #1 on: March 30, 2007, 04:05:10 PM »
I'll write the reasons for every error you posted:

1.You dns adress is invalid (dns_lookup_failed_for_sender_domain) = you'll have to write the apropriate dns adress or domain name

2.Wrong password (Could_not_auth_to_mail_server) = you didn't type the correct password

3.Couldn't resolve your domain (Cannot_resolve_your_domain) = you configured wrong domain

4.Wrong email adress (invalid_mail-address) = because you typed a wrong email adress

5.Could not autenticate (Authentification_failed) = because you disabled auth
"It should just work" if it doesn't report it. Thanks!

leonix

smtp Problem (outgoing)
« Reply #2 on: March 30, 2007, 04:21:31 PM »
Quote from: "bpivk"
I'll write the reasons for every error you posted:

1.You dns adress is invalid (dns_lookup_failed_for_sender_domain) = you'll have to write the apropriate dns adress or domain name


DNS is working (it is using 192.168.2.1 from the DSL-router, and this one is getting it form the DSL-Dial-In-server)

Quote from: "bpivk"

3.Couldn't resolve your domain (Cannot_resolve_your_domain) = you configured wrong domain


Do you have an example?
I have configured:
"demo.local   Primary domain   Primary   Lokale DNS-Auflösung"
"demo.biz   Primary   Internet DNS-Auflösung"


(The other errors are ok, because I did it for testing only).

Thx,

Leo

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
smtp Problem (outgoing)
« Reply #3 on: March 30, 2007, 04:36:40 PM »
Well i'm the owner of domain.net and domain.com (fictive but i am an owner of two real domains) so i have configured my server as server.domain.net and asked my ISP to add a reverse dns record to my domain.

demo.local nad demo.biz aren't your domains and your isp's server won't allow it. That's like naming your server server.microsoft.com and sending mail from it. It can't and shouldn't work. You'll have to use a real domain name and dns records.

But i do admit that i have apropriate dns records and have never added a domain that i don't own so i can't test if it would send from your isp but i think that it wouldn't because of the dns issue (isp's server calls your server and it doesn't get a responce which is normal because you don't own the domain and the mail gets bounced).

Try a local domain and see if it works. And buy a domain, set the apropriate records and then report back.
It should work then.

Quote
DNS is working (it is using 192.168.2.1 from the DSL-router, and this one is getting it form the DSL-Dial-In-server)

Not your dns records.  :lol: Domain dns records. This isn't the same thing.
"It should just work" if it doesn't report it. Thanks!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: smtp Problem (outgoing)
« Reply #4 on: March 30, 2007, 04:56:04 PM »
Quote from: "leonix"

when I use smtp.1und1.de (and my login and password) I get:
delivery 147: deferral: Connected_to_127.0.0.1_but_sender_was_rejected./Remote_host_said:_421_dns_lookup_failed_for_sender_domain/
...
for mail.gmx.net (as smtp-Server) I get:
delivery 154: failure: Connected_to_127.0.0.1_but_sender_was_rejected./Remote_host_said:_550_5.1.8_Cannot_resolve_your_domain_{mp053}/

for smtp.web.de I get:
delivery 160: failure: Connected_to_127.0.0.1_but_sender_was_rejected./Remote_host_said:_501_ungueltige_mail-adresse_/_invalid_mail-address/


All of those say the same thing - the sender address ("from address") on the email you are trying to send is invalid.

leonix

smtp Problem (outgoing)
« Reply #5 on: March 30, 2007, 05:28:22 PM »
Quote from: "bpivk"


demo.local nad demo.biz aren't your domains and your isp's server won't allow it. That's like naming your server server.microsoft.com and sending mail from it. It can't and shouldn't work. You'll have to use a real domain name and dns records.



Well of course, demo.biz is just a placeholder of my real domain name.
I am the owner of that domain. So no problem. Sorry that I did not mention it...

Leo

leonix

Re: smtp Problem (outgoing)
« Reply #6 on: March 30, 2007, 06:14:50 PM »
Quote from: "CharlieBrady"

All of those say the same thing - the sender address ("from address") on the email you are trying to send is invalid.


Got hint. I changed my main domain (only possible in the admin console)
from demo.local to demo.biz. Now it works. Thx guys! :-)

However, when I want to access www.demo.biz I will get to the local
server not the real one in the net. How can I solve this? When I remove the "www.demo.biz", I get "can not resolve www.demo.biz". (The IP-address of www.demo.biz can change from time to time, so I can not use it)

Thx

Leo

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
smtp Problem (outgoing)
« Reply #7 on: March 30, 2007, 07:51:40 PM »
Well you have to give us more data.
Do you have two servers? Because you mentioned local server and a net server.

Give us some more info.
"It should just work" if it doesn't report it. Thanks!

leonix

smtp Problem (outgoing)
« Reply #8 on: March 30, 2007, 08:04:19 PM »
Quote from: "bpivk"
Well you have to give us more data.
Do you have two servers? Because you mentioned local server and a net server.


In SME-Server I have the main domain defined: demo.biz
But I have a external server www.demo.biz hosted in the internet, and
from my clients behind the SME-Server I can not reach that internet-host
(I get the primary webpage from the SME-Server back instead).
Then: in SME-Server I have changed www.demo.biz from a localhost IP to the IP-address of that internet server. This is a quick fix. But when my hoster is changing the IP address (and he is doing it regularly) I have to change that IP in the SME config too, every time. It would be better when SME-Server is using DNS-Service to resolve www.demo.biz - for that name only.

Leo

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
smtp Problem (outgoing)
« Reply #9 on: March 30, 2007, 08:11:57 PM »
Well you would need to enter the ip and you say that it's constantly changed so you have a problem there.

Or you could change port 80 to something else and portforward the data. But then were back to ip's.  :roll:

You should get a fixed ip for that server or use SME for webpages. This is the most simple solution that i can think of.
"It should just work" if it doesn't report it. Thanks!

Offline mmccarn

  • *
  • 2,656
  • +10/-0
smtp Problem (outgoing)
« Reply #10 on: March 31, 2007, 04:19:15 PM »
You'll need to create DNS records on your SME server pointing to any off-site servers for your domain.

Specifically, it's not enough to delete "www.demo.biz", you'll need to create a record on the SME for "www.demo.biz" pointing to the off-site server address.

If you have any other off-site hosts for "demo.biz" you'll have to do the same thing for them, too.