6 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Bouncing a messag...
FromSent OnAttachments
Bowie BaileyJan 27, 2006 8:25 am 
Bowie BaileyJan 27, 2006 10:05 am 
Sam VarshavchikJan 27, 2006 3:30 pm 
Bowie BaileyJan 30, 2006 12:48 pm 
Jay LeeJan 30, 2006 12:58 pm 
Sam VarshavchikJan 30, 2006 3:31 pm 
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: [courier-users] Bouncing a message from maildropActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Jan 27, 2006 3:30:42 pm
List:net.sourceforge.lists.courier-users

Bowie Bailey writes:

Bowie Bailey wrote:

I have received a request from one of my users to block emails to their domain from a particular address. Since I don't want to block the address from the entire server, I think the place to do it is from maildrop. What I can't figure out is how to direct maildrop to bounce the message.

What command can I give to maildrop to make it send a dsn back to the sender? And can I specify the error message?

To answer my own question, I was able to do it like this:

LCSENDER=tolower($SENDER) if ( $LCSENDER eq "bloc@example.com" ) { echo "This account is not accepting mail from $SENDER" EXITCODE=64 exit }

I was going to do a recipient rule and put it in /etc/courier/maildroprc, but I decided to put it in the individual user's .mailfilter files instead so that any errors would be limited to that one domain.

The rule for maildroprc would have looked like this:

LCRECIP=tolower($RECIPIENT) LCSENDER=tolower($SENDER) if ( $LCRECIP =~ /@mydomain\.com/ && $LCSENDER eq "bloc@example.com" ) { echo "This account is not accepting mail from $SENDER" EXITCODE=64 exit }

Does anyone see any problems with this?

No, that's going to do exactly what you think. The thing is that anyone can send an E-mail using anyone's return address, to a malicious entity with advance knowledge of this can use you to flood this address with bounces.

This is exactly what rcptfilter is designed to do.