3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Documention for maild...
FromSent OnAttachments
Amish MunshiNov 20, 2005 6:03 am 
Sam VarshavchikNov 20, 2005 6:42 am 
Amish MunshiNov 20, 2005 7:39 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Documention for maildrop filtering.Actions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Nov 20, 2005 6:42:42 am
List:net.sourceforge.lists.courier-maildrop

Amish Munshi writes:

Hello All,

I have some very trivial doubt for maildrop filtering for virtual domains hosting. Cant find any documentation related to the problem that I am facing.

I am configuring virutal hosting using maildrop.

Assume that I have 2 virtual domains, domain1.com and domain2.com

My current .mailfilter looks like this

if ( hasaddr("use@domain1.com") ) { cc "/home/vmail/domain1.com/user1/Maildir/" } if ( hasaddr("use@domain1.com") ) { cc "/home/vmail/domain1.com/user2/Maildir/" }

If I send a *single* mail to use@domain.com,use@domain1.com then multiple copies of the same mail gets copied to both users.

Right.

That's because it's a popular myth that the To: header contains the recipient's address.

It doesn't, and never did, since the Internet came into existence.

If you try to figure out the recipient's address based on the To: header, it will never work. The message's return address, and its recipient list, is carried separately by your mail server.

What you need to do is to set up your mail server so that it invokes maildrop with the -d option that specifies the message's recipient. Then you will need to set up maildrop using the Courier Authentication library to map recipient names to mail accounts. maildrop will receive the recipient's address from the -d option, look it up in the authlib, and deliver the message to the correct account.