At 10:56 21.02.00 +0100, you wrote:
Hi there once again,
I'm back with another question.
I am using sendmail out off SuSE-Linux 6.3. Is there a way to restrict the access to a local user's mailbox (e.g. john.doe@domain.edu)? The user should still be able to receive local mail (form everyone in domain.edu) but not mail from outside the whole net. As far as I have read in the sendmail documentation you only can deny all mail to the user (within /etc/mail/access).
1. Perhaps you can give the /etc/mail/virtusertable a try: add a line:
john.doe@domain.edu error:nouser User unknown
anyone outside from "domain.edu" will get back mail to the user "john.doe". But inside "domain.edu" you can reach "john.doe" when you mail to him as "john.doe@localhost". note: mail to "john.doe@1.2.3.4" (put in your IP) will reach him too, even from outside.
2. Perhaps you can write a little filter and put it in the /etc/aliases. Don't know. Someone any ideas?
One way to do it might be to write procmail rules if you're using procmail for the local mail delivery agent (which SuSE 6.3 appears to be doing). Do a man on procmail to get started, but you should be able to put rules in the /etc/procmailrc file to do anything you want with any mail that needs local delivery, including screening out non-local domains. I haven't used procmail for this specific purpose but I've used it for other email filtering tasks and it's really pretty powerful. Hope this helps, John Ritchie