On Friday 23 April 2004 03:07 pm, Derrick Ryalls <"Derrick Ryalls" 
> Pardon if this is a bit off topic, but here it goes...
> I have a couier-mta system that is running nicely on my 4.9 box, and
> I wanted to add some server side mailfilter for some of my email
> (like put mail from this list into a specific folder automatically).
> I enabled maildrop in courierd, but I am unconvinced it is working. 
> As a test, I put just this in my $HOME/.mailfilter file:
> to "./Maildir/.test"

It's been a long time since I set it up, so I don't remember the details 
of how I came up with it, but the rule I use for this list is:

if (/List-ID:.*freebsd-questions/:h)
  to $HOME/Maildir/.FreeBSD.questions

That's in the ".mailfilter" file in my home directory.

You also need a file named ".courier" in your home directory with the 
following delivery instruction in it:

| /usr/local/bin/maildrop

Which tells Courier to deliver your mail by handing it to the maildrop 

> And the file is owned by me, and rw only by me as required for
> maildrop. Even so, mail is not being redirected at all.  I have tried
> various thing (sorry didn't keep track) and searched around google to
> no avail.
> Does anyone know how to get maildrop working, and as a bonus have
> aliased acct names working as well?

I'm not sure what you mean by "aliased account names".  If you have a 
real mailbox named "james" and you want an alias 
"[EMAIL PROTECTED]" to be delivered to the "james" mailbox, 
then put something like

freddie:        james

in /usr/local/etc/courier/aliases/james (the name of the file isn't 
important, as long as it is in the right directory).  Once you've done 
that, run /usr/local/sbin/makealiases to rebuild your aliases database.  
It will take all the files in /usr/local/sbin/courier/aliases and build 
an alias database from them, so you can, for example, have an alias 
file for each user.  While you are at it, edit the "system" file in the 
aliases directory, and have mail for "root" sent somewhere useful.

Your other possibility for aliased accounts is the automatic aliasing 
that happens when you create an extended account name on the fly.  For 
example, if you have an account "[EMAIL PROTECTED]", then mail 
sent to "[EMAIL PROTECTED]" or 
"[EMAIL PROTECTED]" will  be delivered to the "godzilla" 
mailbox, or whereever you want it.  ANY address created by adding a 
hyphen and anything else to a real user's mailbox will be delivered as 
directed by that user's ".courier-default" file.  In the user's home 
directory, create a file called ".courier-default" and put delivery 
instructions in it, e.g. 

| /usr/local/bin/maildrop

if you want mail for automatic aliases to be run through the maildrop 
filter.  You can also change the extension character from a hyphen to 
whatever you want, but I don't remember how.  It might be a good idea 
to change it from the default to keep the spammers on their toes.

Because Courier is so flexible, there are other ways you could 
accomplish this.  There are, for example (IIRC), system defaults for 
the .courier and .courier-default files that you could set up, instead 
of doing it in each user's home directory.  Also, you could set up 
delivery instructions for some of the automatic aliases, e.g. if you 
want all mail for [EMAIL PROTECTED] to be forwarded 
to [EMAIL PROTECTED], then you could create a file 
".courier-questions" in godzilla's home directory with one line in it:


Or something like that.  I'm doing this from memory, and I may have some 
details wrong.  "man dot-courier" will get you lots and lots of 

Hope that at least provides useful clues.

- Bob

> -Derrick
[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to