S
S
Sergey Karpin2021-04-05 10:07:02
1C-Bitrix
Sergey Karpin, 2021-04-05 10:07:02

How to properly configure sending mail to cron for multisite?

Hello!

Input data:
VM Bitrix - 7.4.12
Main site - ext_kernel (site_master)
Additional site (mirror) - link (site_mirror) to the main one, one database, etc., minor visual changes.

Extract from dbconn.php

...
define("BX_CRONTAB_SUPPORT", true);
...


.msmtprc config
# smtp account configuration for site_master
account site_master
logfile /home/bitrix/msmtp_site_master.log
host smtp.yandex.ru
port 587
from почта@некий_домен
aliases /etc/aliases
keepbcc off
auth on
user некий_пользователь
password некий_пароль

tls on
tls_certcheck off
tls_starttls on

# smtp account configuration for site_mirror
account site_mirror
logfile /home/bitrix/msmtp_site_mirror.log
host smtp.yandex.ru
port 587
from почта@некий_домен
aliases /etc/aliases
keepbcc off
auth on
user некий_пользователь
password некий_пароль

tls on
tls_certcheck off
tls_starttls on


From the Apache config, for the second site it is similar, only the site_mirror config is called
<Directory /home/bitrix/ext_www/site_master>
    ...
    php_admin_value sendmail_path "msmtp -t -i -a site_master"
    ...
  </Directory>


The default cron config for the main site.

Problem:
Email from site_mirror is not sent to cron. If you send a letter from the main site, then you will receive a letter from the main site and a letter that was previously "sent" from the mirror.

It works on hits from both sites.

Where do you need to dig?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question