diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-03-04 23:11:13 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-03-04 23:11:13 +0000 |
commit | 9b5547ffab5538f739aae762aa2dcc1fa6b4e858 (patch) | |
tree | d08f144380d416bb04f94c0eb470c41898587cb4 | |
parent | 2d105a04c4746c3e07d16acddf451da7c82ebfca (diff) | |
download | fetchmail-9b5547ffab5538f739aae762aa2dcc1fa6b4e858.tar.gz fetchmail-9b5547ffab5538f739aae762aa2dcc1fa6b4e858.tar.bz2 fetchmail-9b5547ffab5538f739aae762aa2dcc1fa6b4e858.zip |
fetchmailconf warning code from hmh.
svn path=/trunk/; revision=3196
-rwxr-xr-x | fetchmailconf | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/fetchmailconf b/fetchmailconf index af436531..4d7da434 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -4,7 +4,7 @@ # by Eric S. Raymond, <esr@snark.thyrsus.com>. # Requires Python with Tkinter, and the following OS-dependent services: # posix, posixpath, socket -version = "1.38" +version = "1.39" from Tkinter import * from Dialog import * @@ -1448,6 +1448,11 @@ local name, messages will be retrieved in multidrop mode. This complicates the configuration issues; see the manual page section on multidrop mode. + +Warning: Be careful with local names +such as foo@bar.com, as that can cause +the mail to be sent to foo@bar.com instead +of sending it to your local system. """} class UserEdit(Frame, MyWidget): @@ -1489,8 +1494,19 @@ class UserEdit(Frame, MyWidget): self.destruct() def save(self): - self.fetch(User, 'user') - self.destruct() + ok = 0 + for x in self.user.localnames: ok = ok + (string.find(x, '@') != -1) + if ok == 0 or Dialog(self, + title = "Really accept an embedded '@' ?", + text = "Local names with an embedded '@', such as in foo@bar " + "might result in your mail being sent to foo@bar.com " + "instead of your local system.\n Are you sure you want " + "a local user name with an '@' in it?", + bitmap = 'question', + strings = ('Yes', 'No'), + default = 1).num == 0: + self.fetch(User, 'user') + self.destruct() def makeWidgets(self, mode, servername): dispose_window(self, |