SMTP Relay

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
ericstott
New user
New user
Posts: 4
Joined: 2010-01-14 09:30

SMTP Relay

Post by ericstott » 2010-01-14 09:42

I there a more comprehensive tutorial on how to set up a SMTP relay?
Situation:
I have three different places where I am attempting to send out emails:
Home
Work
Hotel

Each requires a separate smtp server, and one of them (Home) requires me to log into the server before sending the email.
How can I specify how to relay my smtp traffic based on the gateway ip address (instead of an IP address that I am assigned by the hotel, etc) and also how do I configure Outlook, do I send it to 192.168.1.1
Also, I am connecting to 4 different SMTP server (business, business 2, business 3, and personal email).
Is there documentation on how to configure the routing in this situation?
Thanks,
Eric

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

Re: SMTP Relay

Post by mattg » 2010-01-14 15:28

Why do you want to use a mailserver?
What advantage do you see in having a mailserver over a mail client, like say Outlook?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

ericstott
New user
New user
Posts: 4
Joined: 2010-01-14 09:30

Re: SMTP Relay

Post by ericstott » 2010-01-14 16:27

Because every time I change locations with my laptop, I need to go into Outlook and change the smtp properties.

User avatar
sheffters
Senior user
Senior user
Posts: 453
Joined: 2009-07-01 20:46
Contact:

Re: SMTP Relay

Post by sheffters » 2010-01-14 16:33

you can put multiple servers / accounts into Outlook to solve
Also, I am connecting to 4 different SMTP server (business, business 2, business 3, and personal email).
S.

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

Re: SMTP Relay

Post by mattg » 2010-01-14 16:38

ericstott wrote:Because every time I change locations with my laptop, I need to go into Outlook and change the smtp properties.
Why do you need to change your SMTP properties? And even so, what will be different if you put a mailserver on your laptop?

As sheffters suggests, just add multiple accounts to outlook and achieve the same thing...
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

ericstott
New user
New user
Posts: 4
Joined: 2010-01-14 09:30

Re: SMTP Relay

Post by ericstott » 2010-01-14 17:23

This is the exact reason why I want to use hmailserver.
I would like hmailserver to look at the gateway (or an IP port range) and based on that, send email out via a particular smtp settings.
Example:
When I am at work I am connected to my connection at work there are no restrictions so my smtp server is
smtp.mydomain.com (must log in before sending)
smtp.myotherdomain.com (must log in before sending)

When I am connected at the hotel the smtp server is
smtp.hotel.com (must not log in before sending)
smtp.hotel.com (must not log in before sending)

When I am connected at home the smtp server is
smtp.west.cox.net (must not log in before sending)
smtp.west.cox.net (must not log in before sending)

Every time I change locations I need to go an reconfigure my smtp servers.

Tezcatlipoca
Senior user
Senior user
Posts: 309
Joined: 2009-07-21 12:33

Re: SMTP Relay

Post by Tezcatlipoca » 2010-01-14 18:01

It seems an unnecessarily complex way to carry out a simple task that Outlook, or almost any email client, can do already.

As sheffters says, you can just rack up multiple email accounts in the same profile of Outlook. Each account can be set to have its own SMTP settings (under Tools, E-Mail Accounts, Next, Change, then the Outgoing Server box in the upper right).

If you really must keep them separated, then why not just use multiple Outlook profiles and have one email account for each?
To use multiple profiles, just go to your Control Panel, load up the Mail applet, and hit Show Profiles. Here you can add as many profiles as you like, then add accounts into them.
Don't forget to change the bottom radio button to 'Prompt For a Profile to be Used', or Outlook will always load its default as a preference when started.

ericstott
New user
New user
Posts: 4
Joined: 2010-01-14 09:30

Re: SMTP Relay

Post by ericstott » 2010-01-14 18:41

I keep the emails on the server (so I can also get the email on my phone), so if I have multiple profiles, every time I connect using a different profile, I download (again) all of the emails.

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

Re: SMTP Relay

Post by mattg » 2010-01-15 01:48

What you want can be achieved with scripts and routes, but seriously I don't see that there could possibly be that much benefit that would warrant the work required.

you could:-

a) set up hmailserver (not on your laptop, but on some stationary computer, preferably with a Static public IP address)
b) set up external account POP3 downloads for each of your aforementioned accounts
c) either just use a single SMTP server to route though, or become your own SMTP server (ie a 'real' mailserver)
d) connect via IMAP to your hmailserver from your laptop or your phone

Alternatively to c) use routes and scripts to determine your location on the laptop and set appropriate routes.


I reckon it would be much easier to (on your laptop) use Thunderbird with offline files for each of the accounts that you have and connect to each via IMAP, and do something similar on your phone.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply