1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Postfix bounces emails when sending

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by JouniN, Mar 24, 2010.

  1. JouniN

    JouniN Guest

    0
     
    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":

    For some reason the emails originally sent to user.email@domain.tld 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
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,242
    Location:
    Novosibirsk, Russia
    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.
     

    Attached Files:

  3. JouniN

    JouniN Guest

    0
     
    Hi Igor, thx for the reply but unfortunately it did not help. Mails for the domain are still sent to _plesk_bounce -address.
     
  4. JouniN

    JouniN Guest

    0
     
    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.
     
  5. GlennV

    GlennV Guest

    0
     
    The problem that Jouni reported still exists - when sending emails from PHP, they are bounced to _plesk_bounce_domain.tld@@localhost.localdomain.

    This goes for local and remote recipients - we are using the postfix MTA.

    Any ideas?
     
  6. JouniN

    JouniN Guest

    0
     
    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. :)
     
  7. GlennV

    GlennV Guest

    0
     
    Thanks that solved the problem for me, too.

    Didn't expect it to be this easy! :)
     
Loading...