exim4

Exim: Add X-Report-Abuse: TEXT to report abuse Headers


I am using Exim and Dovecot. I want add to all outgoing email an anti-abuse header like:

X-Report-Abuse: TEXT to report abuse

How I can do this? Thanks in advance

Thanks, this is not helping me. I added the line where you told but also incoming email have the X-Report-Abuse heder.

I cannot find that on my Exim

send_to_gateway:

I added the headers_add = X-Report-Abuse: TEXT to report abuse here:

This transport is used for delivering messages over SMTP connections.

remote_smtp:
      driver = smtp 
      dkim_domain = ${lc:${domain:$h_from:}} 
      dkim_selector = x 
      dkim_private_key = /etc/exim/dkim.private.key 
      dkim_canon = relaxed
      headers_add = X-Report-Abuse: Please report any abuse text

this is working if the outgoing email are sent from an email client, is not working if email is sent by SMTP from a PHP script or app like wordpress or other PHP app.


Solution

  • This adds a header to outgoing messages:

    Add this line to your exim.conf file within your outgoing router(s) configuration:

    headers_add = X-Report-Abuse: TEXT to report abuse
    

    For example

    begin routers
    
    ...
    
    send_to_gateway:
      driver = manualroute
      domains = !+local_domains
      transport = remote_smtp
      route_list = * smtp.myisp.net
      headers_add = X-Report-Abuse: TEXT to report abuse
    
    dnslookup:
      driver = dnslookup
      domains = ! +local_domains
      transport = remote_smtp
      ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
      headers_add = X-Report-Abuse: TEXT to report abuse
      no_more