A
A
Anton B2021-01-06 11:58:22
Debian
Anton B, 2021-01-06 11:58:22

How to make a trigger on successful sending in Exim?

Hello!

Debian 10
Exim 4.92
PHP 7.3

Sending emails to our users, sometimes the Exim logs contain error messages from mail providers, like "user does not exist", "provider did not accept mail, try again later", etc.

I would like to record successfully sent emails.

I was only able to find a solution for unsuccessfully sent emails.

# router
php_notice:
 driver = accept
 transport = php_notice_pipe

# transport
php_notice_pipe:
  driver = pipe
  command = /bin/bash /var/www/domain.ru/sh/exim.sh
  user = www-data
  group = www-data

Questions :
1. Can I make a trigger for successfully sent emails?
2. Does Exim know unequivocally when sending, based on the response of the mail provider, that the letter was accepted?
3. Can I solve my problem somehow differently?

Thanks for answers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2021-01-06
@vitaly_il1

It is difficult to be 100% sure that the letter was delivered.
It is easy to track down only errors like "address not found" and similar. (The letter can be accepted by the server and quietly sent to spam.)
If you want to find "problem" addresses from the list, I advise you to look in the error logs , collect problematic addresses and delete them from the mailing list.
But in general, I strongly advise you to forget about the local mail server and use Sendgrid, etc. services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question