• 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

Postfix bounces emails when sending

J

JouniN

Guest
Hi,

I stumbled into this problem when trying to solve why one of our webhosting users could not send emails with PHP mail() -function. I noticed that the domain had DNS service on with invalid settings (dns hosting is not ours). First I assumed that was the problem since MX-records pointed wrong. I removed DNS service from the domain and even removed nameservers from DNS settings tab but no luck.

When user tries to send email via www by using contactform (just a plain php mail form) I get this in my "psa/var/log/maillog":

Mar 24 08:31:39 machine before-remote[8602]: check handlers for addr: [email protected]omain
Mar 24 08:31:39 machine postfix/smtp[8505]: 5EA1148500: to=<[email protected]>, orig_to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10027, delay=0.1, delays=0.01/0/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6A632484FF)
Mar 24 08:31:39 machine postfix/local[8516]: 6A632484FF: to=<[email protected]>, relay=local, delay=0.05, delays=0.04/0/0/0.01, dsn=5.2.1, status=bounced (This address no longer accepts mail. )

For some reason the emails originally sent to [email protected] get redirected to _plesk_bounce_domain.tld -address. This goes for all email addresses for this domain.

- there are no email accounts set up for this domain in the system
- dns service is switched off
- I've tried removing the domain totally from plesk and recreating it
 
Try to apply attached file. Create backup of original before replacing.

/usr/local/psa/admin/plib/class.DSMail.php

And update thread with results please.
 

Attachments

  • class.DSMail.php.zip
    14.7 KB · Views: 4
Hi Igor, thx for the reply but unfortunately it did not help. Mails for the domain are still sent to _plesk_bounce -address.
 
Hi,

I stumbled upon another web client with same problem. All mails sent from php form are bounced back from _plesk_bounce address with the same error message.
 
Heya,

I figured it out a while back and ofc I forgot to post it here. This issue can be fixed by changing the domains mail settings. Navigate to:
Domain in question -> Mail accounts -> mail settings
and there you have the "email to nonexistent user" -attribute

The domains with this problem had selected "bounce with message: yadda yadda yadda". Change that to "reject" and save the change and emails get sent forward to the correct servers.

Hope this will help. :)
 
Thanks that solved the problem for me, too.

Didn't expect it to be this easy! :)
 
Back
Top