Re: [exim] Rejecting unknown users at RCPT time (poor man's …

Pàgina inicial
Delete this message
Reply to this message
Autor: Odhiambo Washington
Data:  
A: My BSD
CC: exim-users
Assumpte: Re: [exim] Rejecting unknown users at RCPT time (poor man's way)
* On 08/07/06 12:03 -0400, My BSD wrote:
| Running an instance of Exim version 4.62 on an OSX 10.4.6 former
| IBook.
| 
| Set up to accept external incoming mail for three domains for
| existing users (unless it contains a virus) and to reject all mail for
| non-existent users (except Postmaster) at RCPT time.
| 
| Accepted mail is relayed to an internal proprietary server for
| processing, etc.
| 
| The
|  "acl_check_rcpt:"
|         "accept domains = +local_domains"
|             "verify = recipient"
| configuration setting was not rejecting mail to non-existent users
| (perhaps because there are no local users on the server, it had no
| way to verify them, I'm not sure).  
| 
| I adapted an over-quota reject router that I found on the Net (lost the
| URL, sorry) as follows:
| 
| Unknown_recipient:
|   driver = redirect
|   domains = +local_domains
|   local_parts = !lsearch;/opt/local/etc/exim/virtual_users
|   data = :fail:Unknown recipient!
|   allow_fail
| 
| Created the "/opt/local/etc/exim/virtual_users" file listing all legal
| users.
| 
| To my surprise, it worked.
| 
| Two questions:
| 
| 1.  Is anything basically flawed with this router?
| 
| 2.  Mail to a non-existent user in a domain is accepted if the user
|     exists in one of the other local domains.  How to tighten it up to
|     reject by local_part@domain?



# This statement accepts the incoming recipient address if the domain is one of
# domains for which this host is a relay, but again, only if the address can
# be verified.

accept  domains     = +relay_to_domains
        endpass
        message     = Unrouteable address.
        verify      = recipient/callout=10s,use_sender,defer_ok


The "verify = " was modified by me. Read spec.txt.
The clue you need is "recipient verification"



        cheers
       - wash 
+----------------------------------+-----------------------------------------+
Odhiambo Washington                    . WANANCHI ONLINE LTD (Nairobi, KE)  |
wash () WANANCHI ! com            . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223            . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121            . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"  
                         --from a /. post