• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Restriction of accepting mail - Per email address

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
Jon_b123
Asked:
Jon_b123
  • 2
  • 2
1 Solution
 
yuzhCommented:
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
 
Jon_b123Author Commented:
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
 
yuzhCommented:

>>>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
 
Jon_b123Author Commented:
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now