On Sun, 21 Mar 2004, Ron Artstein wrote:

> Hi everyone,
>
> I'm looking for a mail client that chooses the (outgoing) SMTP
> server based on my current IP address. Does such an animal exist?
>
> The need arises because I want to use the same computer (a laptop)
> from both work and home, and I'm not allowed to use my work SMTP
> server when connecting from home through an ISP. Mozilla mail
> allows multiple SMTP servers, but it associates only one such
> server with each mail (POP or IMAP) account. The only way I can
> think of to address my needs through Mozilla is to have two Mozilla
> "accounts" for each real mail account, one associated with the
> from-work SMTP server and one with the from-home server. Pretty
> awful, right?
>
> So is there a client that can associate SMTP servers with IP
> addresses? Perhaps even choose the correct server automatically?

  I solved this problem by changing the connection scripts for the various
providers to add a DNAT rule to the iptables firewall to redirect all
connections to a fake IP (such as 192.168.254.1) to the appropriate
mailserver. Then, I set up DNS (this is optional) to resolve mail.mydomain
to 192.168.254.1. Now, all you have to do is to setup your mail client to
use 192.168.254.1 (or simply "mail") for outgoing mail and presto!

  Alon

-- 
This message was sent by Alon Altman ([EMAIL PROTECTED]) ICQ:1366540
GPG public key at http://alon.wox.org/pubkey.txt
Key fingerprint = A670 6C81 19D3 3773 3627  DE14 B44A 50A3 FE06 7F24
--------------------------------------------------------------------------
 -=[ Random Fortune ]=-
Artistic ventures highlighted.  Rob a museum.

--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]


Reply via email to