[<<][pool][>>][..]
Thu Aug 1 10:46:40 EDT 2013

Spam-tagged by email after forwarding spam messages

Looks like my domain got somehow tagged in the Gmail spam filters
because I was forwarding incoming spam messages to a gmail address.

Following Best practices for forwarding mail to Gmail [13].

Looks like I need to set up:
- SPF records
- DKIM
- Spam tagging




1. Run Spamassassin inside Exim ; add [SPAM] Subject tag.

Followed [9] almost verbatim.  Adding the "[SPAM]" tag is a
suggenstion from the Gmail Bulk Sender Guidelines [3].

It seems at least it no longer bounces.

Some more tweaks [14]: set outright reject for scores over 70.

# cat /var/log/exim4/mainlog | grep rejected
2013-08-01 19:08:33 1V4wMZ-0002pf-3r H=localhost (gandalf) [127.0.0.1] F=<merlin@gandalf> rejected after DATA: This message scored 4.9 spam points.




2. SPF record in tinydns

Following Gmail advice on SPF[4][11], using a tinydns record builder[10].
This allows A and MX records from the domain, and the gmail servers.


# SPF
'zwizwa.be:v=spf1\040a\040mx\040~all:60


Check record using mxtoolbox[12]



3. DKIM

TODO [7] [15]


remote_smtp:
  debug_print = "T: remote_smtp for $local_part@$domain"
  driver = smtp
  dkim_domain = zwizwa.be
  dkim_selector = dkim
  dkim_private_key = /etc/exim4/dkim.private.key
  dkim_canon = relaxed



# openssl genrsa -out dkim.private.key 2048
# openssl rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM


# DKIM
'_domainkey.zwizwa.be:t=y;o=~;:60
'dkim._domainkey.zwizwa.be:v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0IfXMYztqRebZRFmj8dm0I9lhNVVXM583buFfCZWOOC6DTYnej4FLZ0dHz1AIDJQIFzdR6zP3ZANHcmylbjzbTGXJdGocqB+67Z2/CEM1W9iev5edIWUk2Nbi0QKJx6rh2RnJzSM2grCAmC9sputdLTtCDUn6o2RGtid4dTiIxwSA3YVg9e92Vb7fz3zHSM3IhJWynFXNZdVtx9ssvboiYngz5yC12HPlYz2PIWwwtEDKWX3GCo90NLMwHjdPEt+n8wzGGFmuqNCOqthrrKeb0wIpSbabI3ulVIg0xMUO8C66/r5EUzpMhZv1h4U9j6T9O6g915WpFeCwNMAaVNO8wIDAQAB


Note that tinydns record builder[16] uses generic records which
doesn't work well for large packets. TXT records do work fine.




DKIM fixed it: can send to gmail now.




[1] https://support.google.com/mail/answer/2451690?hl=en&ref_topic=1669056
[2] https://support.google.com/mail/answer/180707?hl=en
[3] https://support.google.com/mail/answer/81126
[4] http://support.google.com/a/bin/answer.py?hl=en&answer=178723&topic=2759192&ctx=topic
[5] http://www.rackaid.com/resources/gmail-blacklist-removal/
[6] http://passwd.org/2009/09/exim-stripping-headers-authenticated-mail-relaying
[7] http://www.dkim.org/
[8] http://marc.merlins.org/linux/exim/sa.html
[9] https://wiki.debian.org/Exim#Spam_scanning
[10] http://anders.com/projects/sysadmin/djbdnsRecordBuilder/#SPF
[11] http://support.google.com/a/bin/answer.py?hl=en&answer=33786
[12] http://mxtoolbox.com/spf.aspx
[13] http://support.google.com/a/bin/answer.py?hl=en&answer=175365
[14] http://www.maretmanu.org/homepage/inform/exim-spam.php#spam
[15] http://mikepultz.com/2010/02/using-dkim-in-exim/
[16] http://anders.com/projects/sysadmin/djbdnsRecordBuilder/#domainKeys
[17] http://support.google.com/a/bin/answer.py?hl=en&answer=168383




[Reply][About]
[<<][pool][>>][..]