On Tue, Jul 19, 2016 at 11:54:29AM -0400, Warren H. Prince wrote:
> Our business has many clients, each of which is assigned a number.  
> Using that number, we assign an email address to receive and store 
> email communications for that client.  So, for example 
> 12...@mydomain.com is received by a wildcard alias and deposited 
> into one email account for all aliases.  I have a ruby routine that

Ouch, a wildcard was a bad idea.  Better would have been to make a 
system user, "client" for example, and to invoke a script from the 
~client/.forward file.  Set recipient_delimiter (a common choice 
would be "recipient_delimiter=+") and send your mail to 
client+12...@example.com (where "example.com" is a domain listed in 
$mydestination.)

See postconf.5.html#recipient_delimiter and also the aliases(5) and 
local(8) manuals about .forward files and how to pipe mail to a 
script.  Your script will see the "12345" part in its environment, 
specifically as "$EXTENSION".

> then grabs each new email, filters for unknown senders or spam, 
> parses the headers to find the number of the original recipient, 
> and processes the email from there.

Ouch again.  Mail routing is not controlled by headers.  That's your 
problem: you assumed otherwise.

> Anyone have any suggestions?

It will take some work to do this all again, the right way, but you 
should be able to copy over all the existing mail folders to the new 
"client" user.  Don't forget to chown all the mail!
-- 
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to