Relay using Outer SMTP on Failed

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-22 05:34

Hi Is there a function where is If my local SMTP server failed then it try using outer SMTP server such as gmail ( only when the mail failed )

Cuz I just have this one email address that cannot be sent from my server but can be sent using other mail such as gmail, hotmail, 126

When I use the SMTP Relayer in the Settings > Protocol > SMTP > [Delivery of Email] Tab
it seems all the email whether can or cannot be send by my server will be using all SMTP Relay server to sending email

is there any other option let's say on 5 try unable to send from my SMTP server than it's try using the outer SMTP server

User avatar
mattg
Moderator
Moderator
Posts: 20841
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Relay using Outer SMTP on Failed

Post by mattg » 2010-04-22 06:05

Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-22 08:53

The following example explains how to configure all email for the domain hmailserver.com to go through mx.hmailserver.com instead of through the default server, mail.hmailserver.com:

1. Start hMailServer Administrator
2. Go to Settings -> Protocols -> SMTP -> Routes
3. Click on Add
4. In the Domain field, enter hmailserver.com
5. In the Target SMTP host field, enter mx.hmailserver.com.
6. Click on Save

Henceforth, all email sent to hMailServer.com will go through mx.hmailserver.com, instead of through the default server, mail.hmailserver.com.
Plz correct me if I'm wrong
my domain mail : mail@mydomain.com
my gmail account : mail@gmail.com
the people I going to sent the mail : mail@people.com

Normal sending using my server return
"Error Description: No mail servers appear to exists for the recipients address."
( but works if i use gmail ), so i need to let my gmail sent it instead of my own server. My settings :

[General]
Domain : mydomain.com
Target SMTP host : smtp.gmail.com
TCP/IP Port : 465
Use SSL : Yes
When sender matches route, treat sender as : A local email address
When recipient matches route, treat sender as : A local email address

[Addresses]
Deliver to addresses below : checked
mail@people.com

[Delivery]
Number of tries : 4
Minutes between every retry : 1
Server requires authentication : checked
Username : mail@gmail.com
Password : mail@gmail.com's password

User avatar
mattg
Moderator
Moderator
Posts: 20841
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Relay using Outer SMTP on Failed

Post by mattg » 2010-04-22 09:01

I'd probably NOT set these as local, I'd probably set them both as 'A remote email address'
wpsd.lauw wrote:When sender matches route, treat sender as : A local email address
When recipient matches route, treat sender as : A local email address
Otherwise, yep that should do if gmail allows relay through their servers...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-22 09:23

Hmmm No good at all

It's looks like sending to the mail@people.com success
but when i try to send to gmail and other mail it failed

I think this route function is routing all the mail that send from mydomain.com to use gmail......

I need to set it if I failed sending from mail@mydomain.com to mail@people.com using my SMTP Server
then I let the email sending using gmail SMTP server to the mail@people.com

on short my ISP block mail@people.com
the only way around is to use other ISP SMTP such as gmail

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-22 10:03

When one SMTP server delivers email to another, DNS-MX lookup is normally used. This means that if you send an email to me, at someone@hmailserver.com, your email server will do an MX lookup for my domain, hmailserver.com. The MX response will tell your server that it should deliver the message to mail.hmailserver.com. That communication occurs via port 25. However, it can happen that your ISP blocks outgoing traffic on the SMTP port (25) to all computers except their own email server. You can therefore not connect to mail.hmailserver.com. In that case, you should configure hMailServer to send all email through your ISP's email server. Your ISP's email server is then your relayer. The value to enter in the relayer field is the name of your ISP's email server. For example, if you happen to use the Swedish broadband provider Bredbandsbolaget, you should specify smtp.bredband.net as SMTP relayer.
It should be a relayer but not all outgoing will use it

User avatar
mattg
Moderator
Moderator
Posts: 20841
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Relay using Outer SMTP on Failed

Post by mattg » 2010-04-22 10:29

Ok just checking what you wrote earlier again
wpsd.lauw wrote:Plz correct me if I'm wrong
my domain mail : mail@mydomain.com
my gmail account : mail@gmail.com
the people I going to sent the mail : mail@people.com

Normal sending using my server return
"Error Description: No mail servers appear to exists for the recipients address."
( but works if i use gmail ), so i need to let my gmail sent it instead of my own server. My settings :

[General]
Domain : mydomain.com
Target SMTP host : smtp.gmail.com
TCP/IP Port : 465
Use SSL : Yes
When sender matches route, treat sender as : A local email address
When recipient matches route, treat sender as : A local email address
domain should be "people.com"
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-23 03:20

The routes settings is working but it return below message

Your message did not reach some or all of the intended recipients.

Sent: Fri, 23 Apr 2010 09:02:48 +0800
Subject: 测试邮件

The following recipient(s) could not be reached:

mail@people.com
Error Type: SMTP
Remote server (74.125.157.109) issued an error.
hMailServer sent: <Password removed>
Remote server replied: 535 5.7.1
http://mail.google.com/support/bin/answ ... swer=14257 cm22sm217538ibb.17

Does that mean I can't use gmail for routes ?

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-25 08:05

still no luck

I try relaying to my outer gmail account still not working

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: Relay using Outer SMTP on Failed

Post by Bill48105 » 2010-04-25 15:34

wpsd.lauw wrote:The routes settings is working but it return below message

Your message did not reach some or all of the intended recipients.

Sent: Fri, 23 Apr 2010 09:02:48 +0800
Subject: 测试邮件

The following recipient(s) could not be reached:

mail@people.com
Error Type: SMTP
Remote server (74.125.157.109) issued an error.
hMailServer sent: <Password removed>
Remote server replied: 535 5.7.1
http://mail.google.com/support/bin/answ ... swer=14257 cm22sm217538ibb.17

Does that mean I can't use gmail for routes ?
Error code 535 5.7.1 from gmail means authentication failed so it doesn't like your username & password you're sending. Are you sure it is correct? Maybe your gmail account is locked from typing wrong password too many times.. Did you try the DisplayUnlockCaptcha link provided?

I can't tell by what you've posted but what address are the emails you're relaying 'from'? If it's not a gmail-related address (gmail or other official variants or a domain hosted with gmail) then it will unlikely relay for you since it'll see it as a foreign address & think you're trying to relay spam. That's why it'd be great if hmail would have option to rewrite SMTP from so it's not the original and instead can be defined to something the remote relay likes. (Not for sending spam of course, legit email I mean. lol) Things like SPF testing choke on forwarded email because it appears to be (which in fact in reality it is) being relayed from a place that is not allowed to relay for that domain.. So because of SPF & other IP/domain testing that occurs forwarding to outside servers without rewriting SMTP from is pretty much futile. For now you should be able to do with scripting but a lot more work than selecting it on hmail if it was there. :D

Hope that helps.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-25 16:11

The mail I sent is to erema.com.cn some machine company
But then I also try using gmail ( route to gmail to sent to gmail using my server )
still no luck

the gmail password 100% correct, I can login and send to above email from gmail

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: Relay using Outer SMTP on Failed

Post by Bill48105 » 2010-04-25 16:21

wpsd.lauw wrote:The mail I sent is to erema.com.cn some machine company
But then I also try using gmail ( route to gmail to sent to gmail using my server )
still no luck

the gmail password 100% correct, I can login and send to above email from gmail
OK so we know what you sent TO but what was the email FROM? Is the FROM address 'local' to gmail? In other words an address that gmail will see as a valid sender for email it hosts for vs one that is foreign & therefore should not be relayed? Perhaps you can share the domain name at least or possibly answer if it the domain/address the rejected email is FROM is hosted with gmail or not to help you out.

OK so we know your account is not locked if you've successfully sent an email with your gmail account since your blocked emails. But based on that gmail link you sent it had to be asked. ;)

I understand not being able to post email addresses or confidential info but unfortunately that are often needed to diagnose & trace issues so please pardon if I'm repeating what someone else has asked or if you're reluctant to reply with. Not suggesting you post confidential info but rather asking for your patience & understanding regarding it. At any rate it definitely makes it super hard if not impossible to solve in a public forum.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

wpsd.lauw
Normal user
Normal user
Posts: 108
Joined: 2009-12-08 07:07

Re: Relay using Outer SMTP on Failed

Post by wpsd.lauw » 2010-04-28 16:41

Sorry can share the info for now

But I think I found my problem and the cause is not from hmailserver or ISP
is the d**n RISING av < hate it already broke my company apps twice >

it somehow block the mail, than today it block all outgoing mail ( they have firewal build like inside )

solve for now after i change it to other AV

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: Relay using Outer SMTP on Failed

Post by Bill48105 » 2010-04-28 16:46

Ouch yeah firewalls can definitely block email. Not sure I'd install any real-time (system-level background vs on-demand) av/firewall on same box as mail server but to each his/her own.

Glad you figured it out & thanks for following up here.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply