exim_filter
vi /etc/exim/exim.conf
#MAIN CONFIGURATION ... system_filter = /etc/exim/filter/exim.filter system_filter_reply_transport = filter_smtp #system_filter_directory_transport = #system_filter_file_transport = #system_filter_group = #system_filter_pipe_transport = #system_filter_reply_transport = #system_filter_user = ... ... #TRANSPORTS begin transports ... filter_smtp: driver = autoreply ...
mkdir /etc/exim/filter/ touch /etc/exim/filter/exim.filter
vi /etc/exim/filter/exim.filter
###MAIL LIST ###if $recipients: contains "mail_list_new@domain.local" ### then ### unseen deliver user1@domain.local ### unseen deliver user2@domain.local ### unseen deliver user3@domain.local ### unseen deliver user4@domain.local ###endif ###AUTOREPLY ###if $recipients: contains "user5@domain.local" ### then ### mail from user5@domain.local ### subject "RE: $h_subject" ### text "Helo! \n\ ### tel. 123456789" ###endif ###AUTOREPLY ###if $recipients: contains "user6@domain.local" ### then ### if $h_from: contains "@domain.local" ### then ### mail from user6@domain.local ### text "Helo! \n\ ### tel. 123456789" ###endif ###endif ###USER NOT EXIST ###if $h_from: contains "user_another@domain.local" ### then ### fail text "The user does not exist" ###endif ###CHANGE HEADERS ###if $h_from: contains "@domain.local" and $header_subject: contains "MMM" ###then ### if $recipients: contains "@domain2.local" ### then ### headers remove From ### headers remove Sender ### headers remove Reply-to ### headers remove Return-path ### headers remove Envelope-to ### ### headers add "From: MMM <mmm@domain.local>" ### headers add "Sender: mmm@domain.local" ### headers add "Reply-to: mmm@domain.local" ### headers add "Return-path: mmm@domain.local" ### headers add "Envelope-to: mmm@domain.local" ### ### unseen deliver admin@domain.local ### endif ###endif
exim_filter.txt · Last modified: 2024/01/26 08:59 by admin