• 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

Mail Handler at "before-remote" is not getting the whole mail

BoMbY

New Pleskian
Hi all,

yesterday I tried to implement a simple Plesk Mail Handler (as described in this API reference) for a Sender Rewriting Scheme.

Unfortunately the handler at the hook "before-remote" is not getting the whole mail, and any changes to the mail seem to be ignored. All I'm getting is something like this:

Code:
Received: from my.host.invalid (localhost [127.0.0.1])
	by my.host.invalid (Postfix) with ESMTP id 3AB84CC303DC
	for <[my_name]@googlemail.com>; Sun, 10 Apr 2011 18:51:43 +0200 (CEST)
Message-Id: <[email protected]>
Date: Sun, 10 Apr 2011 18:51:43 +0200 (CEST)
From: [my_name]@gmx.net
To: undisclosed-recipients:;

The other hooking points work like described in the reference (mail is written completely to STDIN, and I write it back to STDOUT, including my changes). The funny thing is, the default DKIM handlers from Parallels seem to work at this point. Are they using some trick? Or is this behavior only occurring because I'm using Postfix and not Qmail?

I think it might have to do something with this part of the configuration in the Postfix master.cf:

Code:
plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=/usr/lib/plesk-9.0/postfix-local -f ${sender} -d ${recipient} -p /var/qmail/mailnames
127.0.0.1:10025 inet n n n - - spawn user=mhandlers-user argv=/usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10027 before-queue
127.0.0.1:10026 inet n - - - - smtpd  -o smtpd_client_restrictions=  -o smtpd_helo_restrictions=  -o smtpd_sender_restrictions=  -o smtpd_recipient_restrictions=permit_mynetworks,reject  -o smtpd_data_restrictions=  -o receive_override_options=no_unknown_recipient_checks
127.0.0.1:10027 inet n n n - - spawn user=mhandlers-user argv=/usr/lib/plesk-9.0/postfix-queue 127.0.0.1 10026 before-remote
plesk_saslauthd unix y y y - 1 plesk_saslauthd status=5 listen=6 dbpath=/plesk/passwd.db

But honestly, I've no clue about how this config works, and how I could get what I need - or if this is just a coincidence with the naming.

Any hints would be appreciated ...

Thanks and Regards,
BoMbY
 
Back
Top