procmail
[Top] [All Lists]

Re: Email filter

2000-11-30 02:54:08
On Mon, Nov 27, 2000 at 06:27:26PM +0530, Jayanta wrote:
A) How to set up a filter for all(_at_)mydomain(_dot_)com so that unsolicited 
emails
from outside do not land up. The originating email address should be from an
allowed  group/email account.
Other people sending emails to this address should be bounced
back with appropiate message.

I presume "all(_at_)mydomain(_dot_)com" is a sendmail alias to forward a copy 
of a
message to everyone in your domain? (ie: CEO / other approved personell send
notices to all(_at_)mydomain(_dot_)com and a copy is sent to all employees / 
users).
Simple enough. Set up a procmailrc for all(_at_)mydomain(_dot_)com (either via
/etc/procmailrcs, or in /etc/mail/aliases) with something like

   :0
   * ^From:.*[user1|user2|user3](_at_)mydomain\(_dot_)com
   ! all-outgoing(_at_)mydomain(_dot_)com

   (insert autoreply recipe from man procmailex here)

Then make all-outgoing a sendmail alias that acutally goes to all your
recipients (probably calling it something sufficiently obscure so someone
can't just guess it.)
This means you've really got security by obscurity, but it works.
Or you could set up Majordomo or another list server software, using it's
restriction functions to restrict who can send mail to that list.

B) How to restrict sender to send mail with attachments to a particular
account. Peolpe sending attachments should get their emails bounced with
appropiate message and guidance to contact their local support centre and
get a proper email address to send attachments to.

There's really no efficient way to do this. My understanding from reading the
various FAQs and this list is that filtering attachments via procmail is
not a simple task. Via Sendmail the most you can do is limit the size of email
the server will accept, and this can't be set by recipient address.

-- 
Andrew Edelstein                http://andrew.pure-chaos.com

"I find that alcohol, when taken in sufficient quantities, produces all the
effects of drunkenness."
                                Oscar Wilde
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Email filter, Jayanta
    • Re: Email filter, Andrew Edelstein <=