At 20:25 2001-11-27 +0200, Angelo wrote:
There is a situation came up which needs a mail account to be created to
which only a part of people to be able to "see" it and send mails to it...
You could use procmail on the local account and reject messages
Specifficly there are the users of the inside network(local network -lan)
and the users of the outside network (all the other users of the internet).
I want to setup a mail account that only users of the inside network use
it and can send to it.Users of the outside network cannot send to it or
generaly use it.
The mail server is set to use sendmail.I've heard that this is possible
through procmail....
is this true?And how could i "tell" sendmail.cf to "read" the rule i set
to procmail.cf for this speciffic mailbox??
Sendmail doesn't read the procmail rules -- it passes the message to
procmail for LOCAL DELIVERY. Either via Mlocal, or via a .forward file you
need to create (if procmail isn't configured as the LDA).
You could just set up the local account and create a .procmailrc for it
which rejects messages which are not FROM the local domain. This isn't
based on origin IP, but perhaps your local users are expected to mail from
the local domain?
:0
* ! ^From:.*@(somehost\.|)ourdomain\.tld
{
EXITCODE=67 # EX_NOUSER, see /usr/include/sysexits.h
HOST=lutefisk.ourdomain.tld. # illegal hostname, should
# stop processing immediatley.
}
Anything NOT caught by this rule would continue to be delivered to the
default mailbox on that account.
There are some config hacks you can do in sendmail to invoke external
processes to evaluate things, but if you're not already familiar with
sendmail, now's not the time to start mucking with the cf file trying to
accomplish this (nor is the procmail list really the place to discuss
sendmail configuration). There is quite a bit of vodoo going on in the
sendmail.cf file.
I mean what scripting i could do in sendmail.cf file in order to
"communicate" with procmail.cf file and understand that users that only
come from an ip like "10.0.0..." can send a msg to this mail account
otherwise users that come from the outside network and have an ip like
210.155.12.... get an error msg (like "user not found")
You could write some sendmail rules similar to the access database which
would permit only a certain class of users to send mail through to an
address. Not the scope of this list however. See
<http://www.sendmail.org> and <news://comp.mail.sendmail>
If you want to do IP stuff from within procmail, check out the list
archives for rules pertaining to "RBL"s (Realtime BlackLists). You could
modify such a rulset to compare against a local IP to permit the message to
be delivered.
I would really appreciate recieving a solution from you...(my mail:
<mailto:shuttle(_at_)fdsweb(_dot_)com>shuttle(_at_)fdsweb(_dot_)com)
thank you in advance!
I take it you provided your email address WITHIN the message (even though
your address conveniently appears in the From: line of your message)
because you want an offlist copy sent to you? If so, you should explicitly
request that. I'm cc'ing you on this list followup because I've
interpreted the above as such a request. Please though, do not follow up
to me offlist.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail