Skip to content

Commit e4deb7f

Browse files
author
epriestley
committedJan 14, 2014
Remove metamta.send-immediately
Summary: Ref T3857. - Always send mail via daemons. This lets us get rid of this config, and is generally much more performant. - After D7964, we warn if daemons aren't running. Test Plan: Sent some mail. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3857 Differential Revision: https://secure.phabricator.com/D7965
1 parent f060d8e commit e4deb7f

File tree

5 files changed

+5
-50
lines changed

5 files changed

+5
-50
lines changed
 

‎conf/default.conf.php

-7
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,6 @@
299299
'metamta.mail-adapter' =>
300300
'PhabricatorMailImplementationPHPMailerLiteAdapter',
301301

302-
// When email is sent, try to hand it off to the MTA immediately instead of
303-
// queueing it for delivery by the daemons. If you are running the Phabricator
304-
// daemons with "phd start", you should disable this to provide a (sometimes
305-
// substantial) performance boost. It's on by default to make setup and
306-
// configuration a little easier.
307-
'metamta.send-immediately' => true,
308-
309302
// When email is sent, what format should Phabricator use for user's
310303
// email addresses? Valid values are:
311304
// - 'short' - 'gwashington <gwashington@example.com>'

‎src/applications/config/check/PhabricatorSetupCheckExtraConfig.php

+2
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ public static function getAncientConfig() {
170170
'celerity.resource-path' => pht(
171171
'An alternate resource map is no longer supported. Instead, use '.
172172
'multiple maps. See T4222.'),
173+
'metamta.send-immediately' => pht(
174+
'Mail is now always delivered by the daemons.'),
173175
);
174176

175177
return $ancient_config;

‎src/applications/config/option/PhabricatorMetaMTAConfigOptions.php

-17
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,6 @@ public function getOptions() {
136136
custom mailers), consult "Configuring Outbound Email" in the documentation for
137137
details.
138138
EODOC
139-
));
140-
141-
$immediately_description = $this->deformat(pht(<<<EODOC
142-
When email is sent, try to hand it off to the MTA immediately instead of
143-
queueing it for delivery by the daemons. If you are running the Phabricator
144-
daemons with "phd start", you should disable this to provide a (sometimes
145-
substantial) performance boost. It's on by default to make setup and
146-
configuration a little easier.
147-
EODOC
148139
));
149140

150141
$placeholder_description = $this->deformat(pht(<<<EODOC
@@ -298,14 +289,6 @@ public function getOptions() {
298289
))
299290
->setSummary(pht('Trust "Reply-To" headers for authentication.'))
300291
->setDescription($reply_to_description),
301-
$this->newOption('metamta.send-immediately', 'bool', true)
302-
->setBoolOptions(
303-
array(
304-
pht('Send Immediately (Slow)'),
305-
pht('Send Via Daemons (Must Run Daemons)'),
306-
))
307-
->setSummary(pht('Improve performance by sending email via daemons.'))
308-
->setDescription($immediately_description),
309292
$this->newOption('metamta.placeholder-to-recipient', 'string', null)
310293
->setSummary(pht('Placeholder for mail with only CCs.'))
311294
->setDescription($placeholder_description),

‎src/applications/metamta/storage/PhabricatorMetaMTAMail.php

+3-15
Original file line numberDiff line numberDiff line change
@@ -289,25 +289,13 @@ public function setThreadID($thread_id, $is_first_message = false) {
289289
}
290290

291291
/**
292-
* Save a newly created mail to the database and attempt to send it
293-
* immediately if the server is configured for immediate sends. When
294-
* applications generate new mail they should generally use this method to
295-
* deliver it. If the server doesn't use immediate sends, this has the same
296-
* effect as calling save(): the mail will eventually be delivered by the
297-
* MetaMTA daemon.
292+
* Save a newly created mail to the database. The mail will eventually be
293+
* delivered by the MetaMTA daemon.
298294
*
299295
* @return this
300296
*/
301297
public function saveAndSend() {
302-
$ret = null;
303-
304-
if (PhabricatorEnv::getEnvConfig('metamta.send-immediately')) {
305-
$ret = $this->sendNow();
306-
} else {
307-
$ret = $this->save();
308-
}
309-
310-
return $ret;
298+
return $this->save();
311299
}
312300

313301
protected function didWriteData() {

‎src/docs/user/configuration/configuring_outbound_email.diviner

-11
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@ disable outbound mail, if you don't want to send mail or don't want to configure
152152
it yet. Just set **metamta.mail-adapter** to
153153
"PhabricatorMailImplementationTestAdapter".
154154

155-
= Configuring MetaMTA to Send Mail Using a Daemon =
156-
157-
Regardless of how you are sending outbound email, you can move the handoff to
158-
the MTA out of the main process and into a daemon. This will greatly improve
159-
application performance if your mailer is slow, like Amazon SES. In particular,
160-
commenting on Differential Revisions and Maniphest Tasks sends outbound email.
161-
162-
If you set **metamta.send-immediately** to ##false## in your configuration,
163-
MetaMTA will queue mail to be send by a PhabricatorTaskmasterDaemon.
164-
For more information on using daemons, see @{article:Managing Daemons with phd}.
165-
166155
= Testing and Debugging Outbound Email =
167156

168157
You can use the `bin/mail` utility to test, debug, and examine outbound mail. In

0 commit comments

Comments
 (0)
Failed to load comments.