[exim] Is it possible to reject mail at transport?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: soumya tr
Date:  
À: exim-users
Sujet: [exim] Is it possible to reject mail at transport?
Hi,

Please let me know if its possible to reject mails at transport
'remote_smtp', by checking some header?

To elaborate my issue, I have a script that adds headers as given below:

-----------------
X-Spam-Checker-Version: spamc_ctasd client on
    localost
X-Spam-Level: **********
X-Spam-Flag: YES
X-Spam-Status: Yes, score=100.0 required=5.0 tests=SpamClass_Confirmed,
    VirusClass_Unknown autolearn=disabled
    version=1.0.0
X-CTCH-PVer: 0000001
X-CTCH-Spam: Confirmed
X-CTCH-VOD: Unknown
X-CTCH-Flags: 32
X-CTCH-RefID:
str=0001.0A020208.50F6861E.0022,ss=4,re=0.000,recu=0.000,reip=0.000,cl=4,cld=1,fgs=32
X-CTCH-Score: 0.000
X-CTCH-ScoreCust: 0.000
X-CTCH-Rules:
X-CTCH-SenderID: testaccount@???
X-CTCH-SenderID-Flags: 8192
X-CTCH-SenderID-TotalMessages: 1
X-CTCH-SenderID-TotalSpam: 1
X-CTCH-SenderID-TotalSuspected: 0
X-CTCH-SenderID-TotalConfirmed: 1
X-CTCH-SenderID-TotalBulk: 0
X-CTCH-SenderID-TotalVirus: 0
X-CTCH-SenderID-TotalRecipients: 0
-----------------


I have added the script in remote_smtp router [as transport_filter]

Now will I be able to reject mails based on some condition at the transport?

Note: The transport is:

-------------
remote_smtp:
driver = smtp
interface = ${if exists
{/etc/mailips}{${lookup{$original_domain}lsearch{/etc/mailips}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
helo_data = ${if exists
{/etc/mailhelo}{${lookup{$original_domain}lsearch{/etc/mailhelo}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
transport_filter = /usr/local/exim_sa_client.pl --senderip
$sender_host_address --mailfrom $sender_address
-------------

Infact spamassassin is also set in server and listens to port 783.

Should I add transport_filter at any other location? Or any other way? I am
stuck with this. Please assist.
--
Regards,
Soumya