- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restrict who can send mail to a specific user
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 12:46 PM
тАО11-15-2001 12:46 PM
Restrict who can send mail to a specific user
Can this be done?
Thanks in advance,
mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 12:56 PM
тАО11-15-2001 12:56 PM
Re: Restrict who can send mail to a specific user
You may have to generate a new sendmail.cf file. You can do this by running the /usr/newconfig/etc/mail/cf/cf/gen_cf script to add in the specific function you are looking for.
Good Luck,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 12:59 PM
тАО11-15-2001 12:59 PM
Re: Restrict who can send mail to a specific user
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2001 02:51 PM
тАО11-15-2001 02:51 PM
Re: Restrict who can send mail to a specific user
The easiest way (and it doesn't involve messing around with sendmail.cf) is to install procmail and use a rule in .procmailrc + a suitable .forward file. You can download procmail from:
http://hpux.ee.ualberta.ca/hppd/hpux/Networking/Mail/procmail-3.21/
Suppose your user is called foobar. Go to foobar's home directory and create a .forward file like:
"|exec /opt/procmail/bin/procmail"
(please check the correct location for procmail)
Next, create a .procmailrc file with the following contents:
:0:
* FROM .*unwanted_user@unwanted_domain.com
/dev/null
Substitute unwanted_user and unwanted_domain for the appropriate ones.
All messages coming from these users will be completely discarded. Repeat the entire block if you want to add another 'unwanted' user.
Procmail is very powerful. Make sure you consult procmail's documentation (man procmail, man procmailrc and man procmailex) if you want to do something more complex (like bouncing the message to the sender with an error indication).
Regards,
Paga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-20-2001 03:09 AM
тАО11-20-2001 03:09 AM
Re: Restrict who can send mail to a specific user
It is often easier not to say what you do not want, but to say what you do want.
This is 'strangely' enough done most effectively with the "!" (not) operator, i.e. saying if it is not something you want, then you don't want it.
Confusing/confused? Let me give a simple example from my .procmailrc:
* !(^To:.*|^Cc:.*|^From:.*)(franks@support|franks@neth|frank_slootweg|franks.$|news.$|tineke.slootweg)
This mean that if a message is NOT To: or Cc: or From: any of the listed names, I don't want it. So, for *example*, mail which is not *addressed* to me, but is *sent* to me, gets dropped. This takes care of most 'spam' (UCE).
procmail can do anything you like with the "I don't want it" category, i.e. drop it, file it, return it, return an error, shutdown the system :-), whatever.