Disable outgoing non spam signing to get a valid DKIM

Questions and answers about how to do stuff
Post Reply
froman
Posts: 21
Joined: 29 Aug 2017 03:41

Disable outgoing non spam signing to get a valid DKIM

Post by froman » 05 Mar 2018 18:24

Hello my friends, probably some of you have the same problem.

- I need to disable the signature for clean outgoing messages.
- why?
- because if you sign the clean outgoing messages the DKIM signature gets invalid when the email body is modified.

- why disable the signature only in outgoing messages?
- because I want the link that E.F.A puts in the footer of every incoming email, this way every user can report a message as spam.

so what is the problem?
- the E.F.A settings only has the option of enable or disable the signature on non spam messages (this affect all emails, incoming and outgoing messages), so if is enabled your DKIM signature gets invalid, and if it disable, you don't get the footer on the incoming messages to report messages as spam.


So this is the trick. it's very simple but I didn't find a guide or example of a working configuration.

1) the non spam signatures has to be enabled
- in the EFA-Configure
9) spam settings
1) non spam settings
- Do you want to DISABLE storing non spam ? [y/N/c]: N
- Do you want to DISABLE non spam signatures ? [y/N/c]: N

2) we need to change the signing rules of mailscanner to use the standar signature to all mails addresed to your domain "to: *@yourdomain.com" and all other mail with no signature

Go to the shell on the E.F.A an log as root (use your E.F.A admin password)

Code: Select all

$sudo su -

Code: Select all

#vim /etc/MailScanner/rules/sig.text.rules
replace:

Code: Select all

To: *@yourdomain.com /etc/MailScanner/reports/en/inline.sig.in.txt
To: default /etc/MailScanner/reports/en/inline.sig.out.txt
with:

Code: Select all

To: *@yourdomain.com /etc/MailScanner/reports/en/inline.sig.in.txt
To: default /dev/null

Code: Select all

#vim /etc/MailScanner/rules/sig.html.rules 
replace:

Code: Select all

To: *@yourdomain.com /etc/MailScanner/reports/en/inline.sig.in.html
To: default /etc/MailScanner/reports/en/inline.sig.out.html
with:

Code: Select all

To: *@yourdomain.com /etc/MailScanner/reports/en/inline.sig.in.html
To: default /dev/null

finally restart the mailscanner service

Code: Select all

#service mailscanner restart
PS: sorry about my english.

User avatar
shawniverson
Posts: 2611
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Disable outgoing non spam signing to get a valid DKIM

Post by shawniverson » 08 Mar 2018 15:23

Version 3.0.2.6 released! Update now to keep your eFa secure!

sunshinetech
Posts: 2
Joined: 06 Dec 2018 03:59

Re: Disable outgoing non spam signing to get a valid DKIM

Post by sunshinetech » 06 Dec 2018 04:03

You can also just delete the contents of the two files and not change any rules, that will also cause DKIM signing to work.

Post Reply