Hi toMeloos
I solved the problem in this way:
1. I configured all my mail agents to use "localhost" as SMTP server on my laptop.
2. I installed and configured postfix for trying a list of existing SMTP servers I have to introduce manually. Depending on where I connect my laptop, one of these SMTP servers is supposed to work, because the ISP normally allows the outgoing traffic on port 25 directed to their own SMTP relay.
This works fine. Before you start, collect the (fully qualified) list of hostnames of the SMTP servers you use for the several locations where you connect your laptop. In my case (Belgium), it is:
Code:
relay.chello.be, relay.dommel.be, relay.scarlet.be, relay.skynet.be
These are the detailed steps I have to perform:
install postfix:
Code:
sudo apt-get install postfix
If postfix is already installed, you can reconfigure it with the command:
Code:
sudo dpkg-reconfigure postfix
The configuration utility has a first screen that explains what's following. Go on.
At the second screen, select the option "Internet with smarthost" and go on.
At the next screen, leave the hostname of your host as is, except in the case you know better.
At the fourth screen, this is important, introduce the hostname of your first SMTP server. In my case For all the remaining screens, just accept the default settings.
When you leave the configuration utility, there is only one SMTP server working, the first of your list. To add other servers, just edit the configuration file of postfix, with any command. I use gvim:
Code:
sudo gvim /etc/postfix/main.cf
Retrieve the line starting with and add a line with a comma separated list of the remaining servers as follows:
Code:
smtp_fallback_relay = relay.skynet.be, relay.dommel.be, relay.scarlet.be
Save the file and reload the configuration by issuing the command:
Code:
/etc/init.d/postfix reload
Now postfix is finding by itself a working SMTP server out of the list you provided. The order in which it tries is obviously first the variable $relayhost and then the variable $smtp_fallback_relay in the order of the list.
Each time you discover a location with a new SMTP server, add it in the configuration file and reload postfix. One day, someone will write a little script with a dialog to do that.
Et voilà!
Bookmarks