Hidden copies of incoming and outgoing emails

Status
Not open for further replies.

DMM

Registered
Jun 29, 2015
2
0
1
HYD
cPanel Access Level
Root Administrator
Hi,
I am fresher to exim configuration by following this thread configured below script, it is working fine but some emails are not getting forwarded to the destination email

Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "domain.com")
then
  unseen deliver "[email protected]"
endif

if $sender_address: contains "domain.com"
then
unseen deliver "[email protected]"
endif
In detail problem i am facing is it is working but for some emails are not getting delivered to destination email but they are delivering to user.

Please assist me,
Thanks in Advance.....:)
 
Last edited by a moderator:

DMM

Registered
Jun 29, 2015
2
0
1
HYD
cPanel Access Level
Root Administrator
Check the SPAM folder of the destination address, also check the logs for missing emails.
Hi Vinayak,

Thanks for your quick reply, they are not in spam, and as i said i am new to this one so could you please tell me in brief where and which log i have to check ...

Thanks in advance .... :)
 

Vinayak

Well-Known Member
Jun 27, 2003
281
4
168
Bharat
cPanel Access Level
Root Administrator
You have to check the Exim logs, first find the entry for example using the subject line, then from it check the message ID and do a grep on it.

Here is an example to search based on subject line

Code:
cat /var/log/exim_mainlog | grep "Example Subject Line"
Example for the message ID
Code:
cat /var/log/exim_mainlog | grep 1Rq3Lo-0006td-Se
 
Try this

Code:
### START OF OUTGOING + INCOMING MAIL FORWARDING ###

if first_delivery
   and ("$h_to:, $h_cc:" contains "domain.com")
   or ("$h_from:" contains "domain.com")
then
   unseen deliver "[email protected]anotherdomain.com"
endif

### END OF OUTGOING + INCOMING MAIL FORWARDING ###

How do I get the head of a department to receive the e-mails that were sent by their subordinates?

I tried this, but it is not working. Does it have any syntax errors?

Tks!

Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "domain.com.br")
then
  unseen deliver "[email protected]"
endif

if $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]"
then
    unseen deliver "[email protected]"
endif

if $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]"
then
    unseen deliver "[email protected]"
endif
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
I think it's not quite the solution I'm looking for. I have access as an administrator, then can create the filters in the exim.
I tried to use this filter, but do not know it is correct:

Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "domain.com.br")
then
  unseen deliver "[email protected]"
endif

if $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]"
then
    unseen deliver "[email protected]"
endif

if $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]" or
    $header_from: is "[email protected]"
then
    unseen deliver "[email protected]"
endif
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
You may need to post your question to the Exim users mailing list if you don't receive sufficient user-feedback to your custom rules:

Exim-users Info Page

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Status
Not open for further replies.