Admin-Ahead Community

Linux => General Linux => Topic started by: Aby on February 12, 2014, 02:44:17 pm

Title: Configure Exim to send mails to outside world only from restricted list of users
Post by: Aby on February 12, 2014, 02:44:17 pm
Configure Exim to send mails to outside world only from restricted list of users

You will need to have a convenient way of checking the list. If it is only a handful of users, you could just list them inline. Otherwise, you need to put them in a file or database. Let's suppose you've just got a list in a file. Put this as your first router:

   check_outgoing:

     driver = redirect
     domains = ! +local_domains
     senders = ! : ! lsearch;/etc/permitted/senders
     allow_fail
     data = :fail: you are not allowed to send outside

The senders should be listed as complete addresses, with both a local part and a domain. For a large list, use a DBM or cdb file instead, or a database. The first item in the senders list is empty, to match the empty sender. This is necessary because bounce messages have null senders.
----