• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Configure postfix bounce notification recipient

Garrett

New Pleskian
Hello,

I am trying to to configure the postfix bounce notification email, so that I am notified whenever Postfix is unable to deliver a message. Here's what I'm seeing in the mail log when one of my virtual hosts (testdomain.com) tries to send an email to a non-existent gmail account:

Code:
Jan 11 17:11:57 dv4 journal: plesk sendmail[10964]: handlers_stderr: SKIP
Jan 11 17:11:57 dv4 journal: plesk sendmail[10964]: SKIP during call 'check-quota' handler
Jan 11 17:11:57 dv4 postfix/pickup[10234]: 675A087EF9: uid=10063 from=<[email protected]>
Jan 11 17:11:57 dv4 postfix/cleanup[10838]: 675A087EF9: message-id=<[email protected]>
Jan 11 17:11:57 dv4 postfix/qmgr[10235]: 675A087EF9: from=<[email protected]>, size=389, nrcpt=1 (queue active)
Jan 11 17:11:57 dv4 postfix/smtp[10237]: 675A087EF9: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.22.26]:25, delay=0.11, delays=0/0/0.08/0.03, dsn=5.1.1, status=bounced (host gmail-smtp-in.l.google.com[74.125.22.26] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1  https://support.google.com/mail/?p=NoSuchUser q7si4734114qtb.60 - gsmtp (in reply to RCPT TO command))
Jan 11 17:11:57 dv4 postfix/cleanup[10838]: 83EDB87EFA: message-id=<[email protected]>
Jan 11 17:11:57 dv4 postfix/bounce[10970]: 675A087EF9: sender non-delivery notification: 83EDB87EFA
Jan 11 17:11:57 dv4 postfix/qmgr[10235]: 83EDB87EFA: from=<>, size=2856, nrcpt=1 (queue active)
Jan 11 17:11:57 dv4 postfix/qmgr[10235]: 675A087EF9: removed
Jan 11 17:11:57 dv4 postfix-local[10972]: postfix-local: from=MAILER-DAEMON, [email protected], dirname=/var/qmail/mailnames
Jan 11 17:11:57 dv4 postfix-local[10972]: Unable to get sender domain by sender mailname
Jan 11 17:11:57 dv4 postfix-local[10972]: cannot chdir to mailname dir testdomain: No such file or directory
Jan 11 17:11:57 dv4 postfix-local[10972]: Unknown user: [email protected]
Jan 11 17:11:57 dv4 postfix/pipe[10971]: 83EDB87EFA: to=<[email protected]>, relay=plesk_virtual, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Jan 11 17:11:57 dv4 postfix/qmgr[10235]: 83EDB87EFA: removed

The message to gmail bounces, and then it looks like Postfix tries to send the non-delivery notification to "[email protected]". I have mail disabled for all of my virtual hosts; they do not accept incoming mail, and in any case no such email user ([email protected]) exists anyway. However, then the log seems to report that the message is successfully sent (delivered via plesk_virtual_service). So where is this message going? How can I find that message, or better yet, direct all those messages to an external email address of my choosing?

I've tried changing the bounce_notice_recipient in the Postfix config, but that had no affect. And as far as I can tell Postfix isn't using that value anyway, since it's set to "postmaster" by default.

---

OS‪CentOS Linux 7.1.1503 (Core)‬
Plesk version12.5.30 Update #56, last updated at Dec 21, 2016 12:25 AM
 
Last edited:
Hi,

Can you please check if Mail for Non-Existing Users. settings are enabled ?
--
  1. Click the Mail tab.
  2. Click on Mail Settings.
  3. Tick the checkbox for your domain and then Click on Mail for Non-Existing Users.
  4. Select "Forward to address".
  5. Enter the catch-all email account in the box.
  6. Click OK.
--
Regards,
 
It was set to "reject". However, setting to to "Forward to address" only works if mail is enabled for the domain, and mail is disabled for all of my virtual hosts. I need to be able to globally set the recipient for the bounce notifications so that Plesk never even attempts to email "[email protected]". Can this be done?
 
I made some progress. In /etc/postfix/main.cf I had to set:

Code:
notify_classes = resource, software, bounce
bounce_notice_recipient = [email protected]

The default value for notify_classes doesn't include "bounce". So now bounce notifications are being sent. However, Plesk still attempts to notify "[email protected]". So now whenever and email bounces, I get two notifications, one for the original bounced message, and another for when the bounce notification itself bounces (because it's being sent to [email protected]). See log below:

Code:
Jan 12 10:33:57 dv4 journal: plesk sendmail[22045]: handlers_stderr: SKIP
Jan 12 10:33:57 dv4 journal: plesk sendmail[22045]: SKIP during call 'check-quota' handler
Jan 12 10:33:57 dv4 postfix/pickup[22040]: 41EC188422: uid=10063 from=<[email protected]>
Jan 12 10:33:57 dv4 postfix/cleanup[22051]: 41EC188422: message-id=<[email protected]>
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 41EC188422: from=<[email protected]>, size=401, nrcpt=1 (queue active)
Jan 12 10:33:57 dv4 postfix/smtp[22053]: 41EC188422: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.22.27]:25, delay=0.14, delays=0.02/0.02/0.08/0.02, dsn=5.1.1, status=bounced (host gmail-smtp-in.l.google.com[74.125.22.27] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1  https://support.google.com/mail/?p=NoSuchUser o9si6308017qtf.199 - gsmtp (in reply to RCPT TO command))
Jan 12 10:33:57 dv4 postfix/cleanup[22051]: 633F488423: message-id=<[email protected]>
Jan 12 10:33:57 dv4 postfix/bounce[22055]: 41EC188422: sender non-delivery notification: 633F488423
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 633F488423: from=<>, size=2906, nrcpt=1 (queue active)
Jan 12 10:33:57 dv4 postfix/cleanup[22051]: 63A9B88424: message-id=<[email protected]>
Jan 12 10:33:57 dv4 postfix/bounce[22055]: 41EC188422: postmaster non-delivery notification: 63A9B88424
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 63A9B88424: from=<[email protected]>, size=2497, nrcpt=1 (queue active)
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 41EC188422: removed
Jan 12 10:33:57 dv4 postfix/smtp[22056]: 633F488423: to=<[email protected]>, relay=none, delay=0.04, delays=0/0.01/0.03/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=domaindoesnotexistxxxx.com type=A: Host not found)
Jan 12 10:33:57 dv4 postfix/cleanup[22051]: 6DFA788422: message-id=<[email protected]>
Jan 12 10:33:57 dv4 postfix/bounce[22055]: 633F488423: postmaster non-delivery notification: 6DFA788422
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 6DFA788422: from=<[email protected]>, size=4530, nrcpt=1 (queue active)
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 633F488423: removed
Jan 12 10:33:57 dv4 postfix/smtp[22053]: 63A9B88424: to=<[email protected]>, relay=mxa.mailgun.org[52.200.14.61]:25, delay=0.15, delays=0/0/0.06/0.09, dsn=2.0.0, status=sent (250 Great success)
Jan 12 10:33:57 dv4 postfix/qmgr[22041]: 63A9B88424: removed
Jan 12 10:33:58 dv4 postfix/smtp[22057]: 6DFA788422: to=<[email protected]>, relay=mxb.mailgun.org[104.130.177.23]:25, delay=0.55, delays=0/0.01/0.03/0.51, dsn=2.0.0, status=sent (250 Great success)
Jan 12 10:33:58 dv4 postfix/qmgr[22041]: 6DFA788422: removed

Why is it sending the bounce notifications to both "[email protected]" and "[email protected]" ?
 
May I ask a question that may only be *slightly* related to this particular topic at-hand?

I actually *do* want to be able to receive e-mails sent from Contact forms on pages of my given .com (that is on a VPS, and for which I am administering with Plesk admin Panel) . But for the life of me, I cannot seem to get e-mail to reach *any* e-mail box from Successful submits of forms on my pages of my website. I'm new to VPS and Plesk, and here are some screens of some of my options:

https://www.ktravisj.com/scrn1.png
https://www.ktravisj.com/scrn2.png
https://www.ktravisj.com/scrn3.png
https://www.ktravisj.com/scrn4.png
https://www.ktravisj.com/scrn5.png

I know I'm probably missing something or doing something elementary wrong, here; but I'd welcome any guidance I can get, on this. I know that users are successfully landing on "Success" pages in their browsers when they attempt to "Submit" the Contact forms, but it just never lands in any sort of e-mail box to which I configure it.
 
Back
Top