Re: [Exim] Exim Rejecting messages randomly?

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: BJ Clark
CC: exim-users
Subject: Re: [Exim] Exim Rejecting messages randomly?
BJ Clark wrote:
> Hi List,
> I'm having problems with mail getting rejected even thought it
> shouldn't be (and I don't understand why). This is my ACL section of my
> config file:
>
> begin acl
>
>
> acl_check_rcpt:
>
>   accept  hosts          = :
>   deny    local_parts    = ^.*[@%!/|]


--------
>  deny    senders        = \
>                                            ${lookup mysql{SELECT sender
> FROM deny_sender \
>                                                  WHERE
> '$sender_address' rlike sender} \
>                                                  {$sender_address}}
 >           message        = We don't want mail from $sender_address,
 > your in our database.

>

--------

First, make it look a bit more readable

deny senders = mysql;select sender from deny_sender where \
                      '${quote_mysql:$sender_address}' rlike sender
      message = We don't want mail from $sender_address, \
                your in our database.


Always prefer this type of lookup, if you're not interested in the
result, but just the existence of an entry.

Have you tried to do this lookup in mysql directly? What happens if you
send the same query to mysql via the commandline tool?

Run exim with exim -bh 1.2.3.4 -d
Now fake a SMTP-session
EHLO example.com
MAIL FROM: <email@???>
RCPT TO: <me@???>

Now check the output, It should give you some valueable information.

>   deny    hosts          = net-lsearch;/usr/exim/reject-hosts.txt : \
>                            net24-lsearch;/usr/exim/reject-hosts.txt
>           message        = Connection Denied for $sender_host_address

>
>   accept  local_parts    = postmaster
>           domains        = +local_domains


You should accept mails to postmaster without checks for senders or hosts.

> I have people send me email, and I receive it, and then the next day
> they will send a message and it will be returned "Undeliverable" to
> them. Then I will get random messages blocked for unknown reasons, and
> they show up in the reject log like this:
> 2003-03-22 14:43:45 H=f4.law10.hotmail.com (hotmail.com) [64.4.15.4]
> F=<email@???> rejected RCPT <me@???>: We don't want
> mail from email@???, your in our database.
> This person is definitely not in my database and emails SHOULD be
> accepted.
>
> Can someone help me out? I'm new to MTAs and just need a mail server
> that looks up users in MySQL and delivers mail to them and doesn't
> allow spamers to use my server. That is ALL I need. I spam filter on
> the client side.


Check your database, I bet you have a matching entry inside of it.

Nico