Closed
Bug 277437
Opened 20 years ago
Closed 20 years ago
Use Mail::Mailer (Perl module) for mail delivery
Categories
(Bugzilla :: Email Notifications, enhancement)
Bugzilla
Email Notifications
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: abenea, Assigned: abenea)
References
Details
Attachments
(1 file, 1 obsolete file)
3.74 KB,
patch
|
goobix
:
review+
|
Details | Diff | Splinter Review |
Using Mail::Mailer will provide at least 3 methods of delivery (sendmail, smtp,
qmail). This will make Windows users happy (and Linux users without a working
sendmail too).
Assignee | ||
Comment 1•20 years ago
|
||
This patch tries to emulate the current behaviour using the Mail::Mailer
module.
Attachment #170596 -
Flags: review?
Assignee | ||
Updated•20 years ago
|
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: MTAConfig
Comment 2•20 years ago
|
||
Can you explain exactly how this works, and how it differs from what happens
now? I can't see where, for example, you configure the SMTP server to use...
Gerv
Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2)
> Can you explain exactly how this works, and how it differs from what happens
> now? I can't see where, for example, you configure the SMTP server to use...
>
> Gerv
First of all this patch is a proof of concept. It doesn't add any functionality.
It is intended to behave exactly like the current function.
To change the method used for delivery to smtp the following line
$mailer = new Mail::Mailer "sendmail", "-ODeliveryMode=deferred";
must be changed to:
$mailer = new Mail::Mailer "smtp", Server => "bugzilla.org";
Obviously, this patch will need some parameters (mail_delivery_method and
smtp_server). It also needs to update the dependency list.
I posted this early version to get some feedback on the approach used. After so
many failed attempts (rejected patches) in MTAConfig bugs, I wanted to be sure I
am going in the right direction before I start dealing with the details.
Status: NEW → ASSIGNED
Assignee | ||
Updated•20 years ago
|
Attachment #170596 -
Flags: review? → review?(sovlad)
Assignee | ||
Updated•20 years ago
|
Attachment #170596 -
Flags: review?(sovlad) → review?(vladd)
Updated•20 years ago
|
OS: Linux → All
Hardware: PC → All
Comment 4•20 years ago
|
||
> I wanted to be sure I
> am going in the right direction before I start dealing with the details.
Cool :-) One question on the direction, then: are you sure Mail::Mailer is the
right module? I heard a talk at a recent Perl conference about the Email::*
modules, where their maintainer (OK, so he's biased) said that they had been
written in response to various flaws/lack of maintenance of the Mail::* modules.
Would it be wise to investigate/use the Email::* set of modules? (There's also
Mail::BulkMailer, but there was a big argument last time I suggested that.)
Gerv
i've just been playing with Email::Send::SMTP and it appears to have a bug that
causes it to never delever email :( i've notified the maintainer.
however Email::Send does look much cleaner than MailTools, especially with
respect to partially failed delivery (where only some of the recipients worked).
Assignee | ||
Comment 6•20 years ago
|
||
(In reply to comment #4)
> Cool :-) One question on the direction, then: are you sure Mail::Mailer is the
> right module? I heard a talk at a recent Perl conference about the Email::*
> modules, where their maintainer (OK, so he's biased) said that they had been
> written in response to various flaws/lack of maintenance of the Mail::*
modules.
I must admit that this module has a very weird interface and incomplete
documentation, but it worked perfectly with both smtp and sendmail in my tests.
I'll give Email::Send a try, which looks better (we don't have to parse the
headers anymore -- I am forced to do this because of the odd interface of Mail::
Mailer...)
Assignee | ||
Updated•20 years ago
|
Summary: Use Mail::Mailer for mail delivery → Use a perl module for mail delivery
Updated•20 years ago
|
Summary: Use a perl module for mail delivery → Use a Perl module for mail delivery
Assignee | ||
Comment 7•20 years ago
|
||
Email::Send seems to be completely broken. It doesn't work with SMTP or
sendmail.
Anyway, the code effort required to switch betweem Email::SMTP and Mail::Mailer
is really small (less than 10 lines of code). I suggest we go with Mail::Mailer
and switch later to Email::Send if needed.
Comment 8•20 years ago
|
||
> Email::Send seems to be completely broken. It doesn't work with SMTP or
> sendmail.
What makes you say that? I used it in a webapp I wrote the other week and it
worked fine. It doesn't use external programs like sendmail, but does the SMTP
itself, so I don't know what you mean by "it doesn't work with sendmail".
Are you using its API correctly?
Gerv
Assignee | ||
Comment 9•20 years ago
|
||
(In reply to comment #8)
> What makes you say that? I used it in a webapp I wrote the other week and it
> worked fine. It doesn't use external programs like sendmail, but does the SMTP
> itself, so I don't know what you mean by "it doesn't work with sendmail".
I think this is a misunderstanding. I was referring to this module: http://
search.cpan.org/~cwest/Email-Send-1.45/lib/Email/Send.pm . It has multiple
mailer backends, just like Mail::Mailer.
Assignee | ||
Comment 10•20 years ago
|
||
Tested with sendmail, SMTP and testfile.
Attachment #170596 -
Attachment is obsolete: true
Attachment #170728 -
Flags: review?(vladd)
Assignee | ||
Updated•20 years ago
|
Attachment #170728 -
Flags: review?(gerv)
Updated•20 years ago
|
Attachment #170596 -
Flags: review?(vladd)
Comment 11•20 years ago
|
||
Comment on attachment 170728 [details] [diff] [review]
Mail::Mailer v1
Tested the ppm installation on Windows. Works as expected, and the params do
appear in the editparams.cgi page correctly.
+ 'Mail::Mailer manual)',
manual --> documentation, and probably a dot at the end of the sentence
wouldn't hurt. (that's a nit)
It would be cool to send the whole message to Mail::Mailer, and let it parse
the headers itself instead on relying to the rather hackish nature of + $msg
=~ /(.*?)\n\n(.*)/ms; but that's not possible as far as Andrei is concerned.
This works and is good to go.
Attachment #170728 -
Flags: review?(vladd) → review+
Comment 12•20 years ago
|
||
The documentation patch for Net::SMTP Windows support is very difficult to
re-written with the actual MessageToMTA arhitecture. We could commit this
instead and ditch that paragraph from the documentation altogether.
It seems the need to re-write that documentation section doesn't appear nowhere
nowadays on the list of 2.18 blockers. It has a documention? flag on mkanat's
MessageToMTA patch, but that's FIXED and it's not picked up by the current queries.
Flags: blocking2.20?
Flags: blocking2.18?
Flags: blocking2.18.1?
Flags: approval?
Flags: approval2.18?
Assignee | ||
Updated•20 years ago
|
Attachment #170728 -
Flags: review?(gerv)
Comment 13•20 years ago
|
||
(In reply to comment #12)
> It seems the need to re-write that documentation section doesn't appear
> nowhere nowadays on the list of 2.18 blockers. It has a documention? flag on
> mkanat's MessageToMTA patch, but that's FIXED and it's not picked up by the
> current queries.
When I look, the "For version 2.18 documentation", query on the Documentor's
Guide (http://www.bugzilla.org/docs/documentor.html) picks up the need for
documentation on bug 59351 just fine.
I'm not sure what queries you're using that don't show it... yes, it's not a
documentation bug, but that's what the documentation *flag* is for... to show
that 'this feature needs some docs!'
Comment 14•20 years ago
|
||
You could also change the documentation to point to this patch, right?
Comment 15•20 years ago
|
||
(In reply to comment #14)
> You could also change the documentation to point to this patch, right?
Hmm, that's a good idea for 2.18/2.20. This is changing just enough (additional
Perl module dependency) that it shouldn't go in during the freeze. Adding
dependencies after a release freeze is to be avoided except where necessary to
fix a security issue. We can do this right after we branch though.
I do note that this bug is identical (exact dupe) of bug 49893. Since we have a
reviewed patch here, though, it'll likely get duped to this one instead. This
bug should probably inherit all of that one's dependencies in that case.
There's some good discussion there that should probably be read, too. I think
most of the hesitations on that bug have been separated and are now covered on
bug 249121, and this patch avoids turning that one into a regression by still
allowing Sendmail to be used (which is a good thing :)
Things for the docs: Using SMTP allows you to send mail in an environment where
you don't have Sendmail available to use. However, unlike Sendmail, it doesn't
perform any queuing. This means if a temporary failure occurs when sending mail
(such as the SMTP server being down, or the SMTP server issuing a "try again
later" response), the mail will be discarded. Thus the advantage to using
Sendmail (or another Sendmail-compatible MTA) is that Sendmail will queue the
message (up to 5 days by default - the time can be configured in your sendmail
configuration) and keep trying every so often when those types of errors occur.
Flags: blocking2.20?
Flags: blocking2.20-
Flags: blocking2.18?
Flags: blocking2.18.1?
Flags: blocking2.18-
Flags: approval2.18?
Flags: approval2.18-
Target Milestone: --- → Bugzilla 2.22
Updated•20 years ago
|
Whiteboard: MTAConfig → patch awaiting approval
Comment 16•20 years ago
|
||
Targeting bug to 2.20 since the 2.20 feature freeze was canceled.
Target Milestone: Bugzilla 2.22 → Bugzilla 2.20
Comment 17•20 years ago
|
||
I have a feeling this will conflict with the patch on bug 277623, but the
conflict should be minor and easily resolved on checkin.
Flags: documentation?
Flags: approval?
Flags: approval+
Comment 18•20 years ago
|
||
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v <-- checksetup.pl
new revision: 1.335; previous revision: 1.334
done
Checking in defparams.pl;
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v <-- defparams.pl
new revision: 1.144; previous revision: 1.143
done
Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v <-- BugMail.pm
new revision: 1.25; previous revision: 1.24
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: Use a Perl module for mail delivery → Use Mail::Mailer (Perl module) for mail delivery
Whiteboard: patch awaiting approval
Comment 19•20 years ago
|
||
Andrei, Vladd, is version 1.65 required? I have installed Mandrake Linux 10.1
Official and this distro has MailTools 1.62 only, so that checksetup.pl
complains. Is there any good reason to require such a high version?
Assignee | ||
Comment 20•20 years ago
|
||
(In reply to comment #19)
> Andrei, Vladd, is version 1.65 required? I have installed Mandrake Linux 10.1
> Official and this distro has MailTools 1.62 only, so that checksetup.pl
> complains. Is there any good reason to require such a high version?
This is the only version I tested. If it works fine with 1.62, you can write a
trivial patch to change the version requirement.
Comment 22•18 years ago
|
||
The documentation has been fixed as part of bug 313469, which among others mentions the new 'maildeliverymethod' parameter. I don't think we need more.
Flags: documentation?
Flags: documentation2.20?
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•