通过SMTP服务发送电子邮件而不是作为外部发件人的问题 [英] problem in sending email via SMTP service not as external senders

查看:962
本文介绍了通过SMTP服务发送电子邮件而不是作为外部发件人的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在向我的办公室分布式组之一发送电子邮件时遇到问题.问题如下:

I have a problem in sending email to one of my office distributed group. The issue is as below:

远程服务器返回'550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup;需要认证; 传递限制检查失败,因为发件人不是 发送到该网上论坛时已通过身份验证"

Remote Server returned '550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication required; Delivery restriction check failed because the sender was not authenticated when sending to this group'

通过阅读此博客(

By reading this blog (Link) and a few other posts, I understand in order to solve my problem, I need to run below command in Active Directory Server (ADS).

Set-DistributionGroup <group_name> -RequireSenderAuthenticationEnabled $false

这意味着问题是通讯组是使用默认设置创建的,这意味着它不接收来自 外部发件人 的电子邮件.

which means, the problem is that the distribution group was created with default settings which means it doesn't receive email from external senders.

我的问题是:

1-外部交易者不接受上述句子中的 外部发件人" 是什么意思?

1- What does it mean "External Sender" that exchange does not accept my email in the above sentence?

2-如果我不想运行上述命令,那么我的应用程序不是外部发件人,怎么能假装呢? (请注意,当我使用Outlook时,我可以将电子邮件发送到该DL电子邮件,并且发送成功,但是无法从我的应用程序中获取.请给我建议.

2- if I do not want to run above command, how my application can pretend as it is not an external sender? (please take note that when I used outlook I could send email to that DL email and it was successful but from my application I couldn't. please advice me.

我的代码在下面,供您参考.

my code is in below for your reference.

using (var client = new SmtpClient("14.19.21.23"))
            {
                try
                {
                    MailMessage newMail = new MailMessage();
                    newMail.From = new MailAddress("abc@company.com", "abc@company.com");

                    newMail.To.Add(new MailAddress("DL-team@company.com", "DL-Team"));

                    newMail.Subject = "subject";
                    newMail.Body = "Mail body";
                    newMail.SubjectEncoding = Encoding.UTF8;

                    newMail.IsBodyHtml = true;
                    client.UseDefaultCredentials = false;    // true is working
                    client.Credentials = new System.Net.NetworkCredential("username", "password", "companydomain");
                    client.DeliveryMethod = SmtpDeliveryMethod.Network;

                    client.Send(newMail);
                }
                catch (Exception ex)
                {
                    throw new Exception("Sending mail failed due to :" + ex.Message, ex);
                }
            }

我观察到SMTP客户端未使用我的证书!我的意思是,即使我使用了错误的密码也没有问题!任何的想法? 根据我的研究,SMTP正在使用最简单的方式发送邮件,因此它可能会使用我的PC详细信息.你可以分享你的想法吗?我们公司支持以下协议[NTLM,GSSAPI]:

I observer that SMTP client is not using my credential! what I mean is that even if I use the wrong password there is no issue! any idea? Based on my research SMTP is using the easiest way to send mail, therefore it might use my PC details. can you share your idea? our company support below protocol[NTLM, GSSAPI]:

telnet 14.19.21.23 25
220 *****************************
EHLO www.Company.com
250-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA
250-SIZE 37748736
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-XXXXXXXB
250-XXXXXXXXXXXXXC
250-AUTH NTLM
250-XXXXXXXXXXXXXXXXXD
250-8BITMIME
250-BINARYMIME
250-XXXXXXXE
250 XXXXF

推荐答案

问题归因于管理投放设置.

The problem was due to manage delivery setting.

您应将您的分布式电子邮件"分发列表的传递管理选项从仅组织内部的发件人"更改为组织内部和外部的发件人".

You should change the delivery management option for "your distributed email" distributed list from "only senders inside my organization" to "Senders inside and outside of my organization."

您也可以使用以下Shell脚本来完成此操作.

you can do it with below shell script also.

Set-DistributionGroup <your distribute email> -RequireSenderAuthenticationEnabled $false

这篇关于通过SMTP服务发送电子邮件而不是作为外部发件人的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆