IIS SMTP server message id domain - iis

I have an issue with IIS SMTP Server.
When I send a message the message ID is
XXXXXXXXXXXXXXXXXXXXXXXXX#localhost.localdomain
I don't find where change localhost.localdomain to the correct domain name.
Thanks for your help

I found the message id domain is written during email generation and has nothing to deal with IIS.
The message ID domain must be set in the email creation method.

There are actually two ways that the message ID can be set when using the SMTP server that's part of IIS. If the SMTP server receives a message that already includes a message ID, it leaves it alone. On the other hand, if the message does not include a message ID, the SMTP server will add it and use the "Local (Default)" domain name for the domain portion of the message ID. The "Local (Default)" domain name is set when you first create the SMTP virtual server. It appears at the top of the "Domains" list under the SMTP virtual server in "Internet Information Services (IIS) 6.0 Manager" and can be changed by renaming it.

Related

SMTP seems to have duplicate security settings?

I'm new to setting up smtp, and I'm trying to figure out how to secure my server, but I'm getting a little turned around with all the security options - hopefully someone can help me clear this up. I'm using Windows 2008 R2 sp1 with IIS 7.5 if that makes any difference.
So what I'm seeing is, in the properties of the smtp virtual server I have an Access tab with an Authentication button. Seems to make sense, I pick Integrated Windows User, but then on the Delivery tab, I see an Outbound Security button which presents the same set of options again. I select Integrated Windows User.
Then, following the instructions I found online to setup smtp, I created a new domain under the smtp virtual server which then gave me ANOTHER Outbound Security tab with the same set of options. What are all these settings for? I've scoured google and couldn't find anything differentiating the 3 (maybe more?). I've found various sites that will tell me what one does or another, but they all seem to be doing the same thing and no site addresses that. Does one override another? Like a default for the server, but then specific ones for the domains or something like that? What's the difference between the Authentication and Outbound Security? What's the difference between the Outbound Security for the domain and for the main smtp server?
Oh, and one more question while we're semi on the topic - is the setup for domains mainly used for remote access? Like, it would be unnecessary for localhost use?
You have two sets of authentications: inbound and outbound.
The Access tab lets you limit who and from where are allowed to access your SMTP server (i.e inbound), while the Outbound Security in turn lets you provide credentials that the SMTP service will use when delivering mails to another SMTP server (e.g. if relaying all outgoing emails to a smarthost that requires authentication).
You can furthermore set up remote domains, i.e. have emails for a specific domain be delivered to a specific server using specific credentials.
It is highly recommended to have all your outgoing emails forwarded to a smarthost that acts as an official email server for your sending domain, otherwise you risk your emails being classified as spam because they are sent from an unknown server.

Email Messaging module is not working on azure

I have deployed Orchard on azure and enable Email Messaging module. Enabling says it enables successfully and asks for email settings. I provided it the mail server setting. Strange thing is, User setting does not show me the settings which are dependent on email messaging module (Contact us email address and public site name) and does not show me ("Lost your password") link . Also I have built a module which sends email. This module is not sending email.
Same orchard package works fine and also email on my dev server with same mail server settngs(gmail smtp settings.) But email is not working on azure.
What am i Missing ?
thanx
Just FYI for anyone else who visits this Question, I just got this working from Azure using the gmail SMTP server without any third party add-ons. I simply added the following SMTP details:
Then used the contact form to send an email to myself. The first email gives me an alert to my gmail account:
Hi Simon,
Someone recently tried to use an application to sign in to your Google Account - XXX#gmail.com.
We prevented the sign-in attempt in case this was a hijacker trying to access your account. Please review the details of the sign-in attempt:
Monday, April 8, 2013 9:33:46 PM UTC
IP Address: 65.52.168.70
Location: United States
...blah blah blah
If this was you, and you are having trouble accessing your account, complete the troubleshooting steps listed at http://support.google.com/mail?p=client_login
Following the link give you the option to allow an application to login with your credentials. Just follow the link in step 3 and then you have 10 minutes to send another email from your orchard site. The next test message I received without issue.
Got it. Windows Azure itself does not allow sending email neither it allows to use SMTP. WE have to use third party email service like PostMark,SendGrid etc
http://blogs.msdn.com/b/publicsector/archive/2011/10/14/sending-and-receiving-email-in-windows-azure.aspx
So, I'm just curious how does WordPress, installed on Windows Azure (gallery), able to send emails?
http://coffee2code.com/wp-plugins/configure-smtp/
There are still too many different suggestions on the subject so i thought i should write what I've found useful. Here's what i did to get it to work:
My SMTP settings:
Sender address: myname#gmail.com
Hostname: smtp#gmail.com
Port: 587 (25 will also do)
SSL Communications: Checked
Credentials: My Gmail address and my password
These settings should work on your local environment just fine. But on the cloud you may need to do the following:
As your Azure VM may be at some arbitrary location, Gmail marks the login attempts as suspicious and blocks them. If this is the case, you should see a mail informing you about this suspicious activity in your inbox. Just follow the instructions there and mark the login as trusted. It will remain that way until somehow your IP on the cloud changes (e.g. deleting your deployment slot). VM relocation shouldn't be an issue since the IP still remains the same. You may have to do this separately for your staging and production slots.
Lastly, I enabled full trust for my web role as shown here:
http://blogs.msdn.com/b/windowsazure/archive/2009/03/18/hosting-roles-under-net-full-trust.aspx
I hope this helps others having this problem.
Cheers
No more third-party with GitLab 15.5 (October 2022):
Deliver emails using Microsoft Graph API with client credentials flow
If you’ve enabled security defaults in Azure AD,
legacy authentication protocols for SMTP are blocked.
You can now configure your GitLab instance to deliver emails using
Microsoft Graph API
with OAuth 2.0 client credentials flow.
See Epic, Documentation and Merge Request.
The gitlab.rb would include:
gitlab_rails['microsoft_graph_mailer_enabled'] = true
# The unique identifier for the user. To use Microsoft Graph on behalf of the user.
gitlab_rails['microsoft_graph_mailer_user_id'] = "YOUR_USER_ID"
# The directory tenant the application plans to operate against, in GUID or domain-name format.
gitlab_rails['microsoft_graph_mailer_tenant'] = "YOUR_TENANT_ID"
# The application ID that's assigned to your app. You can find this information in the portal where you registered your app.
gitlab_rails['microsoft_graph_mailer_client_id'] = "YOUR_CLIENT_ID"
# The client secret that you generated for your app in the app registration portal.
gitlab_rails['microsoft_graph_mailer_client_secret'] = "YOUR_CLIENT_SECRET_ID"
gitlab_rails['microsoft_graph_mailer_azure_ad_endpoint'] = "https://login.microsoftonline.com"
gitlab_rails['microsoft_graph_mailer_graph_endpoint'] = "https://graph.microsoft.com"

EWS: impersonating users from different servers in one domain

I have two servers:
S1 is Exchange2010
S2 is Exchange 2007
Both servers are in the same domain in ActiveDirectory.
Idea is to have "service account" on S1 with enabled impersonation of users from both servers. My app is using credentials of "service account" and then starts to iterate through a list of smtp addresses. It impersonates each smtp address and does some processing on content of mailbox of that account.
That is a theory, now time for problems.
I can connect as a service account and can access its mailbox but when I try to access mailbox of impersonated user I get exception saying that "SMTP address has no mailbox associated with it". And exception happens for both servers.
I started to debug and google about possible reasons and out of nothing I changed this:
svc.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, smtpAddress);
into this:
svc.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.PrincipalName, smtpAddress);
and it worked which is very strange because month ago I had different setup only with one server and using SmtpAddress enum worked and my admin swears that config of impersonation is exactly the same.
Now, if anyone could provide me with some hints on why I cannot use ConnectingIdType.SmtpAddress and what I should do to make it possible to work?
Of course it turned out that admin did something different way for my current configuration. New environment has a policy that account name is different than smtp address for an account and smtp has a dot between name and surname of a user. So, for example on old config I could impersonate User100#example.com no matter what ConnectingIdType I chose but on new environment I have to set proper id type depending if I'm using smtp or account name as impersonated id.
Hope it will help in case somebody else's admin "didn't changed anything" too :)

Setting up Alerts in SharePoint

I am running MOSS 2007 on a Windows 2003 box. I need to know what configuration must be done to get Alerts to work. SMTP settings, etc.... When I create my alert, it is created but it does not send the email to show me that something changed in my document library or on any particular document. What am I missing?
I did install the Email Services under Windows Components and the SMTP under IIS.
In my SharePoint Central Admin, I did change my settings for outgoing and incoming email (Under the Topology and Services section).
What else am I missing?
Did you setup the Web Application Outgoing E-mail Settings in your Central Administration? Y
Has the SMTP server been configured to allow the MOSS server to relay mail to it?
Ensure that you have configured the SMTP server properly by configuring an account and associating to a mail client Outlook. Check the Servers outgoing and incoming capabilites from the mail client first.
Ensure that you have subscribed to the alerts properly in a list
I don't think this question is really appropriate for StackOverflow - its not a programming question, see the FAQ.
But anyway - could be anti-virus or smtp relay rules stopping sharepoint sending smtp to your mail server. Try this tool to diagnose.
http://www.simplecomtools.com/smtptesttool.html
If that doesn't work then its MS support - the newsgroups are littered with the carcasses of people trying to resolve alert email problems!

Can I configure SMTP in IIS, so it relays to a remote SMTP server?

I want to configure SMTP on my web server, so that any email sent through the SMTP server is relayed to a remote SMTP Server. The IIS SMTP server would have to use SMTP authentication, and use the host name, username and password (as if configuring a normal email client).
Does anybody know if this is possible?
Yes, it' completely possible, and relatively easy to configure.
I've got a couple of articles about SmartHosting on my web site that will probably help:
http://www.christopherlewis.com/SmartHosting/SMTPSmartHosting.htm
and
http://www.christopherlewis.com/SmartHosting/SMTPSmartHostingPt2.htm
They're written towards Exchange 2003, but Exchange 2003 used IIS's SMTP engine, so the settings are the same.
Bascially, you right click the SMTP site, select properties, Delivery tab, Outbound security, and enter your credientials in the Basic Authentication fields. Back on the Delivery tab, you then click Advanced and enter the remote SMTP server name in the SmartHost field.
Editing
The links above are no longer available.
Try http://intellitect.com/configuring-windows-smtp-server-on-windows-2008-for-relay/.
HTH and answers your needs
http://www.cmsconnect.com/praetor/webhelpg2/Chapter_2_-_Pre-installation_considerations/Configuring_the_SMTP_Server.htm
I think you can only set outbound relays for specific domains, not blanket coverage.
http://www.isaserver.org/articles/smtprelayinboundoutbound.html
EDIT:
I've not done this before, buy maybe worth a try:
From the Server properties, you could try selelcting the 'Delivery' Tab, then advanced. In the Smart Host, type the outgoing SMTP relay IP / domain. Select OK, and then select 'Outboud Security' and enter your username / password in the basic authentication box.

Resources