Solved

Restriction of accepting mail - Per email address

Posted on 2004-09-13
4
172 Views
Last Modified: 2013-12-15
We have an email alias: allnsw@mydomain.com.au, which forwards mail to every user in my department.

We are having problem with spam being sent to this address.

I want to restrict this email alias so that it will only receive and forward email from an internal email address or internal IP address: (eg. somebody@mydomain.com.au and/or 192.168.1.1-254)

Is this possible?

I am running Redhat 9.0 and Sendmail

Let me know if you need any further information. Thanks everyone.
0
Comment
Question by:Jon_b123
  • 2
  • 2
4 Comments
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
You have a few options:

1. write a filter script to discard all the email from the other domain, see:
    http:Q_21087571.html
    to learn how.

2. setup a private mail server (only have local DNS), and create an email aliase in the
    box to forward the mail to your users. Or setup another mailchine to run sendmail
    only acceipt the email from your domain. ( /etc/mail/access )

     Please have a look at:
    http://www.faqs.org/docs/linux_network/x15291.html
0
 

Author Comment

by:Jon_b123
Comment Utility
Thanks yuzh,

I unfortunately don't have the in-depth knowledge required to customize your mentioned script to perform my task.

I guess I will have to go for your second suggestion, although it's not really feasible just for one alias.

I may just have to put up with the spam. (I am running spamassassin but cannot turn up the sensitivity as it loses legitimate email).

I will check back tomorrow and see if any other suggestions are made. If not I will award you the points.

Thanks again yuzh!
0
 
LVL 38

Accepted Solution

by:
yuzh earned 500 total points
Comment Utility

>>>I unfortunately don't have the in-depth knowledge required to customize your mentioned script to perform my task.

Do you have some experiences with shell script (ksh/sh)? If you can read sh/ksh script, I
can give you a hand to modify the script to make it work for you (since you are from .au)

It is not that hard to modify it, in my autoreply script, it alread save the incoming script in

$TEMP (/home/${2}/forward.tmp) file, all you need to do is to check where the email
come from:

IF the email comes from your domain THEN
    forward to the users
ELSE
    donothing
ENDIF

0
 

Author Comment

by:Jon_b123
Comment Utility
Unfortunately not much experience at all.. I guess I'll just have to change the alias name as a work-around.

Thanks anyway yuzh, I will award points for trying.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now