SMTP Control

Version 0.3.1

[Introduction] [Use Cases] [User Guide] [Release Notes] [Downloads]


***** Please Notice that User Guide is based on version 0.1.0. Hopefully the documentation will be updated shortly *****

SMTP Control is a Thunderbird Add-ons offering dynamic selection of outbond SMTP server while sending a message.

By default thunderbird offer the ability to define a list of SMTP servers. With one global default server for all email accounts or one static SMTP server per email account. There is no way to dynamically select SMTP server based on rules or user choice.

Supported dynamic features are :

  • SMTP Control Swap : Dynamic SMTP server selection while sending an email message.
  • SMTP Control Filtering : Filter allowed SMTP servers per mail account
  • SMTP Control per Location : Dynamic SMTP server selection based on detected location

Use Case Samples

When using Thunderbird on a mobile device (laptop PC), at home or at the office, not all the SMTP Servers are available. Some enterprises filter SMTP services to limit SPAM going outside, and the user must use the enterprise SMTP server to send the mail outside. While at home the user will have to use the service provider SMTP server.

SMTP Control Swap feature will give the ability to select the right SMTP server to send a mail depending on the situation, without changing the legacy default SMTP or user specific SMTP configuration.

SMTP Control Filtering feature will give the ability to configure, per mail account, which SMTP server might be used or not. For example you may not want to use, even by error, the enterprise SMTP gateway while sending a personal message on a mailing list about your favorite geek subject.

SMTP Control per Location feature will detect the current location (Home, Office, ...) based on user defined rules and current network settings. SMTP Control will then propose an outgoing SMTP server based on location.

User Guide

By default, when SMTP Control is installed for the first time, the SMTP Control Swap feature is enabled. The SMTP Control Filtering feature is disabled for all the mail accounts. Which mean that each mail account has access to all the defined SMTP servers.

To use dynamic SMTP server to send a mail message, you just have to select the requested SMTP server from the drop-down menu that was added right to the "Send" button by SMTP Control.

In the picture above, you can see that :

  • the default SMTP server for the current location is "SMTP OVH SSL"
  • the default SMTP server for the "From:" email account is "SMTP OVH"
  • the user decide to use the "" SMTP server for sending this email.

The listed SMTP servers are the available servers for the sending mail account ("From:" in the compose window). If you have configured SMTP filtering for the mail account only allowed SMTP servers for thise mail account are proposed. If you change the sending account ("From:"), other SMTP servers might be proposed.
Following the SMTP Server name you can see in brackets :

  • (account default) : Indicates the SMTP server statically defined for this email account,
  • (default for this location) : Indicates the SMTP server defined for this location,
  • (global default) : Indicates the SMTP server defined as default in thunderbird when no static configuration is made for the email account

In any case, when sending a mail message by the legacy "Send" button, or through the dynamic SMTP feature, SMTP Control will check if the SMTP server is in the allowed list for this email account. If not, an alert popup will warn you, and the email will not be send.

You can also, optionaly, asked for a confirmation, each time you select a dynamic SMTP server. This allow you to double-check your choice and decide if you want to really use a specific server or not.

SMTP Control Settings


SMTP Control settings can be accessed by the option button in the Add-ons manager, or by selection "SMTP Control Settings ..." in the "Tools -> SMTP Control" popupmenu from the main thunderbird window, or from the compose message window.

SMTP Filtering

With SMTP Filtering you can select which SMTP server can be used per email account defined in thunderbird. Because SMTP servers are defined globally, enabling SMTP Swap will enable all SMTP servers for all accounts by default. SMTP Filtering allows for customization of supported SMTP servers.

SMTP Location

SMTP Location allows you to define different locations (Home, Office, Customer-office, ...) by network rules (IP addresses and network masks), and associate a default SMTP server per location.

SMTP Control will calculate location based on user rules and propose the default server in the swap list.

The above picture shows The discovered IP addresses of the system and the calculated location. If you have just change some of the location parameters (see other tabs) you can trigger a relocation to check the modifications. When Applying and Closing the option window, SMTP Control will automatically trigger a relocation calculation.

New Locations can be added with the tab "Locations Definition".

To add a new location, click on "Add Location" button. A default name for the location is proposed, you should change it to something easy to understand for you.
To define the location you have to add at least one IP rule. Click on "Add" near the "IP rules" selection list and give one, two or three IP addresses with their network mask to define this location. Most of the location would have only one IP address. Current version only support masks with values 8,16,24,32. If you don't know which mask to choose, prefer 24 value. Network mask aspect will be more detailled in a futur documentation.
You can also use 2 or 3 addresses in situation where your system has for exemple an IP address for the local network (my home network) and an IP address for a VPN connection to the enterprise. Have 2 IP addresse will give you the ability to define a location like "Office connection from Home".

If your location can have different network properties, then you can define several separate IP rules. For exemple "Office" can be for you the "Office building in Paris" using IP or the "Office building in New-York" using IP When SMTP Control detect any one of these IP it will know that the location is "Office". Without the need for 2 locations.

To finish the location definition you have to select which SMTP server will be the location default in the drop down menu.

To remove a location, select the location in the dop down menu and click "Remove Location".

A new Location can also be created directly from the tool menu :

By doing that SMTP Control will automatically use the current IP address as rule for defining the new location.

By the menu you can also correct a location discovery. By doing that the IP addresses will be added in a new rule for the selected location.

Locate the default SMTP server based on location need to be configured per email account. To enable this feature you need to select which email account allow this feature by using the "Location per Account" tab :

Note : By default no email account has this feature enabled. Which is not a good default behavior ... (realize this while writing the doc). Expect a different default behavior in next realize ...

"Ignored IP Addresses" tab is an advanced configuration. For those who are using tools like VmWare workstation or server, you will have static IP addresses all the time configured on your system for virtual networking. You will need to ignore these IP addresses to have better accuracy in the location detection. You can define the IP addresses or network that SMTP Control has to ignore while doing the location calculation.


In the "Advanced" tab you will find the URL to access and other informations.


Release Notes :

Version 0.3.1 :

  • Bugs Correction :
  • SMTP Swaping was not working in TB 3.0 due to different overriding behaviour in TB 3.0

Version 0.3.0 :

  • New Features :
  • Adding support for Thunderbird 3.0
  • Bugs Correction :
  • Error while reading list of SMTP servers with TB 3.0
  • When adding a new location with the wizard, local ip rule is not added correctly in the location definition.
  • Default SMTP server for location was not loaded correctly from preferences.
  • Error in rule settings window. When creating a rule, an error prevent displaying the rule properties and creating more rules.

Version 0.2.2 :

  • Bugs Correction :
  • Default SMTP server for location was not loaded correctly from preferences.

Version 0.2.1 :

  • Bugs Correction :
  • Error in rule settings window. When creating a rule, an error prevent displaying the rule properties and creating more rules.

Version 0.2.0 :

  • New Features :
  • Define new location rule : remote network information.
    SMTP Control is now able to check the real public IP internet address and other remote informations (hostname, proxy, ...) by doing an http request to a configurable external web service
  • Add background scheduling of network information refresh and relocation if needed.
  • Improve location accuracy by introducing best match algo and last used location for tie-break.
  • Add rule type information in preferences.
  • Location can be defined by hostname (with optional wildcard)
  • Add support of transparent proxy remote info request.
  • Use error console as trace output.
  • Move "excluded IP" and "Location by account" in advanced location tab config.
  • Change tabs order in location tabpanel.
  • Introduce webservices to read remote network information.
  • Add dialogBox to add/remove/edit webservices.
  • Code improvment : organize code arround objects.
  • Bugs Correction :
  • Duplicate rules are added to the same location
  • Several other bugs

Version 0.1.0 :

  • New Features :
  • Code cleaning for preparing public nomination.
  • Add support for French locale.
  • Bugs Correction :
  • ReLocate button was not working in option dialog. Corrected.
  • Several other minor bugs.

Version 0.0.5 :

  • New Features :
  • Add the ability to add a current IP address as an excluded one with a single click
  • Add support for network masks from 1 to 32 bits
  • Change the default behavior of the location per account. Starting with 0.0.5 email account will enable per location default SMTP. User will have to disable location if needed for an email account. - Add a wizard to easily create new location
  • Move "Current Location" tab after "Per account location" tab
  • Improved use of Locale variable for text,label, buttons - When uninstalling SMTP Control add-on all the preferences in the user preferences file are removed.
  • Location search algorythm improvment. Include a probability factor to differentiate between similar ip lists. For example when there is only one current IP, single IP rule must have more priority than multiple rules. Or when several current ip, rules with same number of ips must have better chance.
  • Add support for /0 mask in rules. When using a /0 mask, the rule will match any ip address, which mean any location. When used with a multiple ip rule, this gives the ability to declare a VPN location which can be a situation where the VPN IP subnet is well-known, on top of any IP address.
  • Add creation date properties for a location. - Add post install scripts and store version and install date.
  • Bugs Correction :
  • Bug correction : When removing/editing/adding an excluded ip, update the current ip tab dynamically.
  • Bug correction : When adding an excluded IP network, mask set to 0 is not anymore supported because this will match all IP addresses and then disable location search.
  • Bug correction : When removing a location, and just after creating a new one (without closing the option window) SMTP Control fail to create any new location (manual clean needed in prefs). Corrected.

Version 0.0.4 :

  • Add support for IMAP mail accounts
  • Add location support. Several location can now be defined and depending on detected location (home, office, ...) the default SMTP is automatically changed. Per Location Default SMTP can be enabled per mail account.
  • Location definition and detection is based on station IP address. Some well-known IP addresses can be ignored.
  • Add ability to create a new location from current IP addresses when location is unknown.
  • Replace "onunload" and "onunload" overrides by event listener in message compose window. This is less intrusive for compatibility with other add-ons.
  • Remane smtp_control_compose.js to sc_compose_overlay.js

Version 0.0.3 :

  • Code improvment : Move filtering actions just before the send command.
  • Add filtering of the default SMTP server or static user SMTP server when using the global send button rather than the send popup menu.
  • Bug correction : When the user activate SMTP filtering, but select no SMTP server, SMTP Control automatically disable SMTP filtering for the
    mail account, allowing all SMTP server. Corrected. Bug correction : When changing the SMTP Control settings while the
    compose window is already opened, the SMTP popup menu is not correctly updated. Corrected.
  • Bug correction : When the send action fail and the user tries to use a second dynamic SMTP the swap back to default configuration fail and stay on the first dynamic selected SMTP. Corrected.
  • Bug correction : SMTP filtering was all the time enabled by default and filter all the servers. Corrected.

Version 0.0.2 :

  • Add SMTP filtering feature. SMTP Control allow to filter the use of SMTP Servers per mail account. This feature is enabled per mail account.
  • SMTP swap is now supported for mail account with static SMTP configuration. Previous version was only able to swap SMTP server for mail account that are using global default SMTP configuration.
  • Use stringbundle to localize alert message and strings in javascript.

Links :

Downloads :


Member login - Stats
Copyright 2003 - PhpConcept

Powered by PcWeb