Re: [exim] Local delivery for a Domain

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jon Gerdes
Ημερομηνία:  
Προς: manusabu@admod.com
Υ/ο: exim-users@exim.org
Αντικείμενο: Re: [exim] Local delivery for a Domain
On Mon, 2015-09-21 at 23:29 +0530, Manu Sabu wrote:

> On Mon, Sep 21, 2015 at 8:20 PM, Jon Gerdes <gerdesj@???>
> wrote:
>         On Mon, 2015-09-21 at 08:55 +0530, Manu Sabu wrote:
>         > Hi,
>         >
>         > I've an email server and I want to configure one domain on
>         this server only
>         > can sent emails to email accounts under the same domain.
>         That is domain.
>         > Com can only sent email to domain. Com. How it can be set up
>         >
>         >
>         > --
>         > *---*
>         > *Warm Regards,*
>         >
>         > *Manu SabuSystem Engineer*



>         What kind of mail system is domain.com using?  We need more
>         information.
>
>         Cheers
>         Jon
>
>
> We are running a cpanel linux system.


(Please put your reply below mine)

A little more information would be helpful ...

It has been years since I used cPanel.  Let's start here:
https://documentation.cpanel.net/display/ALD/Exim+Configuration+Manager
and it looks like you will need to use the Advanced Editor.

I think you want to add an additional rcpt acl.  Find the line that
reads:

acl_smtp_rcpt = <something>

this tells you what the rcpt acl is actually called (probably:
acl_check_rcpt)

Now find:

------------8<---------------
begin acl

...... some stuff ......

acl_check_rcpt:
------------8<---------------

Somewhere near the start of the rcpt acl add something like this:

deny sender_domains = example.co.uk
     domains = !example.co.uk
     message = No relay to external domains
     log_message = Attempt to relay to external domain

This is a very simplistic approach because the sender domain is easily
faked.

Here is the full documentation:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-access_control_lists.html

You could use two ACLs here instead.  One that looks for your internal
Dovecot/Courier daemon as well as the sender/recipient domains.  The
second ACL tests for authenticated SMTP attempting to relay back out
again.

Cheers
Jon


Blueloop Ltd
01460 271055
https://www.blueloop.net
Blueloop House, Ilchester Road, YEOVIL, BA21 3AA Registered England & Wales - 3981322