Go Back   TechArena Community > Technology > Technology & Internet
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-02-2009
Member
 
Join Date: Jan 2009
Posts: 9
Only incoming messages checking by Rbl

Hello everyone,
I am using rbl checking on Exim 4 right now but it seems to check incoming and outgoing message which is annoying if you check for dynablocks. Is there a way to restrict the rbl checking only for incoming smtp traffic?

This is what I have right now as part of my ACLs:

require verify = sender

deny message = $sender_host_address is listed \
at $dnslist_domain
dnslists = list.dsbl.org : \
sbl.spamhaus.org : \
bl.spamcop.net : \
relays.ordb.org : \
korea.services.net : \
china.blackholes.us : \
russia.blackholes.us
deny local_parts = ^.*[@%!/|]
message = I've never seen @, %, !, /, or | in an e-mail. Neither should you.
Reply With Quote
  #2  
Old 13-02-2009
Member
 
Join Date: Apr 2008
Posts: 2,276
Re: Only incoming messages checking by Rbl

Assuming you have a domain list of your local domains you can use hosts with a negated local_domains list to accomplish this...

deny message = $sender_host_address is listed at $dnslist_domain
hosts = !+local_domains
dnslists = list.dsbl.org : \
sbl.spamhaus.org : \
bl.spamcop.net : \
relays.ordb.org : \
korea.services.net : \
china.blackholes.us : \
russia.blackholes.us
Reply With Quote
  #3  
Old 13-02-2009
Member
 
Join Date: May 2008
Posts: 2,786
Re: Only incoming messages checking by Rbl

Firstly, be cautious about your use of terms: "incoming" and "outgoing" don't have the meanings I think you're inferring here: they're all "incoming" as far as Exim is concerned. I know what you mean here, but it can sometimes get confusing! What I think you mean is something "messages that are coming from a host I'm allowing relaying from".

The answer depends on how you are allowing relaying (e.g. based on a set of fixed IPs? Or based on authentication?) but generally speaking the answer is to change your ACL rule about DNSBLs to something like:

deny message = $dnslist_text
hosts = !+relay_from_hosts
!authenticated = *
dnslists = whatever

which means that this rule will be skipped for hosts in the "relay_from_hosts" list and authenticated sessions.
Reply With Quote
  #4  
Old 13-02-2009
Member
 
Join Date: Feb 2006
Posts: 159
Re: Only incoming messages checking by Rbl

I've seen someone use the address #!/bin/sh@some.domain before.

Do make sure your authenticators are secure!
__________________
Temporary signature
Reply With Quote
  #5  
Old 13-02-2009
Member
 
Join Date: Oct 2005
Posts: 2,357
Re: Only incoming messages checking by Rbl

Quote:
Originally Posted by napoleon View Post
I've seen someone use the address #!/bin/sh@some.domain before.
Heh. I think I know the guy too...

And as for % / @ etc - has the OP ever got mail from a MHS / UUCP type setup?
__________________
I'm the Proud Owner of the most dangerous weapon
known to man kind: Human Brain
Reply With Quote
  #6  
Old 13-02-2009
Member
 
Join Date: Jan 2009
Posts: 9
Re: Only incoming messages checking by Rbl

@ Techno01

I tried your suggestion but it does not work. I wonder if it even could work the way you suggested it because local_domains has domain names in it and the rbl lists do ip address lookups so both are not really compatible. Perhaps the solution is to not run authenticated senders through the rbl lists?
Reply With Quote
  #7  
Old 13-02-2009
Member
 
Join Date: Jan 2009
Posts: 9
Re: Only incoming messages checking by Rbl

When trying out your suggestion I get this error here in the exim mainlog:

2003-12-08 09:34:38 unknown named host list "+local_domains"

But I do have this at the beginning of the exim.conf so I do not see why it would bring this up:

domainlist local_domains = lsearch;/etc/localdomains

domainlist relay_domains = lsearch;/etc/localdomains : \
lsearch;/etc/secondarymx
hostlist relay_hosts = lsearch;/etc/relayhosts : \
localhost
hostlist auth_relay_hosts = *
Reply With Quote
  #8  
Old 13-02-2009
Member
 
Join Date: Jan 2009
Posts: 9
Re: Only incoming messages checking by Rbl

Well,
I tried the recommendations from here and it did not work again. Here is my whole ACL. It seems that now no more rbl checking is done. The reason why I want to turn rbl checking off for authenticated local users is that DSL subscribers in Europe seem to be included in the dnsbl.njabl.org list and that would mean they are prevented from sending out mail even though they have a valid account on the machine. Here is the ACL:

#!!# ACL that is used after the RCPT command
check_recipient:
# Exim 3 had no checking on -bs messages, so for compatibility
# we accept if the source is local SMTP (i.e. not over TCP/IP).
# We do this by testing for an empty sending host field.
accept hosts = :


# Accept bounces to lists even if callbacks or other checks would fail
warn message = X-WhitelistedRCPT-nohdrfromcallback: Yes
condition = \
${if and {{match{$local_part}{(.*)-bounces\+.*}} \
{exists
{/usr/local/cpanel/3rdparty/mailman/lists/${lc:$1}_${lc:$domain}/config.pck}
}} \
{yes}{no}}

accept condition = \
${if and {{match{$local_part}{(.*)-bounces\+.*}} \
{exists
{/usr/local/cpanel/3rdparty/mailman/lists/${lc:$1}_${lc:$domain}/config.pck}
}} \
{yes}{no}}

warn message = X-WhitelistedRCPT-nohdrfromcallback: Yes
condition = \
${if and {{match{$local_part}{mailman-bounces\+.*}} \
{exists
{/usr/local/cpanel/3rdparty/mailman/lists/mailman/config.pck}}} \
{yes}{no}}

accept condition = \
${if and {{match{$local_part}{mailman-bounces\+.*}} \
{exists
{/usr/local/cpanel/3rdparty/mailman/lists/mailman/config.pck}}} \
{yes}{no}}


require verify = sender

deny message = $sender_host_address is listed \
at $dnslist_domain
hosts = !+auth_relay_hosts
!authenticated = *
dnslists = list.dsbl.org : \
sbl.spamhaus.org : \
bl.spamcop.net : \
dnsbl.njabl.org : \
relays.ordb.org : \
korea.services.net : \
china.blackholes.us : \
russia.blackholes.us
deny local_parts = ^.*[@%!/|]
message = I've never seen @, %, !, /, or | in an e-mail. Neither should you.

accept domains = +local_domains
endpass
message = unknown user
verify = recipient
accept domains = +relay_domains
accept hosts = +relay_hosts
accept condition = ${perl{checkrelayhost}{$sender_host_address}}

accept hosts = +auth_relay_hosts
endpass
message = $sender_fullhost is currently not permitted to \
relay through this server. Perhaps you \
have not logged into the pop/imap server in the \
last 30 minutes or do not have SMTP Authentication
turned on in your email client.
authenticated = *

deny message = $sender_fullhost is currently not permitted to \
relay through this server. Perhaps you \
have not logged into the pop/imap server in the \
last 30 minutes or do not have SMTP Authentication
turned on in your email client.

#!!# ACL that is used after the DATA command
check_message:
require verify = header_sender
accept
Reply With Quote
  #9  
Old 13-02-2009
Member
 
Join Date: Apr 2008
Posts: 2,567
Re: Only incoming messages checking by Rbl

Here is my config section that is working for me This will avoid running these two checks, I do not have anything here about authentication but your !authenticated = * should do the trick.

Code:
  deny    message         = rejected because we do not want mail from $sender_host_address
          sender_domains  = !+local_domains
          senders         = @@lsearch;/etc/exim/reject-by-domain

  deny    message         = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
          sender_domains  = !+local_domains
          dnslists        = relays.ordb.org : \
                                relays.orirusoft.com : \
                                inputs.relays.orirusoft.com : \
                                sbl.spamhaus.org
Reply With Quote
Reply

  TechArena Community > Technology > Technology & Internet
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Only incoming messages checking by Rbl"
Thread Thread Starter Forum Replies Last Post
Sony Ericsson Xperia X10 is not vibrating on incoming text messages (SMS) Ekram Portable Devices 6 04-02-2012 10:36 PM
Unable to see incoming numbers on Nokia 6300 incoming Weeraz Portable Devices 5 31-01-2012 08:58 AM
Wrong time showing for Incoming messages in HTC Incredible S Dvimida Portable Devices 8 29-11-2011 10:52 PM
Mac OS X 10.6.1 Mail is showing duplicated incoming messages LoganM Technology & Internet 4 26-04-2010 03:46 PM
How to filter incoming messages in Gmail automatically Sawan123 Technology & Internet 4 04-02-2010 05:12 AM


All times are GMT +5.5. The time now is 12:03 AM.