[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OBSD - imap server



It's my understanding that all you need to do is have Procmail deliver
to directories based on who the email message is to. So;

To do this you need to use MAILER(`procmail'), mailertable and access
along with a procmail script.

-Remove- the domain(s) you wish to use from your local domain list
You can use sendmail -bt and '$=w' to check

In access:
# accept messages for example.com
to:example.com    RELAY

In mailertable:
# deliver messages via procmail script
example.com    procmail:/etc/procmailrcs/example-com.rc

In /etc/procmailrcs/example-com.rc :

# base directory for example.com users' maildirs
BASEDIR=/var/mail/
# sender address
SENDER="$1"
# recipient address, strip domain part
RECIPIENT=`echo "$2" | sed 's/@example\.com$//`

# Remove dangerous characters in recipient's address

:0
* RECIPIENT ? ^^[a-z0-9]+^^
$BASEDIR/$RECIPIENT/

:0
$BASEDIR/CATCHALL/

# end

Use virtusertable to make sendmail knows which addresses in example.com
are "valid":

user1_(_at_)_example_(_dot_)_com !
user2_(_at_)_example_(_dot_)_com !
@example.com    error:nouser User unknown


That procmail script is untested. I looked into this a while back, but
decided to stick with system users for email accounts.


Isn't sendmail great?

Chris

On Tue, 2002-12-03 at 13:39, dreamwvr_(_at_)_dreamwvr_(_dot_)_com wrote:
> > I'm using Procmail to deliver mail to my users in Maildir format. So,
> > sendmail and Courier IMAP do infact get along with the help of a mailer
> > that delivers in Maildir.
> You know what? Your right. with procmail MDA. Let me put it this way.  
> Then how might one deliver to vhost setups like large 
> courier-imap /etc/userdb/domains.tlds ? Where there 
> is a single real account that contains all vdomains above all
> vaccounts/Maildirs. That would be appreciated. 
> 
> Best Regards,
> dreamwvr_(_at_)_dreamwvr_(_dot_)_com

-- 
Chris Cameron
UpNIX Internet Administrator
ardvark.upnix.net
saddlebags.upnix.net
--
http://www.upnix.com



Visit your host, monkey.org