@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+5 -50
-7
conf/default.conf.php
··· 299 299 'metamta.mail-adapter' => 300 300 'PhabricatorMailImplementationPHPMailerLiteAdapter', 301 301 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 - 309 302 // When email is sent, what format should Phabricator use for user's 310 303 // email addresses? Valid values are: 311 304 // - 'short' - 'gwashington <gwashington@example.com>'
+2
src/applications/config/check/PhabricatorSetupCheckExtraConfig.php
··· 170 170 'celerity.resource-path' => pht( 171 171 'An alternate resource map is no longer supported. Instead, use '. 172 172 'multiple maps. See T4222.'), 173 + 'metamta.send-immediately' => pht( 174 + 'Mail is now always delivered by the daemons.'), 173 175 ); 174 176 175 177 return $ancient_config;
-17
src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
··· 138 138 EODOC 139 139 )); 140 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 148 - )); 149 - 150 141 $placeholder_description = $this->deformat(pht(<<<EODOC 151 142 When sending a message that has no To recipient (i.e. all recipients are CC'd, 152 143 for example when multiplexing mail), set the To field to the following value. If ··· 298 289 )) 299 290 ->setSummary(pht('Trust "Reply-To" headers for authentication.')) 300 291 ->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), 309 292 $this->newOption('metamta.placeholder-to-recipient', 'string', null) 310 293 ->setSummary(pht('Placeholder for mail with only CCs.')) 311 294 ->setDescription($placeholder_description),
+3 -15
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 289 289 } 290 290 291 291 /** 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. 298 294 * 299 295 * @return this 300 296 */ 301 297 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(); 311 299 } 312 300 313 301 protected function didWriteData() {
-11
src/docs/user/configuration/configuring_outbound_email.diviner
··· 152 152 it yet. Just set **metamta.mail-adapter** to 153 153 "PhabricatorMailImplementationTestAdapter". 154 154 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 - 166 155 = Testing and Debugging Outbound Email = 167 156 168 157 You can use the `bin/mail` utility to test, debug, and examine outbound mail. In