0

I used to pipe incoming emails using:

|/path/to/php/script in .forward file at /home folder.

But the actual system I'm working on is based on Maìldir instead MBOX. So that solution does not work.

I have no clue how to pipe emails correctly to PHP.

3
  • there is a mail server called "Maìldir" ? got a link?
    – Dagon
    Mar 2, 2011 at 20:02
  • maildir is a format for storing email server-side, usually used by IMAP servers.
    – Marc B
    Mar 2, 2011 at 20:08
  • ah, that explains it.
    – Dagon
    Mar 2, 2011 at 20:47

2 Answers 2

0

It should be similar, what are you trying to accomplish? My server is in Maildir format, and I have something similar to what you are doing and it works fine. It shouldn't matter if you're using Maildir or MBOX format, all that is handled by the mail server.

4
  • Thanks, luckytaxi. The email box at maildir is different from my linux username. So when I put a .forward file at Home, nothing happens. I can list all my emails at /home/username/mail, but they are stuck there. I can't forward to anywhere.
    – Andre Resende
    Mar 2, 2011 at 20:21
  • So are you trying to forward an email or do something else with it using PHp?
    – sdot257
    Mar 2, 2011 at 20:29
  • Yes. I followed the tutorial at evolt.org/incoming_mail_and_php using Exim configurations (my MTA is Exim). But it just works if linux-username is email username.
    – Andre Resende
    Mar 2, 2011 at 20:34
  • Ohhh i see now, that's the same tutorial I tried. Do what grawity said, put it inside /etc/aliases. That way, an email comes in and your MTA immediately knows what to do with it.
    – sdot257
    Mar 2, 2011 at 21:46
0

|/path/to/script should work just fine. Forwarding, whether using ~/.forward or procmail, is done before the mail system gets to touch your Maildirs.


In case of "virtual mailboxes", /etc/aliases can do the same thing.

foouser: |/path/to/script

You must log in to answer this question.