Topic: Got hacked ? SPAM passed DKIM check ..
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): v0.9.6
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Linux mx 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
First of all, thanks for your work. Worked perfectly for more than 3 years until ...
I received a classical phishing e-mail asking me to send some BTC etc.
I was not taking this seriously until I checked first the e-mail header :
Return-Path: <d@MY-DOMAIN.COM>
Delivered-To: d@MY-DOMAIN.COM
Received: from mx.MY-DOMAIN.COM (localhost [127.0.0.1])
by mx.MY-DOMAIN.COM (Postfix) with ESMTP id 3FD672C3D12
for <d@MY-DOMAIN.COM>; Mon, 27 Apr 2020 21:48:40 +0200 (CEST)
Authentication-Results: mx.MY-DOMAIN.COM (amavisd-new); dkim=pass (2048-bit key)
reason="pass (just generated, assumed good)" header.d=MY-DOMAIN.COM
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=MY-DOMAIN.COM; h=
x-mailer:content-type:content-type:mime-version:date:date
:subject:subject:to:from:from:message-id; s=dkim; t=1588016918;
x=1588880919; bh=bM9uEgxzEUXb3P/Uk9Sy6nvL+anPcKo1fnBQP2VSTPc=; b=
F1pe0y1F6R7h1YP2ZsXIV6AM9TGuSB6glueP2JVS8Gw8KenWDoI3u5T2Yw+odJ5W
RykxZjS0mpo/kK5q7oh5MATmwZMP20SEsSTgDYKB3fxFUkw8z+/0lm5L1tEmr1Ld
CG/kk8X2fYNQkUb1XaHK9GGG0Y5NreiJFYFcry1rUF/Fzvid+h5OYP1yHZ4Bdzed
nVt7+sSLx8vIjMhVIrK5mlwOBIIZZNMQdAT9vnrmtj1Saoaeq1vFWkz7gGqyHBMw
IAJzILh9HYPxO8Y+GhNY1nv8wi3oGZB6PAm8xZFbtqO6duLuSMjQLzS0mtUnk9Tc
sLt9mFoXtkU2hDvGePfZTg==
X-Virus-Scanned: Debian amavisd-new at mx.MY-DOMAIN.COM
Received: from mx.MY-DOMAIN.COM ([127.0.0.1])
by mx.MY-DOMAIN.COM (mx.MY-DOMAIN.COM [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id rQ8rteFOPWMb for <d@MY-DOMAIN.COM>;
Mon, 27 Apr 2020 21:48:38 +0200 (CEST)
Received: from [190.232.205.120] (localhost [IPv6:::1])
by mx.MY-DOMAIN.COM (Postfix) with ESMTP id CD6FB2C3D11
for <d@MY-DOMAIN.COM>; Mon, 27 Apr 2020 21:48:37 +0200 (CEST)
Then postfix logs :
Apr 27 21:48:40 mx amavis[8917]: (08917-03) Passed CLEAN {RelayedInternal}, MYNETS LOCAL [::1]:50186 <d@MY-DOMAIN.COM> -> <d@MY-DOMAIN.COM>, Queue-ID: CD6FB2C3D11, Message-ID: <648599110214856849353564@MY-DOMAIN.COM>, mail_id: rQ8rteFOPWMb, Hits: -1.307, size: 5258, queued_as: 3FD672C3D12, dkim_new=dkim:MY-DOMAIN.COM, 1951 ms, Tests: [ALL_TRUSTED=-1,BAYES_00=-1.9,DATE_IN_PAST_03_06=1.592,HTML_MESSAGE=0.001]
Apr 27 21:48:40 mx postfix/smtp[9319]: CD6FB2C3D11: to=<d@MY-DOMAIN.COM>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.5, delays=0.5/0.05/0.01/2, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 3FD672C3D12)
Then things seems more serious.
I replaced my domain by MY-DOMAIN.COM in the logs, everything else is the same as the original logs.
I can clearly see that the email come from a Somalian (190.232.205.120) IP address (from the logs above).
I checked the .EML file trough a DKIM checker and in fact the email signature is correct.
I'm getting 10/10 on the email score at mail-tester.com (so DKIM is well configured). Everything worked perfectly during 3 years.
I aslo checked the dovecot logs, nothing to report here, juste my local logins (192.168.X.X). So I guess there was no access to my others mails, but I still do not understand how the "hacker" could send that e-mail and pass the DKIM check
Any thoughts ? Do I have to worry about it ? If yes, I suppose I have to reinstall the whole server (never installed anything else than iRedMail on that dedicated home server). If no, how can I fix postfix or spamassassin to block this kind of e-mails (at least not allowing to send real DKIM signed emails to my self ...)
Thanks a lot!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.