SMTP servers used for sending e-mails are often configured to accept request from the internal network only. It is due to various spammers not to flood the service. If you want to send e-mails from each network you are actually connected to (as me), you come very soon to a problem: you have to change your Evolution's SMTP server configuration always after switching the network.
This post presents a workaround: a script that does the setting change for you, automatically. Creating some button at your desktop that uses such script is then a matter of seconds. Here is the source code of
changeEvolutionSmtp:#!/bin/bash
SMTP=${1?'Specify the SMTP server name as the first parameter!'}
SETUP=`gconftool-2 --get /apps/evolution/mail/accounts | sed "s/\(smtp:\/\/\)[^;]*/\1${SMTP}\//g"`
gconftool-2 --unset /apps/evolution/mail/accounts
gconftool-2 --type=list --list-type=string --set /apps/evolution/mail/accounts "$SETUP" If you run that script with a parameter specifying the new SMTP server name, all your Evolution's e-mail accounts get changed SMTP server:
changeEvolutionSmtp smtp.myprovider.comEnjoy!
No comments:
Post a Comment