You know what's been really missing these days??
You got it... a quality
mail server blog!
I had pondered this concept for quite some time...
Virtual Mailboxes.
Mailboxes for users that don't exist. However, when mail arrives at the server, the mailbox is automagically created and the mail is delivered accordingly.
Months ago I had this working... a bit.. but not the way I had wanted.
Example: (I had it working like this)
a. The MX record for
abc.com points to my mail server.
b. I have a '
Virtual Domain' setup for
abc.com.
c. If an email for
somebody@abc.com is received, create a mailbox called:
/abc.com/somebodyMy two issues:
1. How to retrieve this mail when there is no username/password associated to the mail that just arrived.
2. The mail format didn't match the /Maildir format that I prefer.
So I do some reading (which we know I hate) and find out that I can link the newly created mailbox to a
MySQL database.
That database would include:
a. The username/password for authentication
b. The absolute path to the mailbox
c. Any other fancy alias' or forwarding that I might want to use
I find some FAQs and get that database setup.
....... and that's where I left it...... for
MONTHS(insert today's renewed interest in the subject)I don't know a thing about
MySQL, so I decide to focus on problem #2.
(The mail format didn't match the /Maildir format that I prefer).
So I
google the hell out of the topic.
I eventually come across the Postfix
virtual domain mail delivery agent, right off the Postfix website.
**Keep in mind, I had read this document 30 - 40 times looking for this answer**
After a quick glance I find the following:
QMAIL MAILDIR FORMAT
When the mailbox location ends in /, the message is deliv-
ered in qmail maildir format. This format stores one mes-
sage per file.
Meaning...
I had been telling the server to create folders as such:
/abc.com/somebody Had I told the server to add a
/ after the username, I would have got the result I was looking for.
We see in the undesired result: /abc.com/somebody
-rw------- 1 mail mail 953 Oct 20 21:40 /abc.com/somebody
Now we see the desired result: /abc.com/somebody
/drwx------ 2 mail mail 4096 Oct 20 20:29 cur
drwx------ 2 mail mail 4096 Oct 20 20:30 new
drwx------ 2 mail mail 4096 Oct 20 20:30 tmp
Imagine.. I gave up on this when the only thing I was missing was a
/All that's left is to somehow figure out that damn
MySQL and I'll be getting all the chicks!!
[addendum]Last night I try and get the mail for
abc.com to flow the same as as my other domains.
(Received - Scanned - Transported to Destination Server)
I get this damn error:
status=deferred (maildir delivery failed: create
/abc.com/somebody/tmp/1098329481.P932.abc.com: Permission denied)
I check the user/file permissions on the destination server... THE EXACT FUCKING SAME, yet I'm still getting this permission denied error.
So I query the land of Internet nerds, and in typical fashion I get answers like "
WHAT YOU MEAN YOU DON'T KNOW HOW TO FIX IT" with no actual solution posted anywhere.
...fuckin' nerds
[addendum]Sitting in the waiting room, just before surgery, the answer finally came to me.
Looking back..
drwx------ 2 mail mail 4096 Oct 20 20:29 cur
drwx------ 2 mail mail 4096 Oct 20 20:30 new
drwx------ 2 mail mail 4096 Oct 20 20:30 tmp
The settings are still mirrored, but who is to say that the
UID and
GID for the user/group '
mail' is the same on both servers?
After a quick look see, wouldn't you know... that's exactly what it was.
I change the settings in Postfix to match the
UID/GID on the destination server and BINGO BANGO its working perfectly.
All I needed was someone to discuss it with and I finally came up with the answer.
All bow to the power of discussion.