• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Set/Change return path for Plesk Notifications emails

nilsringersma_nl

Basic Pleskian
Dear all,

I have a question about setting the return path ( envelope from ) for Plesk notification emails. I tried the documentation and KB but did not find any results. Please assist.

Context:
Plesk sends emails, i.e. when a backup task fails or completes with errors. Those emails are sent to a pre-defined address.

Problem:
On my Plesk server I'm using a relayfilter for Postfix in order to scan my outbound e-mails. The emails for the backup task are being blocked due to sender-verification which verifies the return-path / envelope from.

Log:
maillog.processed:Nov 23 21:49:06 vps-xxx-xxx postfix/smtp[23779]: 4842742187: to=<[email protected]>, relay=my.relayhost.com[11.222.33.444]:587, delay=0.14, delays=0.02/0.01/0.02/0.08, dsn=5.0.0, status=bounced (host my.relayhost.com[11.222.33.444] said: 550-Verification failed for <[email protected]> 550-Called: 555.66.77.88 550-Sent: RCPT TO:<[email protected]> 550-Response: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table 550 Invalid sender <[email protected]> (in reply to MAIL FROM command))

Question:
With my (edited) log above we can conclude that my relayhost is bouncing the message due to failing on sender verification. This is because the mailbox "[email protected]" does not exist. Also we can see the bounce itself fails, but thats logical.

I don't want to edit my servers hostname or create the mailbox. I rather want to force the return-path in Plesk configuration. ( similar to the way we can do this for a subscription's PHP-settings with the mail force extra params ).

- Is this possible?
- How can we do this?

Please note, just setting the "FROM header" is insufficient in this case because the relayhost needs to verify the existence of the return path.

Any tips or alternatives appreciated! :)
 
Hi

This is possible by setting the default from address for PHP that the Plesk server itself uses, on the latest version of Plesk Onyx it uses PHP 5.6, this is listed in the headers of any notification emails sent by Plesk.

You can modify the default PHP Return-Path / Envelope From address by editing the php.ini file that Plesk uses which is:

/usr/local/psa/admin/conf/php.ini

...and add the following line:

mail.force_extra_parameters = "[email protected]"

There is intentionally no space between '-f' and the email address. ... restart the Plesk service and try sending a notification email.

This does work and I have tested it on a dev server BUT I don't know if this would be overwritten with a Plesk update and it WILL affect all emails sent by the Plesk control panel.

If anything it might offer you a temporary solution until you can get an official response... :)

Thanks
Rob
 
Back
Top