I’m running Postfix version 2.10.2 using dovecot, mysql, and postfixadmin.

The single server receives email for main.com, client.com and client.main.com.  
main.com has only one mailbox, m...@main.com.  All mail for client.main.com is 
aliased to m...@main.com and then parsed by a ruby script to determine the 
mailbox and the subdomain (client in my example above, but there could be many 
different “clients”).  Usually the the mailbox is a number that refers to a 
customer number.  So, we receive email for 1...@client.main.com, it is 
delivered to m...@main.com and my script identifies customer 1234 for business 
client, processing the email accordingly.  

Client.com has several employees, and the server receives the email for all the 
employees at client with normal jsm...@client.com addresses.

This all works great

I want to set up an alias for resu...@client.com which will forward the mail to 
9...@client.main.com.  Any mail received will be forwarded to m...@main.com.  
Again, all works fine.  The problem is that when my script pulls the email from 
m...@main.com’s mailbox, the alias 9...@client.main.com is not preserved in the 
header, and I lose the ability to process the email by my script.  

Is there some way to preserve the full history of aliasing that the email 
passes through?

Reply via email to