Postfix & e-mail piping


#1

Can I access the postfix file for my account (make the assumption I cannot)

/etc/postfix/aliases

This is to setup e-mail piping, however I wonder if the following would work (like a cPanel server)

support@company.com: “|/full/path/to/parser.php”
sales@company.com: “|/full/path/to/parser.php”

Curious if anyone has got any ideas or suggestions on this?


#2

Make each of those email addresses a shell user, and then you can set up custom .procmailrc files in ~/support, ~/sales, etc. to pipe the mail as you describe. At least I think that works…


#3

Hi,
Thanks for the info but WHERE would I setup the ~/address?

Or is this setup in the ‘mail’ folder when I setup the address?


#4

I’m sorry, I gave the paths wrong before. It is not ~/support; I should have written /users/support – each of your email addresses will be a separate shell user. The process would be to make a new User from the control panel:
https://panel.dreamhost.com/index.cgi?tree=users.users

This creates a shell account, and then you can set up procmail using the ~/.procmailrc file so that mail delivered to that shell user is processed as you wish.

You might have difficulty setting up a shell account named “support,” or the other generic names you described, if those shell users are already taken or are reserved on your shared hosting machine. But you should at least be able to set up a “mydomainsupport” shell user (or something with a similarly unique name), and then you can use email aliases to send support@ to mydomainsupport@.