Many thanks to Nathan Conrad for showing me how it's done in procmail:

--install procmail
--add this line to /etc/postfix/main.cf :
'mailbox_command = /usr/bin/procmail'
--assuming we don't want to drop rejected mail to /dev/null, we should
make a /var/log/procmail dir and set up a rotation for .junk files
--make an /etc/procmailrc file:

:0
* ^To:[EMAIL PROTECTED]
{
:0
* !^From:[EMAIL PROTECTED]
/var/log/procmail/foo.junk
}

:0
* ^To:[EMAIL PROTECTED]
{
:0
* !^From:[EMAIL PROTECTED]
/var/log/procmail/baz.junk
}

--??
--Profit!

-CMP

On 7/22/06, Cristobal Palmer <[EMAIL PROTECTED]> wrote:
I have a site, bar.com, that will be receiving mail from clients such
as foo and baz who have their own domains, foo.com and baz.com.

I want to set things up such that mail to [EMAIL PROTECTED] only gets
through if it came from [EMAIL PROTECTED], likewise mail to [EMAIL PROTECTED] 
should
be dropped if it didn't come from [EMAIL PROTECTED]

What's the _best_ way to do this if I'm using postfix? Something
directly in postfix? Procmail?

TIA,
CMP

--
Cristobal M. Palmer
UNC-CH SILS Student
TriLUG Vice Chair
[EMAIL PROTECTED]
[EMAIL PROTECTED]
ils.unc.edu/~cmpalmer
"Television-free since 2003"

<tarheelcoxn> iank has trouble with English. his native language is Python
<iank> Yeah
<iank>   I'm forced
<iank>     To indent
<iank>   My sentences



--
Cristobal M. Palmer
UNC-CH SILS Student
TriLUG Vice Chair
[EMAIL PROTECTED]
[EMAIL PROTECTED]
ils.unc.edu/~cmpalmer
"Television-free since 2003"

<tarheelcoxn> iank has trouble with English. his native language is Python
<iank> Yeah
<iank>   I'm forced
<iank>     To indent
<iank>   My sentences
--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/

Reply via email to