I have a server running Plesk 8 and qmail as the MTA.
Now I switched one domain from multiple POP accounts to only one catchall because the mail app at the customers side (Tobit David) has the ability to deliver the mails to the right user by reading a specific header field (can be configured by the admin - that's me ;)
Most MTA's add the original recipient to the header already (mostly the field is called X-Delivered-To
) and pleak does this, too. The field is called `Deliviered-To´.
However, there is on problem. Let's say I have a user called John Doe with the email address john.doe@domain.com
. In the mail header the Deliviered-To
field does not contain john.doe@domain.com
but 29-john.doe@domain.com
.
I believe that has something to do with the customer or domain I created in Plesk, since that number is unique for all recipients from this domain, but different for other domains.
Is there a way to tell qmail to add another header value with the original recipient? Or modify the current value of Deliviered-To
?
-
Fixed! I found this link where someone had exactly the same problem:
http://shyper.net/plesk-x-delivered-to/
Quick solution
- Create the folder
/usr/local/psa/handlers/user-handlers/
Create a file
/usr/local/psa/handlers/user-handlers/xdeliveredto
with this content#!/bin/bash echo "X-Delivered-To: ${3}" cat
Make it executable
chmod +x /usr/local/psa/handlers/user-handlers/xdeliveredto
Register this file as a handler in plesk
/usr/local/psa/admin/sbin/mailmng \ --add-handler --handler-name xdeliveredto --handler-type global \ --executable /usr/local/psa/handlers/user-handlers/xdeliveredto \ --context xdeliveredto --hook before-local --priority 30
???
- Profit!
From SchlaWiener - Create the folder
0 comments:
Post a Comment