Debian

Benutzeravatar
davidvajda.de
Site Admin
Beiträge: 1424
Registriert: Di Jul 18, 2023 8:36 pm
Wohnort: D-72072, Tübingen
Kontaktdaten:

Re: Debian

Beitrag von davidvajda.de »

Heute erkläre ich, wie man Spam abhält.

Ich erkläre das Problem kurz und bündig. Ohne abschweife.

Man kann einen Mail-Server für nicht autorisierte Zugriffe nur so einen Stellen
  1. Von einer fremden Mail-Addresse zu einer fremden Mail-Addresse wird der Absender blockiert - von
  2. Von einer fremden Mail-Addresse zu einer fremden Mail-Addresse wird der Empfänger blockiert - zu
  3. Von der eigenen Addresse, zur eigenen lässt sich nicht blockieren
Für letzteres gilt:
  1. Man kann vielleicht, aber bei mir geht es nicht
  2. Das geht auch von aussen, wenn man von aussen keinen Zugriff hat, man kann von

    Code: Alles auswählen

    david@ituenix.de
    an

    Code: Alles auswählen

    david@ituenix.de
    schreiben - jeder, der nicht blockiert wurde
  3. Das nennt man spam
Mein System ist sicher
  1. Mein Mailserver benutzt keine Passwörter - klingt unsicher ...
  2. ... nein:
    1. Jeder kann sich bei mir einloggen, aber das geht generell immer - sonst könnte kein Mailserver dem anderen eine Mail schicken. Das muss so sein. Es ist egal, ob sich ein Mensch einloggt, oder ein Mailserver - beide verstehen das gleiche Protokoll - hoffentlich :-)
    2. Dieses Einloggen bezieht sich nur auf die eingehenden Mails - nach aussen kann man keine schicken
  3. Warum verwenden manche Systeme Passwörter andere nicht?
    1. Mein System ist so ausgerichtet, dass es mit dem Internet verbunden ist, keine Sorge
    2. Ich kann überall hin mails schicken
    3. Aber nur vom System. Nicht von aussen, alles, was ausserhalb meines Subnetzes ist, kann nicht ...
    4. ausser von

      Code: Alles auswählen

      david@ituenix.de
      
      nach

      Code: Alles auswählen

      david@ituenix.de
      
      aber das ist normal
    5. kann ich von zu Hause weg keine Mails lesen?
      1. doch
      2. aber wie? Ich habe ein Webmailinterface. Ein Frontend für das Web für die Mails. Es ist eine Homepage, Website, die ist von überall aus erreichbar. Da der Webserver und der Mailserver auf dem selben Rechner laufen, kann der Webserver lokal den Mailserver benutzen und ich von aussen, das Webfrontend.
Jetzt kriege ich trotzdem immer spam und will, das verhindern. Spam Mails lauten, wie folgt:

Code: Alles auswählen

Hello. Are you interested in website promotion?
My name is Alexander.
I have been professionally engaged in website promotion for more than
14 years.
There is a portfolio with examples of work and reviews.
I will be glad to cooperate with you.
My WhatsApp/Telegram: +380973510878
My Skype: mayboroda_aleks
Benefits of working with me:
1. Increase the conversion of your website by 2-3 times or more.
2. Increasing the target audience by 2-3 times or more.
3. Since I work on my own and not for a company, my cost is much
lower than what companies charge.
4. Payment upon completion of work, done the work - paid.
5. You will have more time and energy, since I take on all the work
of attracting clients.
6. Increase in the site’s position for targeted queries already in
the first month of operation
7. Reports on each step of the work and assistance on website
promotion and optimization.
What is included in the service:
1. Drawing up a semantic core (a list of keywords on the subject of
the site).
2. Analysis of the site for errors and their correction and
optimization for key phrases.
3. Search and purchase high-quality links to your site directly from
site owners who do not sell links to everyone on exchanges, which will
make it possible to obtain maximum link weight and not risk being
penalized for bad links acquired through exchanges and aggregators.
Promotion cost:
$47 a month for work + $94 a month cost of 50-70 links to your site =
$141 a month total cost of promotion.
But so that you don’t take risks, I don’t take payment in
advance, so we can divide $141 into 3 steps of work (which are written
above)
$47 = 1 step, only 3 steps of work. From the second month, payment
will immediately be $141 per month.
Promotion deadlines:
The effect in the form of position growth will be visible within a
month.
Time frame for website promotion to the top 3 for all requests = 5-7
months.
Further, when the site is in the top 3, there is no need to promote
it anymore, since positions are maintained thanks to behavioral
factors and regular transitions from search to the site for queries.
Once a year, you can do position analytics and if some drops were
noticeable, you can restore promotion and optimization for a month to
correct the problems and return positions to the top 3.
Detailed promotion plan:
1 step. I create a complete semantic core of queries.
A list of queries for which you can and should promote your site in
search. And by which people can find your site by typing these queries
into the Google search bar.
Step 2. I will analyze the site for technical errors.
This will allow you to identify errors on the site that may interfere
with promotion. Errors may be contained in the code of the site or
page, errors in the script, broken, broken links (when your site links
to another site or page that does not exist).
External links to other sites not blocked from indexing, incorrect
linking or its absence, incorrectly distributed site weights, when a
page unnecessary for promotion receives the most weight, and necessary
pages receive very little weight from the entire site.
Step 3. I search for and acquire quality links to your site.
When the site is fully optimized, it has the necessary content, with
the optimal volume, the necessary entries, then it is advisable to
start external promotion of the site - purchasing high-quality links
to the site.
I will begin a step-by-step and gradual purchase of rental links to
your site with the necessary anchors taken from the semantic core of
queries.
This will allow you to raise your site to the top 3 for the necessary
queries, increase traffic and convert the visitor into a regular
customer of your products and services.
Step 4 Ongoing technical support and reporting.
This allows you to ask your question at any time, and also see what I
have done for a specific period, for example, a day, a week, a month.
I provide reporting on what and where links to your site were
purchased, what errors there are on the site that need to be
corrected, see the real growth of the site’s position, and much
more.
My WhatsApp/Telegram: +380973510878
My Skype: mayboroda_aleks
Best regards, Alexander, SEO specialist in website promotion.
_________________________________________________________
If you are not interested in the offer, write an unsubscribe email on
WhatsApp/Telegram or Skype.
Das ist der reinste Schwachsinn. Der Absender hat mir allen möglichen Mist geschrieben.

um Spam zu verhindern, muss ich die IP-Addressen herausfinden. Wie geht das. Nun möglichkeit Nummer eins
  1. Ich habe die letzte Spam-Mail um 5:02 gekriegt.

    Ich logge mich auf dem Server per SSH ein:

    Code: Alles auswählen

    Connection closed by foreign host.
    david@git:~$ ssh 192.168.178.30
    david@192.168.178.30's password: 
    Linux www 5.10.0-20-amd64 #1 SMP Debian 5.10.158-2 (2022-12-13) x86_64
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    You have mail.
    Last login: Tue Oct  3 07:42:26 2023 from 192.168.178.22
    david@www:~$ 
    
    Das muss ich immer machen, wenn ich an dem Mailsystem was ändere. Hat damit nichts zu tun. Ich arbeite halt nicht am Server

    Jetzt suche ich nach 5:02 in der

    Code: Alles auswählen

    /var/log/mail.log
    
    Diese zeigt alle Aktivitäten des postfix Mailserver an, also auch, wer sich da eingeloggt hat

    Jetzt benutze ich ich zum Vorlesen, und

    Code: Alles auswählen

    grep
    
    zum herausfiltern. und sehe:

    Code: Alles auswählen

    root@www:/home/david# cat /var/log/mail.log | grep 5:00
    Oct  1 05:00:11 www dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<d1wi254GVIUAAAAAAAAAAAAAAAAAAAAB>
    Oct  1 15:25:00 www dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<V/eqlacGeK4AAAAAAAAAAAAAAAAAAAAB>
    Oct  2 04:25:00 www dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<oikwe7IG2MwAAAAAAAAAAAAAAAAAAAAB>
    Oct  2 08:45:00 www dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<8ZT4HLYGWM4AAAAAAAAAAAAAAAAAAAAB>
    Oct  2 10:15:00 www dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<Rs7cXrcGPMYAAAAAAAAAAAAAAAAAAAAB>
    Oct  2 16:35:00 www dovecot: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<JYPfrbwGFM0AAAAAAAAAAAAAAAAAAAAB>
    Oct  3 05:00:53 www postfix/smtpd[2422344]: warning: hostname 186.194.233.77.cabonnet.com.br does not resolve to address 186.194.233.77: Name or service not known
    Oct  3 05:00:53 www postfix/smtpd[2422344]: connect from unknown[186.194.233.77]
    Oct  3 05:00:56 www postfix/smtpd[2422344]: 45AEA1426F2: client=unknown[186.194.233.77]
    Oct  3 05:00:57 www postfix/cleanup[2422348]: 45AEA1426F2: message-id=<651B599E.7090302@ituenix.de>
    Oct  3 05:00:59 www postfix/qmgr[1021238]: 45AEA1426F2: from=<david@ituenix.de>, size=14599, nrcpt=1 (queue active)
    Oct  3 05:00:59 www postfix/local[2422351]: 45AEA1426F2: to=<david@ituenix.de>, relay=local, delay=3.2, delays=3.2/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
    Oct  3 05:00:59 www postfix/cleanup[2422348]: 7518C1426F5: message-id=<651B599E.7090302@ituenix.de>
    Oct  3 05:00:59 www postfix/local[2422351]: 45AEA1426F2: to=<david@ituenix.de>, relay=local, delay=3.2, delays=3.2/0.02/0/0.02, dsn=2.0.0, status=sent (forwarded as 7518C1426F5)
    Oct  3 05:00:59 www postfix/qmgr[1021238]: 7518C1426F5: from=<david@ituenix.de>, size=14727, nrcpt=2 (queue active)
    Oct  3 05:00:59 www postfix/qmgr[1021238]: 45AEA1426F2: removed
    Oct  3 05:06:26 www postfix/anvil[2422346]: statistics: max connection rate 1/60s for (smtp:186.194.233.77) at Oct  3 05:00:53
    Oct  3 05:06:26 www postfix/anvil[2422346]: statistics: max connection count 1 for (smtp:186.194.233.77) at Oct  3 05:00:53
    Oct  3 05:06:26 www postfix/anv
    
    ich sehe, die IP-Addresse

    Code: Alles auswählen

    186.194.233.77
    
    die kann ich ruhig veröffentlichen, denn das ist spam.
  2. Die alternative ist, ich gucke mir den Header der Mail an:

    Code: Alles auswählen

    Return-Path: <info@s3.dansco.ru>
    X-Original-To: david@ituenix.de
    Delivered-To: david@ituenix.de
    Received: from s3.dansco.ru (dansco.ru [80.66.65.22])
         by www.ituenix.de (Postfix) with ESMTP id CE5BE140526
         for <david@ituenix.de>; Tue, 3 Oct 2023 03:12:00 +0200 (CEST)
    DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=key1; d=s3.dansco.ru;
         h=Date:To:From:Reply-To:Subject:Message-ID:MIME-Version:Content-Type; i=info@s3.dansco.ru;
         bh=pzRdzsE6InB2Sms+e3n0ZTBT8bY=;
         b=dy7OI1jPq9fOYg+p0vAluo4olrrFK0k9z1pTFKosgRmfBWbaRTUDSNoE+lTAWd8wNtOrMFjs7o8W
         6Ldliq6nmXaGgs1+4BMedhJKcMelHn7YN3MXM3qgW5xCHiCgvCPvT5u+O+BKsjd1EStI4otpohFZ
         mSLVTCLDHMXEI6xyqSk=
    DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=key1; d=s3.dansco.ru;
         b=kaIGcWgEc7XqNwq0PYW3Vi0kixuX06UH/TSiN1RMfL1T5qUftkWKYPUqY0Ch8AvC1gl51I4g4TRW
         t+xLf3+r2VZxEKsWjB1h46a4aOhgI0iGACXcnV5NUQUq1H6WHF10abUbWQ8WWoE3v3SaUjBsP+0q
         wB+y3CpHbIrSmwAXd+U=;
    Date: Tue, 3 Oct 2023 00:39:44 +0000
    
    Das ist eine andere Addresse und auch spam
Gut, ich erstelle eine Datei:

Code: Alles auswählen

/etc/postfix/client_checks
Die sieht wie folgt aus:

Code: Alles auswählen

141.98.6.22             REJECT Ha, ha, ha! Spam.
141.98.6.0/24           REJECT please use other offers on the Internet. like: https://www.dvajda.de
186.194.233.77          REJECT I am not Happy writing me spam
186.194.233.0/24        REJECT What are you thinking of spam?
Ich trage in:

Code: Alles auswählen

/etc/postfix/main.cf
Die Zeile:

Code: Alles auswählen

smtpd_recipient_restrictions = check_client_access hash:/etc/postfix/client_checks
ein und rufe:

Code: Alles auswählen

postmap /etc/postfix/client_checks
auf

Das war es.

Ich kann es überprüfen. Ich kann eine Mail per Hand verschicken - das gleiche, was der Server tut, nur ich

Code: Alles auswählen

david@git:~$ telnet 192.168.178.30 25
Trying 192.168.178.30...
Connected to 192.168.178.30.
Escape character is '^]'.
220 www.ituenix.de ESMTP Postfix (Debian/GNU)
HELO david@ituenix.de
250 www.ituenix.de
MAIL FROM:david@ituenix.de
250 2.1.0 Ok
RCPT TO:david@ituenix.de
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Hallo
.
250 2.0.0 Ok: queued as 090BA13FF72
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
Will ich ausprobieren, ob ich abgelehnt werde, trage ich in die

Code: Alles auswählen

/etc/postfix/client_checks
Die Zeile

Code: Alles auswählen

192.168.178.22           REJECT please use other offers on the Internet. like: https://www.dvajda.de
ein. Und verschicke noch mal eine Mail:

Code: Alles auswählen

david@git:~$ telnet 192.168.178.30 25
Trying 192.168.178.30...
Connected to 192.168.178.30.
Escape character is '^]'.
220 www.ituenix.de ESMTP Postfix (Debian/GNU)
HELO mail.ituenix.de
250 www.ituenix.de
MAIL FROM:david@ituenix.de
250 2.1.0 Ok
RCPT TO:david@ituenix.de
554 5.7.1 <git.fritz.box[192.168.178.22]>: Client host rejected: please use other offers on the Internet. like: https://www.dvajda.de
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
abgelehnt!
Antworten