I have a problem getting SMTP to work with an ASP.NET app I have (the error I get is "Cannot get IIS pickup directory"). The app delivers the mail to SMTP using the pickup directory.
I already know what causes the error, it's a permissions problem accessing the SMTP settings (see this link http://www.laptev.com/?p=3). I use a custom windows user for that app which seemingly doesn't have the permissions to access the SMTP settings, when I use the NetworkService account, everything works fine but when I use my custom user, I get the error. Now I'm trying to figure out where the SMTP settings are saved in Windows2008/IIS7 to give the needed permissions to my custom user.
There are a couple solutions. If you explicitly set the pickup folder in code then it doesn't need to be gotten from the metabase and you don't need to worry about the permissions. If you control the code, that's the easiest solution.
However, if you have a lot of users that may want to get the pickup folder automatically, then you'll need to grant the extra permission.
Since it's safe to expose read-only access to the pickup folder path property, the easy solution is to grant the IIS_WPG group access. cscript Metaacl.vbs “IIS://localhost/SMTPsvc” IIS_WPG RE
To answer your question on where it is, SMTP wasn't ported to the new system in IIS7. It still uses the old metabase settings in c:\windows\system32\inetsrv\metabase.xml. You manage it with IIS 6 manager.
Finally, after spending many hours searching for a solution, I came across this forum thread: http://forums.iis.net/t/1032876.aspx?PageIndex=1
I downloaded and installed the metabase explorer tool (you have to download IIS6 resource kit to get it) then gave read permissions to my custom user (as indicated in one of the posts) on the LS, SMTPSvc and SMTPSvc/1 keys and it worked! For some unknown reason if you only give permissions to the smptSvc key it doesn't work.