Deleting SMTP Servers from Mail.app in Mac OS X? 69
jesse12345 asks: "Here's probably an easy one for you Unix masters. I travel a fair amount and use Mail in OS X. I'm always using lots of outgoing mail servers. What I can't figure out is how to delete outdated ones. There seems to be no GUI for this within the Mail.app. Is there some way to do this in UNIX?"
Easy to do in Panther (Score:5, Informative)
Re:Easy to do in Panther (Score:2, Informative)
Software updates are tied to OS updates as far as the free digital lifestyle iApps are concerned.
As long as security updates are available to all OS's I don't think thats a problem.
Re:Easy to do in Panther (Score:1)
Not true. Just a few weeks ago there was a standalone iCal update released.
Re:Easy to do in Panther (Score:5, Informative)
Manage SMTP Servers.scpt
(*
Manage SMTP Servers
Copyright (C) 2002 Apple Computer, Inc.
You may incorporate this Apple sample code into your program(s) without
restriction. This Apple sample code has been provided "AS IS" and the
responsibility for its operation is yours. You are not permitted to
redistribute this Apple sample code as "Apple sample code" after having
made changes. If you're going to redistribute the code, we require
that you make it clear that the code was descended from Apple sample
code, but that you've made changes.
*)
(*
This script goes through each smtp server, checks to see whether they are
being used by an account, then presents a list of 'orphaned' smtp servers,
which you can choose to delete if you wish.
*)
tell application "Mail" to set everySMTPServer to every smtp server
set nameOfEverySMTPServer to {}
repeat with eachSMTPServer in everySMTPServer
if (my isThisSMTPServerBeingUsed(eachSMTPServer)) then
-- Don't add to the list of smtp servers to potentially delete
-- if the server is actively being used by an account
else
set nameOfEverySMTPServer to nameOfEverySMTPServer & name of eachSMTPServer
end if
end repeat
if ((count of nameOfEverySMTPServer) is equal to 0) then
display dialog "All the SMTP servers you have defined are being used by active accounts."
else
set theServersToDelete to choose from list nameOfEverySMTPServer with prompt "Choose one or more SMTP servers to delete. None of these servers are currently being used by any of your email accounts." with multiple selections allowed
if theServersToDelete is not equal to false then
if ((count of theServersToDelete) is greater than 0) then
repeat with eachServer in theServersToDelete
repeat with eachSMTPServer in everySMTPServer
try
if (name of eachSMTPServer is equal to eachServer as string) then
tell application "Mail" to delete eachSMTPServer
end if
end try
end repeat
end repeat
display dialog "The selected servers have been deleted!"
end if
end if
end if
on isThisSMTPServerBeingUsed(theServer)
-- Run through each account and see if any of them
-- are using the given SMTP server
set theResult to false
tell application "Mail"
set everyAccount to every account
repeat with eachAccount in everyAccount
set nameOfSMTPServer to name of smtp server of eachAccount
try
if (nameOfSMTPServer is equal to name of theServer) then
set theResult to true
end if
end try
end repeat
end tell
return theResult
end isThisSMTPServerBeingUsed
Not possible in Panther (Score:3, Informative)
The easiest way to remove servers is to edit the Mail preferences file. Open ~/Library/Preferences/com.apple.mail.plist (either in Property List Editor--if you have the developer tools installed--or any text editor) and find the entry "Delivery Accounts". Delete any you don't want.
Re:Easy to do in Panther (Score:2)
Re:Easy to do in Panther (Score:1)
There's an AppleScript for it (Score:5, Informative)
Seemed to work for me OK.
Re:There's an AppleScript for it (Score:3, Informative)
Re:There's an AppleScript for it (Score:1, Informative)
Howto: (Score:4, Informative)
Use Sendmail (Score:1, Offtopic)
Re:Use Sendmail (Score:1)
Re:Use Sendmail (Score:3, Informative)
Many ISP's (including Earthlink, which I use) block access to port 25 - meaning you can't send directly to a remote mail server. As a part of this, they tell you that all outbound mail must go through thair provided mail server.
This is an anti-spam procedure that works well. If all of their customers must send mail through a single server, that server can filter and block those customers that have abused their mail privileges. In other words, these blocks are (for the most
Re:Use Sendmail (Score:1)
I have Pacific Bell slash SBC as an ADSL provider.
postfix enabler is available at
http://www.roadstead.com/weblog/Tutorials/ima
Re:Use Sendmail (Score:4, Funny)
What an excellent way to lose friends.
Re:Use Sendmail (Score:1)
Re:Use Sendmail (Score:1, Insightful)
When you signed up with your ISP you signed a contract. This requirement was in the contract. If you didn't like it, you didn't have to sign it. Period.
You could have found some spammer-friendly ISP to use instead. Of course, a serious portion of the mail servers on the planet would refuse SMTP traffic from your system or your ISP's system, but hey, your freedom of speech (cough bullshit co
Re:Use Sendmail (Score:2)
In fact since we also have a monopoly in central Illinois we are generally the same people who build their networks including the
Re:Use Sendmail (Score:1)
Re:Use Sendmail (Score:2)
Re:Use Sendmail (Score:2)
Re:Use Sendmail (Score:2)
Re:Use Sendmail (Score:2)
You didn't even bother reading my post before writing this, did you?
I said nothing about censorship. I have yet to hear of a single case where an ISP blocked a customer's mail access because of the content of his private communications.
Thes blocks are put in place because of spammers. You know, the people who send out millions of solicitations for black-market Viagra. And before you claim that yo
Re:Use Sendmail (Score:2)
Unfortunately, AOL rejects mail from "private
Re:Use Sendmail (Score:4, Funny)
Also, include references to one of the following: WINE, FINK, and for extra points, Ogg.
Re:Use Sendmail (Score:1)
Re:Use Sendmail (Score:1)
(Actually, is it just me or do those seem to be waning?)
Re:Use Sendmail (Score:1)
Nah, they are just modded down so much, so quickly that we never get to see them. Thank God...
Re:Use Sendmail (Score:2)
Try the "Remove Server" button (Score:1, Informative)
yes (Score:3, Informative)
~/Library/Preferences/com.apple.mail.plist
In this file, there is a key labeled "DeliveryAccounts". This is where all your SMTP account information is kept. You should be able to edit/delete any account from there.
There is a means of doing this through AppleScript as well, but I don't remember how that works, so I'll have to leave that as an exercise for the reader.
Re:yes (Score:3, Informative)
Re:yes (Score:2)
I think the Property List Editor is part of the developer tools, and so isn't installed by default. But every distribution of OS X includes an installer for them, so this shouldn't be a big deal.
Yeah (Score:2, Informative)
Fortunately, Panther seems to have fixed this - in account prefs, the SMTP server dropdown has added a "Edit Servers" Option. If you're still in Jaguar, however, I believe you can kill servers by editing ~/Library/Preferences/com.apple.mail.plist. I managed this once in Jaguar, but I'm too lazy to try to figure out which entries to trash now. I'm pretty sure it's in there somewhere, though.
Re:Yeah (Score:1)
2. expand "root"
3. expand "DeliveryAccounts"
4. expand "0", "1", etc
5. find the account you want to delete
6. select the corresponding array number
7. press the delete button
8. save as com.apple.mail.plist
just did it on my machine (running Jaguar), works a charm.
Wow (Score:2, Flamebait)
Newsgroup post [google.com]
Re:Wow (Score:2, Informative)
http://email.about.com/cs/macosxmailtips/a/et0127
since when is slashdot "I'm too lazy to use GOOGLE" tech support. goddammit.
Re:Wow (Score:1)
Re:Wow (Score:2)
Re:Wow (Score:1)
Re:Wow (Score:1, Offtopic)
speaking of mail.app.... (Score:3, Interesting)
Thanks.....
Re:speaking of mail.app.... (Score:1)
I also found a tip somewhere that involved using certtool on the actual certificate (which is on my local machine anyway since it's for a locally-running imapd), but Mail.app just keeps asking for the certificate again even though it's in the keychain.
Re:speaking of mail.app.... (Score:2)
It's an option-drag, but odds are you'll just hang Mail.app if you try it.
Buggy.
The OpenSSL route seems to work.
Re:speaking of mail.app.... (Score:1)
Re:speaking of mail.app.... (Score:3, Informative)
Re:speaking of mail.app.... (Score:1)
actions! (Score:1)
The AppleScript is best, but in the shell: (Score:3, Informative)
~/Library/Preferences/com.apple.mail.plist
And take out the <dict> entries that matches the unused entries...
<PRE>
<key>DeliveryAccounts</key>
<array>
<dict>
<key>AccountType</key>
<string>SMTPAccount</string>
<key>Hostname</key>
<string>mail.tbs.co.za</string>
  ; <key>ShouldUseAuthentication</key>
  ; <string>NO</string>
</dict>
</array>
</PRE>
Dirty way to do it in Jaguar (Score:1)
Applescript: the GUI way!!! (Score:4, Informative)
There you'll find "Manage SMTP Servers.scpt".
Double-click it and you'll get a nice little window with all SMTP servers you don't use and a button to delete them.
Cheers,
Also on Subject of Mail.app, how do I hide folders (Score:1)
I use IMAP mail on my server with about 10 folders. These work OK, but I am also presented with a list of hidden system folders like
In thunderbird you can hide folders that start with a '.', or match public_html.
How do you do this in Mail.app ?
Will
Re:Also on Subject of Mail.app, how do I hide fold (Score:1)
who was asleep when this got posted? (Score:1)
In Panther and before, use Apple's Apple Script (Score:1)
In /Library/Scripts/ Apple has a folder full of Mail AppleScripts, one of which allows you to manage SMTP servers, "Manage SMTP Servers.scpt". It basically allows you to delete any SMTP server from the list that is not currently connected to a Mail Account.
You can easily add them to the Menu Bar by going to the /Applications/AppleScript/ folder and draging the AppleScript menu onto the menu bar. This will give you a menu with all the folders in /Library/Scripts/ and ~/Library/Scripts/ in it, allowing