YourSQLDba的翻译(九)

浏览: 2156

维护过程有一个阀值,如果他不能让一些数据库负责人知道数据库有问题。YourSQLDba自然也包括这方面

YourSQLDba依赖新的SQL2005SMTP数据库邮件。这是新的邮件模块能够让邮件发送更容易。
以前的数据库邮件需要在SQLSERVER机器上安装outlook软件

YourSQLDba负责以下几步的邮件发送,他创建下面的步骤

一个EMAIL profile,profile名字叫"YourSQLDba_EmailProfile"
数据库邮件 EMAIL ACCOUNT会被创建根据下面的规则
帐户使用匿名验证模式,不过其他的验证模式可以在安装完毕之后手动设置
默认的验证是:<machinename>.<instancename>@YourSQLDba
有必要更改邮件服务器的域名令邮件服务器能收到邮件,避免消息被反病毒软件拦截

Email server的设置已经在安装脚本的时候设定好InitialSetupOfYourSQLDba,默认端口是25
这是正常的SMTP端口号
请记得关闭防火墙或者杀毒软件,开放25端口,设置一下白名单。

Email server 管理员有不同的策略来拦截垃圾邮件

Email server 管理员有不同的策略来拦截垃圾邮件
邮件服务器只接受合法存在的地址的邮件
拒绝系统匿名SMTP,除了机器列出来的。通常你需要更新加上你的SQLSERVER机器进去ip地址列表
让SQLSERVER的邮件发送通过
允许你组织的域名通过。

YourSQLDba提供一个存储过程去诊断邮件问题。叫“DiagDbMail”这个存储过程不需要参数
他只显示三个结果
1、列出邮件错误日志
2、列出被反垃圾程序阻挡的邮件
3、列出数据库邮件引擎开启和停止的时间
一些问题例如邮件服务器的访问性或者邮件服务器的可连接会被在第一个结果的描述列里列出,并且会列出发生的时间

Messaging
  

Updated : 2009-02-25

Maintenance procedure have a low value if it can't let some database responsible know that there is a problem.  YourSQLDba philosophy includes this aspect

YourSQLDba relies on new SQL 2005 SMTP Database mail.  This new mail model makes it easy to do e-mailing.  These days were it was necessary to install Outlook (Ouch!) on SQL Server machine just to get a working MAPI interface are gone.

YourSQLDba does email setup.  It creates:

a e-mail profile (nothing to do with external e-mail profile like outlook one's).  Its name is "YourSQLDba_EmailProfile".  Database mail profiles are security containers. They contains database mail e-mail accounts .  They ARE NOT real mail accounts onto a mail server. 
Database mail e-mail account is create under the e-mail profile. 
It just serve the purpose of specifying the e-mail server, the SMTP authentication mode to the e-mail server, and the sender identification.  
The account generated by YourSQLDba use anonymous authentication mode, but other authentication mode can be set manually after installation.  
Default sender authentication is made this way :  <machinename>.<instancename>@YourSQLDba.sql and its description is <machinename>\<instancename> YourSQLDba.  
Sometimes it is necessary to modify the domain so the email server will accept it, or to avoid the message to be caught by anti-spam software. 
Email server contains the value specified as parameter to procedure InitialSetupOfYourSQLDba.  The port is by default 25, which is usually the SMTP port.  Beware that it could be blocked by firewall or antivirus software.  Another important mail server policy is to restrict SMTP use to send email. Worm spam often use this protocol to send spam from your domain, which turns out to become blacklisted on all servers.  Nobody wants his organization domain to become email blacklisted.

Email server admin have different policies to fight spam worm:.

Only accept mail that match a valid existing address onto the mail server.  This is not a foolproof method because SMTP sender address can be anything. It is not a requirement of SMTP protocol to have a valid address onto the mail server. 
Deny systematically anonymous SMTP, except for machine listed in an exception list (IP Address usually).  Usually you need to update it to add your SQL Server machine to make it get through.  Changing SQL Server address, without adjusting mail server exception list, could indeed may stop SQL Server emails to get  through. 
A second one is to allow only email that goes to your organization domain, an unpopular policy among spammers, since the target audience is no more the world, just your organization. 
Only allow authenticated account to send email.  This option could be great, because usually spam worms don't necessarily get the credentials, specially non windows authenticated one.  However beware to allow SMTP email to get through with windows authentication with no more criteria.  In a windows domain everybody session is  "windows authenticated".  In that case you need to figure out if policies can by set by email account to allow/deny SMTP.  If you use windows authentication the account that start SQL Server is the account that is used for the credentials, because this is the database engine that start the email engine (DatabaseMail90.exe).  
YourSQLDba provides a stored procedure to diagnose mail problems.  It is called DiagDbMail.  It requires no parameter and simply produce three results sets:  First, it lists email error log. Second, it lists emails sent, which is a proof that email server sent it, but it was caught somewhere between you and the mail server (on the anti-spam engine), third it list of database mail engine is up and running.  Problem like mail server access or mail server communication is clearly listed in the description field of the first result sets, with a timestamp to indicate when it occurred.

 

推荐 0
本文由 桦仔 创作,采用 知识共享署名-相同方式共享 3.0 中国大陆许可协议 进行许可。
转载、引用前需联系作者,并署名作者且注明文章出处。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责。本站是一个个人学习交流的平台,并不用于任何商业目的,如果有任何问题,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。

0 个评论

要回复文章请先登录注册