Mailbox folders immutable?

software development

#1

As part of a mailing list application written in PHP, I want to retrieve bounced messages and remove the bad address from my MySQL database.

I can set up a user such that bounces are sent to that user’s mailbox, and I notice that new mail is kept in the directory “/home/username/Maildir/new”. It is a simple matter to read the files in that directory and parse them for the offending address.

Here’s the question: Is the path to the new-mail directory immutable? Or, is it a configuration of PostFix that may change over time?

–David B.
“greendavid”


#2

Well change is always possible, but it’s unlikely that this will change any time - as long as we’re using Maildir format, mail will be delivered to ~/Maildir/. It’s conceivable that we’d move to a system where the spool files would be located somewhere else (possibly somewhere not accessible to the user), but we’d definitely announce such a change well in advance.

I’d suggest having a quick read of the Maildir spec, especially if you’re planning on manipulating the Maildir files directly.
http://cr.yp.to/proto/maildir.html

Also, I certainly hope you don’t plan on having many bounced messages (ie your mailing list’s recipients should already be confirmed, and thus there should be very few bounces).


#3

Yes, absolutely the list will be totally opt-in, voluntary, confirmed-in-advance, and non-spam-in-any-way!

And I will check the Maildir docs, too. Thanks!

–David B.
“greendavid”