

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in net.sourceforge.lists.courier-usersRe: [courier-users] maildrop question| From | Sent On | Attachments |
|---|---|---|
| Andrey Ananin | May 23, 2007 12:58 am | |
| Milan Obuch | May 23, 2007 1:45 am | |
| mouss | May 26, 2007 12:48 pm | |
| fjar Uno al día | May 30, 2007 1:01 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [courier-users] maildrop question | Actions... |
|---|---|---|
| From: | Milan Obuch (cour...@dino.sk) | |
| Date: | May 23, 2007 1:45:49 am | |
| List: | net.sourceforge.lists.courier-users | |
On Wednesday 23 May 2007, Andrey Ananin wrote:
Hello everyone,
I have one question about maildroprc.
I've installed courier 0.54.0 on FreeBSD 6.2 from ports and successfully configured it for accepting mails.
You are welcome. This list is for question abour courier usage. Should any FreeBSD specific question arise, please report it to port maintainer (it's me, but use maintainer address from port's Makefile to do so).
The problem is that if home directory for user doesn't exist I receive the bounce message ""511 maildrop: Unable to change to home directory."
But I want to automatically create folder and Maildir for user if it doesn't exist.
The message says all. It is not possible to change to directory if it does not exist. This issue has been discussed over and over. Home folder must exist and Maildir must be created before anything could be accepted for given address. Homedir/Maildir creation is administrator's job, not server's (or provisioning system should ensure their existence). Checking for homedir existence on every mail arrival and creating it on first mail is at least a bit ugly. Script creating authentication record in whatever auth database you are using should create proper directory structure at the same time.
I hear that it is possible to do it with the maildroprc file, so I created this file in /usr/local/etc/courier/ with the following content:
[ snip ]
May be I'm doing something wrong?
Well, when homedir does not exist, maildrop is not invoked at all no matter what's in. Error message comes first and processing stops.
And it seems that this file is totally ignored by maildrop because even I add `echo test>/root/test.txt` at the beginning of this file I can't see test.txt file after sending the message.
This just confirms statement above.
Just do it the right way - one time job like directory structure creation or mailbox initialisation should be done outside of mail processing loop (simple optimisation, but often forgotten). Write a script to do it. Try to fit it into your admin framework. Ask question if necessary. And last, but most important, enjoy courier - it's simply great.
Regards, Milan
-- This address is used only for mailing list response. Do not send any personal messages to it, use milan in address instead.







