Page 1 of 1

SMTP Relay

Posted: 2010-01-14 09:42
by ericstott
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

Re: SMTP Relay

Posted: 2010-01-14 15:28
by mattg
Why do you want to use a mailserver?
What advantage do you see in having a mailserver over a mail client, like say Outlook?

Re: SMTP Relay

Posted: 2010-01-14 16:27
by ericstott
Because every time I change locations with my laptop, I need to go into Outlook and change the smtp properties.

Re: SMTP Relay

Posted: 2010-01-14 16:33
by sheffters
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.

Re: SMTP Relay

Posted: 2010-01-14 16:38
by mattg
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...

Re: SMTP Relay

Posted: 2010-01-14 17:23
by ericstott
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.

Re: SMTP Relay

Posted: 2010-01-14 18:01
by Tezcatlipoca
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.

Re: SMTP Relay

Posted: 2010-01-14 18:41
by ericstott
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.

Re: SMTP Relay

Posted: 2010-01-15 01:48
by mattg
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.