I am running CentOS 7 on a server where I have only recently installed postfix. Postfix is configured to only send outgoing mail via an external relay server and test mails created on my server are indeed delivered via this external server. However, I must have some other application on the server generating mails where the recipient's address is incorrect resulting in being rejected by the external relay server. Viewing /var/log/maillog I get some information but cannot see which application generated that e-mail, nor the content of it which would likely allow me to see where it comes from. Can anyone suggest how to track down the app so I can reconfigure the mail address? Thanks.
Frank Cox
2021-Jun-24 01:59 UTC
[CentOS] Tracking down application sending mail in CentOS 7
On Wed, 23 Jun 2021 21:54:02 -0400 H wrote:> Can anyone suggest how to track down the app so I can reconfigure the mail > address?And the relevant line(s) in /var/log/maillog are.... -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
Kenneth Porter
2021-Jun-24 02:15 UTC
[CentOS] Tracking down application sending mail in CentOS 7
--On Wednesday, June 23, 2021 10:54 PM -0400 H <agents at meddatainc.com> wrote:> Viewing /var/log/maillog I get some information but cannot see which > application generated that e-mail, nor the content of it which would > likely allow me to see where it comes from. > > Can anyone suggest how to track down the app so I can reconfigure the > mail address?Hold all delivery so you can examine the mystery message in the queue. I found this article on how to hold mail with Postfix: <https://serverfault.com/questions/92981/how-do-i-temporarily-suspend-mail-delivery-to-a-specific-domain-non-local-with> This requires creating the file /etc/postfix/hold with a static hold rule and "compiling" it with the postmap command. Add a line to main.cf to use the new map.