Restricting emails to particular domain name


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Restricting emails to particular domain name
# 1  
Old 12-11-2012
Restricting emails to particular domain name

Hello,

I need to restrict the mails going from any codes to a particular domain.

For example - No mail from any code should go to any email address with domain as abc.com - example - xyz@abc.com

Do we have any way to do it?

Thanks
# 2  
Old 12-11-2012
You want only a single domain to be allowed when email is sent running on the unix box?

Assuming you are using sendmail --
sendmail is sometimes painful to deal with it has a configuration file, Eric Allman wrote a book on how to configure sendmail. Bryan Costales rewrote the 4th ed:

sendmail, 4th Edition: Bryan Costales, Claus Assmann, George Jansen, Gregory Neil Shapiro: 9780596510299: Amazon.com: Books

Alternatively consider doing this since you have only one.
Put an entry in /etc/hosts to redirect abc.com to localhost ( or to any other machine you want). The email will end up in the ~/dead.letter file for the user running the code.

This will block any email originating on the UNIX box from going to abc.com
# 3  
Old 12-11-2012
Hi Jim,

Thanks for the reply.

The actual requirement is to restrict the mails going to production users from
Non production server.

If the code is running in production server, then the mail should go to where it is intended, but if the code is running in non production environment then the mail should not go the intended email address. It should not go either or if we can direct it to one particular mail box.

Email aliasing is what I tried to use, but what about the new email addresses coming tomorrow. Everytime I need to alias them. That's why I thought to restrict the domain.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Restricting use of su - (Solaris 11)

OK. So I can prevent remote systems from logging in as root by uncommenting the CONSOLE entry /etc/default/login. BUT, is there a way to stop su - (when already logged in as own user)? The way we do it is to set up sudoers so users who need access can do sudo su - (2 Replies)
Discussion started by: psychocandy
2 Replies

2. Shell Programming and Scripting

restricting users

how can i make my users to not use particular commands in the network like:wall....... pl z help me regarding this (1 Reply)
Discussion started by: yashwanthguru
1 Replies

3. UNIX for Dummies Questions & Answers

Restricting SFTP access

Hello, I am using MySecureShell to chroot all sftp accesses. The problem that I have is that my boss does not want root to be able to use sftp. Root should still be able to ssh. Any ideas? (2 Replies)
Discussion started by: mojoman
2 Replies

4. Windows & DOS: Issues & Discussions

How to: Linux BOX in Windows Domain (w/out joining the domain)

Dear Expert, i have linux box that is running in the windows domain, BUT did not being a member of the domain. as I am not the System Administrator so I have no control on the server in the network, such as modify dns entry , add the linux box in AD and domain record and so on that relevant. ... (2 Replies)
Discussion started by: regmaster
2 Replies

5. UNIX for Dummies Questions & Answers

Restricting SSH usage

Hello, For one of our servers, we have had people trying to illegally loggon using the ssh service. My manager has asked me to restrict ssh access to users in our internal network but close ssh access to the "outside" world. Could someone at the very least point me to some resources on the... (7 Replies)
Discussion started by: mojoman
7 Replies

6. AIX

sendmail only sends emails to its own domain

Hi, folks! I have a problem with an AIX 5.3 server running sendmail where it is able to send messages within its own domain just fine. This is being used for a web email service portion of a web site. However, when it attempts to send email to any other domain -- i.e., hotmail.com -- it... (3 Replies)
Discussion started by: jjwood64
3 Replies

7. Solaris

restricting access

Hi All, I'm on Solaris 8, I need to provide Read-only access to a user to 2 directories only. Using rsh (restricted shell) as the user's login shell, I can restrict the user's access to a certain directory only, but how can I set in such a way that the user can access only the 2 directories... (4 Replies)
Discussion started by: max_min
4 Replies

8. Cybersecurity

Restricting Telnet to IPs

Dear Experts, Is there a way to restrict telnet to specific IPs Thanks (6 Replies)
Discussion started by: geraldwilson
6 Replies

9. UNIX for Dummies Questions & Answers

Restricting access

I need to create a user that only has access to 1 directory (e.g. /vol/mita/test). The user needs to be able to rsh into that directory to run a script. The user should not be able to navigate to any other directories above /vol/mita/test. Any help would be appreciated! (4 Replies)
Discussion started by: ngagne
4 Replies

10. Cybersecurity

restricting access...

restricted access... Hi I need to restrict users shell access to only $HOME under /home for each user. I don't want them getting out of their own directories. From what I understand chroot is something I could use, but I want to avoid this since it involves creating symbolic links to a number... (9 Replies)
Discussion started by: alwayslearningunix
9 Replies
Login or Register to Ask a Question