Closed Bug 302418 Opened 15 years ago Closed 15 years ago

re-enable sendmail support for windows

Categories

(Bugzilla :: Email Notifications, defect)

2.20
x86
Windows 2000
defect
Not set

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(2 files, 1 obsolete file)

sendmail support for windows was removed as Mail::Mailer's sendmail module uses
a forked open (which isn't win32 friendly).

i've had a number of requests from people running 2.18 along with my sendmail
wrapper how to get it working in 2.20 -- right now this isn't possible.

the sendmail wrapper supports more features than 2.20's native smtp function -
smtp authentication, pop before smtp, debug loggin - so what i think we should
do is re-enable sendmail for win32, but use ye-olde "|/usr/lib/sendmail" on
windows, leaving the other platform's with Mail::Mailer's native sendmail module.
Attached patch re-enable win32 sendmail v1 (obsolete) — Splinter Review
this re-enables sendmail for win32, and checks for sendmail.exe when you select
it.
Attachment #190780 - Flags: review?
i know it's late in the game here for 2.20, but i'd really like to see this
fixed for the 2.20 release.
Target Milestone: --- → Bugzilla 2.20
Comment on attachment 190780 [details] [diff] [review]
re-enable win32 sendmail v1

Please use the chance and put the path to sendmail somewhere central instead of
having it hardcoded in several places...

> # Set mail_delivery_method to SMTP and prompt for SMTP server
> # if running on Windows and set to sendmail (Mail::Mailer doesn't
> # support sendmail on Windows)

Please change this comment to reflect your changes in what's being done here.

>    name => 'mail_delivery_method',
>    desc => 'Defines how email is sent, or if it is sent at all.<br><ul>' .
>            '<li>\'sendmail\', \'smtp\' and \'qmail\' are all MTAs. ' .
>-           '(only SMTP is available in Windows.)</li>' .

Instead of removing the bracketed part, please replace it by something along
the lines of "(You need to install a third-party sendmail replacement at
$path_to_sendmailexe if you want to use sendmail on Windows.)".

>+    if (Param("mail_delivery_method") eq "sendmail" && $^O =~ /MSWin32/i) {
>+        open(SENDMAIL, "|/usr/lib/sendmail -t -i") ||

While this works for me, I seem to recall situations where Windows wants to see
the .exe extension here... Unless I'm paranoid, do you agree it'd make sense to
be better safe than sorry and give it here, perhaps as part of introducing some
$path_to_sendmailexe variable?
Attachment #190780 - Flags: review? → review-
> Please use the chance and put the path to sendmail somewhere central
> instead of having it hardcoded in several places...

good point.  gah, i was going to just use %PATH% but taint mode means we have
to kill it :(  so i've made it a constant.
Attachment #190780 - Attachment is obsolete: true
Attachment #192152 - Flags: review?(wurblzap)
Attachment #192152 - Flags: review?(wurblzap) → review+
The patch doesn't apply to the branch.
Attachment #192198 - Flags: review?(wurblzap)
Attachment #192198 - Flags: review?(wurblzap) → review+
Flags: approval?
Flags: approval2.20?
oy.  this sounds like enough regression from the 2.18 behavior on Windows to be
worth checking in on the branch.  However, this is touching code that will
potentially destabilize things.  Need to make sure this gets some good QA on
both Windows and Linux.
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
Keywords: qawanted
tip:

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.426; previous revision: 1.425
done
Checking in defparams.pl;
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v  <--  defparams.pl
new revision: 1.164; previous revision: 1.163
done
Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.47; previous revision: 1.46
done
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.27; previous revision: 1.26
done


2.20rc2:

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.412.2.5; previous revision: 1.412.2.4
done
Checking in defparams.pl;
/cvsroot/mozilla/webtools/bugzilla/defparams.pl,v  <--  defparams.pl
new revision: 1.160.2.1; previous revision: 1.160
done
Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.39.4.2; previous revision: 1.39.4.1
done
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.25.2.1; previous revision: 1.25
done
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
*** Bug 304490 has been marked as a duplicate of this bug. ***
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.