This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to block (deny) email from ...

What is the easiest way to block all mails coming from a particular sender or domain. 
I'm receiving a lot of virus-containing messages from a particular person. The virusscanner intercepts them but it would be easier to just block this person.

Any ideas?


This thread was automatically locked due to age.
Parents
  • Hey,

    just wanted to keep the post alive. But I want to block emails for a special user (which does not exist) in our domain.
  • If using ASL 3.2+ you can add the domain to the SMTP Proxy Real Time Blackhole list. This will block the entire domain.
  • There is a way but it requires editing some files on ASL. Look under hacks and do some searches on BB I have seen the solution out there but am not sure where
  • Hi Lanman,
    sorry but I found nothing that could handle my problem.
    Here's what I want to do:
    Someone sends (mostly Spammers) Emails to user@mydomain.com and I want to block these mails. 
    The problem is that user@mydomain.com is not in the mime-text of the email that is received (because that are mostly Mailing-Lists). So the Expression filter does not block it. 
    I think I have to configure something in exim that this user is blocked.

    Does someone have an idea?
     
     [size="1"][ 18 October 2002, 10:28: Message edited by: SveN ][/size]
  • Hi all,
    Has anyone found an answer to the previous post?
    I would really like to know.

    Thanks
    Iccnt
  • To block users or domain edit this file:
    /var/chroot-smtp/etc/exim.blockedsenders

    format like:
    spammer@spam.com
    bigspamhole.org
    spammersrus.edu

    etc.
    Save the file and restart the SMTP daemon.
    /etc/rc.d/smtp restart
  • Yeah, but I think he is trying to block an internal user from using the smtp proxy.  The internal network has been specifically ALLOWED.  Is it possible to then can one user?
  • Simple, go threaten the user with hellfire unless they desist.  Go to their manager or something.
  • It does not seems not to work.

    There is a line in the file /etc/chroot-smtp/etc/exim.conf  that read sender_reject_recipients = @@lsearch*;/etc/exim.blocksenders

    At first sight this looks to point to the wrong directory. (there is no file /etc/exim.blockedsenders)

    Do I need to change the exi.conf file then?

    Thanks
  • No, you don't need to change the conf file.
    remember the path is chroot'ed.
  • I added a line domainnamesearchengine.net (because most of our spam now comes from a_user@domainnamesearchengine.net) in the exim.blockedsenders file and restarted the smtp but the spam-mail still comes in

    Is there a way to check what the result should be?

    Or do I have to use wildcards?

    Daniel
  • Is it blocksenders or blockedsenders ?

    Mine works most of the time but I still get mails in from some blocked domains on occasion.
    I think whats happening is the domains not resolving to the matching IP or something.  Unsure.  Some feedback from ASL staff would be appreciated on this.
    ie, what works and what won't work for blocking spam.  Thing is exiscan is written by a 3rd party...
Reply
  • Is it blocksenders or blockedsenders ?

    Mine works most of the time but I still get mails in from some blocked domains on occasion.
    I think whats happening is the domains not resolving to the matching IP or something.  Unsure.  Some feedback from ASL staff would be appreciated on this.
    ie, what works and what won't work for blocking spam.  Thing is exiscan is written by a 3rd party...
Children
  • OK People,   
    I got the block to work for mail coming from "user1@mydomain.com" to block from outside my domain.
    Now I need to know how to block mail to "user1@mydomain.com" from outside my domain.
    This user is no longer a user on my mail server and I want to block all mail to said user at the mail proxy.

    Thanks All
  • For testing, I added my yahoo address to /var/chroot-smtp/etc/exim.blockedsenders and restarted the SMTP daemon (/etc/rc.d/smtp restart) but messages sent from that account still go through. What else can I do?
  • nevermind, i figured it out.
  • Yes, well maybe you did figure it out..But don't you think it would be appropriate for you to post this solution properly here? Did you not receive any help for your problem?

    Thanks for your consideration of the rest of us.
  • I had to edit exim.conf and exim.conf-default as follows:

    sender_reject_recipients = @@lsearch*;/etc/exim.blocksenders

    changed to

    sender_reject_recipients = /etc/exim.blocksenders

    BUT - it does not work reliably. Some blocked domains still get through.
  • Can someone please give an explanation on what 
    @@lsearch* in the line sender_reject_recipients = @@lsearch*;/etc/exim.blocksenders does?
    And how can I block mail coming into a specific user.
    How can you block mail sent into the system ie. "Make your #$$% larger"   [:O]  
    That would be very handy to know how to filter out message content.

    Thanks
  • [[ Some block domains still getting through...]]

    If you have enabled SMTP Relay, try adding the following RBLs(if you don't have them already):

    bl.spamcop.net
    dnsbl.njabl.org
    list.dsbl.org
    multihop.dsbl.org
    relays.ordb.org
    orbz.gst-group.co.uk
    orbs.dorkslayers.com
    relays.osirusoft.com
    sbl.spamhaus.org
    relays.visi.com
    dialups.mail-abuse.org
    relays.mail-abuse.org
    dev.null.dk
    dialups.relays.osirusoft.com
    dun.dnsrbl.net
    bl.reynolds.net.au
    dynablock.wirehub.net
    inputs.relays.osirusoft.com
    proxy.relays.osirusoft.com
    relays.dorkslayers.com
    socks.opm.blitzed.org
    socks.relays.osirusoft.com
    spammers.v6net.org
    spamsites.relays.osirusoft.com
    spamsources.fabel.dk
    unconfirmed.dsbl.org
    ztl.dorkslayers.com

    Some of these RBLs shares/updates database or have links to one another making the filtering more effective.

    I hope this helps.

    jav
  • Thanks Greatly I will give your list a try.....  
  • hi iccnt
    i do not see that s.b. posted a concrete answer to your problem.
    did you solve the blocking of mails to an non-existing user by now?

    TIA
    chris