[exim] I need help with routing a mail preference

Top Page
Delete this message
Reply to this message
Author: Rafael Mas
Date:  
To: exim-users
Subject: [exim] I need help with routing a mail preference
Dear Exim User,



I am having a big of problem with certain task I want to accomplish..



This is the background of what I have and need to accomplish..



I have two Mail servers mx0.whatever.com and mx1.whatever.com.. I have a
queue mail server queue.whatever.com.. My two mail system are sharing
storage via GFS (SAN) so whenever the queue mail queues mail on the storage
the two mail server start sending mail immediately base on the
routing/transport regular expressions..



begin routers



dnslookup:

        driver                  = dnslookup


        domains                 = ! +local_domains


        transport               = remote_smtp


        ignore_target_hosts     = 0.0.0.0 : 127.0.0.0/8


        no_more




system_aliases:

        driver                  = redirect


        local_part_suffix       = +* : -*


        local_part_suffix_optional


        allow_fail


        allow_defer


        data                    =
${lookup{$local_part}lsearch{/etc/aliases}}


        group                   = www


#       user = exim


        file_transport          = address_file


        pipe_transport          = address_pipe




        driver                  = redirect


        check_local_user


        local_part_suffix       = +* : -*


        local_part_suffix_optional


        file                    = $home/.forward


        allow_filter


        no_verify


        no_expn


        check_ancestor


        file_transport          = address_file


        pipe_transport          = address_pipe


        reply_transport         = address_reply




        driver                  = accept


        check_local_user


#       local_part_suffix       = +* : -*


#       local_part_suffix_optional


        transport               = local_delivery


        cannot_route_message    = There is no users living here by that
name, check your naming.






begin transports



local_delivery:

        driver                  = appendfile


        file                    = /var/mail/$local_part


        delivery_date_add


        envelope_to_add


        return_path_add


        group                   = mail


        mode                    = 0660






address_pipe:

        driver                  = pipe


        return_output






address_file:

        driver                  = appendfile


        delivery_date_add


        envelope_to_add


        return_path_add






address_reply:

        driver          = autoreply






Now I need to identify mail and give it priority over one public IP over the
other for reputation purposes.. So we added an identifier to the Header of
the mail being queue base on Criteria (Ex: X-whatever-priority: 0 or
X-whatever-priority: 1)



I need using this criteria on the Header for one of two Mail Servers to send
the message since their IP will have a different priority base on the
criteria.. Like this avoiding both servers Public IP to be rated as bad by
ISP.



I have been reading online
(https://lists.exim.org/lurker/message/20130206.185440.3d550f40.pl.html)
and trying to get this done.. Can you provide me with some examples as of
how would you get this done.. ?



The Idea is when the Mailer system creates a Mail it gives a Header Priority
of 0/1 etc.. then base on that criteria I want from the Mail Server reading
from the queue to send one Mail (0) and ignore another one (1) that have a
different criteria which then the other mail will pick since the criteria
will be set for itself.. Thus sending the mail from a Public IP different
from the other, creating a different IP reputation..



Can it be done?



Thank you for all your help on this , since I have very little experience
with headers manipulation by exim.



Best Regards,



Rafael M. Más