51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 7308|回复: 4
打印 上一主题 下一主题

[原创] 费了快5个工作日搞定的,windows下自动安装版bugzilla3.6.1的邮件配置

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-7-22 16:13:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我是第一次来发帖子,也不是搞测试的,老板让我装bugzilla。装的过程无比艰辛,最后靠摸索和压力,终于搞定了3.6.1windows安装版本的bugzilla的邮件配置。
  我是在咱们这看到bugzilla除了自动安装版本,但是帖子里面就很多人问,怎么发不了邮件,实践证明,bugzilla很好安装,但是邮件真的很难配置。
  下面就是我的总结
注:我只测试成功三种情况:1.使用gmail的smtp,2.使用qq的smtp server3.使用自己搭的smtp server
1.buzilla3.6.1安装版本下载地址:https://wiki.mozilla.org/Bugzilla:Win32InstallPackages仔细读一下这是说明,然后里面有下载地址链接:http://landfill.bugzilla.org/win32installer/
下载,1路next,其中让输入smtp server地址,事后证明,这个不输也行,之后可以改
2.安装基本没什么问题,打开http://localhost/,就有页面了

安装完bugzilla超级简单,但是邮件配置很烦人。修改smtp的用户名密码后,发现根本连不上smtp server,经过无数次试验,我得出结论是:bugzilla默认使用perl的 net::smtp发邮件,这个代码没写好,所以只能对没有认证啊,没有ssl之类的smtp支持的,而现在一般的smtp server都有安全机制,所以bugzilla自带的smtp模块,基本是不能用的。
我只在自己搭smtp server,同时没使用验证机制的时候,成功发送邮件,但是这个估计安全性都不满足,如果哪位使用的场景简单,可以继续探索
2.qq做smtp server
用qq的话,不要去考虑用自带的smtp机制,修改buzilla参数,使用sendmail方式。你可以选择在浏览器里进行这个修改,方法是用administrator登录,打开Administrator->Parameters->Email 修改mail_delivery_method为sendmail.还要修改General maintainer ,Email 的mailfrom,smtp_username,smtp_password,smtpserver。
这些修改可以在文件中进行,这样就不用浏览器里面改了

buzilla安装路径\bugzilla\data\params文件,打开。修改完善以下内容
           'mail_delivery_method' => 'Sendmail',这个要修改成sendmail
           'mailfrom' => 'XXX@qq.com',
           'maintainer' => 'XXX@qq.com',
           'smtp_username' => 'XXX@qq.com',上面这三个一样
           'smtp_password' => ''Your Password”,你的密码
           'smtpserver' => 'smtp.qq.com:465',这个其实最后没用,不过我也改了
           'urlbase' => 'http://9.186.56.105/',——以后作为访问地址的基础url,一般是服务器地址,如果安装时修改了web端口号要写上,http://9.186.56.105:xx/。
smtp_username, mailfrom,maintainer要一致,都是用来让bugzilla发邮件的email地址。
          smtp_debug=>'1'可以收集debug信息,debug内容在bugzilla安装路径\apache\logs下。
然后下载fake 的sendmail,地址是http://www.glob.com.au/sendmail/,用来做sendmail的模块(这个重要哦,因为bugzilla自带的smtp不好用,sendmail方式是使用第三方的程序)

下载后,可以参照网址里面说的,进行配置,其实需要做的就是把sendmail.exe放在C:\usr\lib下,然后配置sendmail.ini,再下载两个dll文件,libeay32.dll,ssleay32.dll放入同一路径,这些在网址里面都可以下载下来。
我的sendmail是这么配置的

smtp_server
smtp_port
default_domain
auth_username
auth_password
这几项要配置,default_domain我是填qq.com这个我没搞懂,反正ok.其中还有个debug选项,去掉#,这样就会有debug信息
______________________________________________
configuration for fake sendmail

; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

smtp_server=smtp.qq.com

; smtp port (normally 25)

smtp_port=465

; SMTPS (SSL) support
;   auto = use SSL for port 465, otherwise try to use TLS
;   ssl  = alway use SSL
;   tls  = always use TLS
;   none = never try to use SSL

smtp_ssl=auto

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

default_domain=qq.com

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

auth_username=xxxx@qq.com
auth_password=yourpassword

; if your smtp server uses pop3 before smtp authentication, modify the
; following three lines.  do not enable unless it is required.

#pop3_server=
#pop3_username=
#pop3_password=

; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify
; the "From: " header of the message content

force_sender=

; force the sender to always be the following email address
; this will only affect the "RCTP TO" command, it won't modify
; the "To: " header of the message content

force_recipient=

; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting.  you can manually set the ehlo/helo name if required

hostname=
______________________________________________


ok,保存,这下就可以用qq发送邮件了

3.gmail下的配置
gmail是使用starttls机制的,这个是tls中的一类,上面的sendmail支持不好,所以需要换一个sendmail,使用msmtp,下载地址是http://msmtp.sourceforge.net/download.html,这个内容,今天先不更新了,看看有没有回帖的~
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    奋斗
    2022-5-8 19:23
  • 签到天数: 137 天

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2010-7-22 21:42:38 | 只看该作者
    看上去很复杂
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
    发表于 2010-9-13 16:50:41 | 只看该作者
    咋不贴了?
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
    发表于 2011-6-20 15:18:29 | 只看该作者
    感觉还不错 怎么没有gmail的了 楼主继续发帖啊
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    难过
    2014-12-18 14:44
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    5#
    发表于 2011-6-21 12:01:39 | 只看该作者
    不会吧,2天之内应该可以搞定的!
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-20 15:34 , Processed in 0.075949 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表