PHPGangsta

PHPGangsta

Member Since 11 years ago

https://mail.de, Oelde

Experience Points
173
follower
Lessons Completed
3
follow
Lessons Completed
45
stars
Best Reply Awards
59
repos

28 contributions in the last year

Pinned
⚡ PHP class to generate and verify Google Authenticator 2-factor authentication
⚡ PHP class to create and send a magic packet to wake up a computer via Wake-On-LAN
⚡ This PHP class detects file changes and sends alarms. Useful for detecting hackers changing website files.
⚡ This small PHP class takes an URL and puts a screenshot to a file.
⚡ This PHP class makes it easy to create animated GIFs, especially CAPTCHAs
⚡ This PHP class makes it easy to handle archives with the command line version of 7-Zip
Activity
May
22
15 hours ago
Activity icon
issue

PHPGangsta issue comment Shardj/zf1-future

PHPGangsta
PHPGangsta

Minumum required PHP version?

Sorry, didn't know where else to ask.

Is PHP 8 now the minimum requirement?

If so, what is the last version to support PHP 7.3?

Thanks

PHPGangsta
PHPGangsta

Currently the minimum version is set to PHP 7.1, see composer.json: https://github.com/Shardj/zf1-future/blob/master/composer.json

image

The "GitHub Action PHP linter" currently checks versions 7.1 to 8.1, which makes sure that no PHP 8 feature sneaks in and breaks older versions: https://github.com/Shardj/zf1-future/blob/master/.github/workflows/lint.yml

Apr
22
1 month ago
Activity icon
commit_comment

pi-hole/FTL

Apr
20
1 month ago
Activity icon
fork

PHPGangsta forked pi-hole/AdminLTE

⚡ Pi-hole Dashboard for stats and more
PHPGangsta Updated
fork time in 1 month ago
Apr
18
1 month ago
Activity icon
issue

PHPGangsta issue comment rspamd/rspamd

PHPGangsta
PHPGangsta

[Feature] Add BIMI support

Hello,

it would be awesome if rspamd could check for BIMI and add headers BIMI-Location and BIMI-Indicator.

BIMI RFC:

Some other milters/MTAs already support this:

Emails having a valid BIMI and a validated VMC (which costs around 1000$) might indicate a serious sender who paid for it, and has a logo which is trademarked. Not many spammers will pay for it and get a certificate assigned.

PHPGangsta
PHPGangsta

@Avamander Since rspamd 3.2 we have BIMI support, see ChangeLog/News and https://github.com/rspamd/bimi-helper

Did you have time to test it? I sadly didn't 😢

Apr
5
1 month ago
Activity icon
issue

PHPGangsta issue comment rspamd/rspamd

PHPGangsta
PHPGangsta

[BUG] Run "rspamadm dmarc_report" as cronjob without date parameter

Hi,

I'm using rspamd 3.1-1~bionic.

I had a cronjob each day to send DMARC reports, like this:

17 9 * * * /usr/bin/rspamadm dmarc_report

@RealSebFox and I were confiused because sometimes we received DMARC-reports from each other, sometimes not. It looked like not all DMARC reports were sent, but we were not able to find out why.

After hours of investigation and checking Redis-contents (SMEMBERS dmarc_idx;20220201, SMEMBERS dmarc_idx;20220202) we found the solution inside the "--help":

$ rspamadm dmarc_report --help
Usage: rspamadm dmarc_report [-h] [-c <cfg>] [-v] [-n] [-b <number>]
       [<YYYYMMDD>] ...

Dmarc reports sending tool

Arguments:
   date                       Date to process (today by default)

Options:
   -h, --help                 Show this help message and exit.
         -c <cfg>,            Path to config file (default: /etc/rspamd/rspamd.conf)
   --config <cfg>
   -v, --verbose              Enable dmarc specific logging
   -n, --no-opt               Do not reset reporting data/send reports
             -b <number>,     Send reports in batches up to <batch-size> messages (default: 10)
   --batch-size <number>

Date to process (today by default)

If you just call rspamadm dmarc_report in your cronjob, it sends the reports for the current day, which means if you run it at 09:17, it only sends reports for mails between 00:00 and 09:17...

We both were expecting that by default it sends the reports of the day before (that makes the most sense in a cronjob, then you cover the whole day).

With the current behaviour you have 2 possibilities:

  1. Run the Cronjob at 23:59 to cover the whole day... But it's ugly if all people in this world send emails during one minute, It should be spread over the whole day (everyone should choose a random time), so the recipients don't have problems with their "receive-rate-limit".
  2. Run the cronjob with the date of yesterday as parameter, like this: 17 2 * * * /usr/bin/rspamadm dmarc_report -v $(date --date yesterday "+\%Y\%m\%d") >> /tmp/dmarc_report.log 2>&1

This strange behaviour of rspamadm dmarc_report explains the problem in Issue #4053 .

I guess most people who have a cronjob for sending rspamd DMARC reports don't know about this behaviour, and only send for a few hours per day (because they just run rspamadm dmarc_report without a date parameter)

If the default date ("today") will not be changed, then I would definitely recommend to add this important information to the documentation, and even provide an example of a correct cronjob with the date of yesterday (see above).

Currently in the documentation it says:

From Rspamd 3.0 you should use "rspamadm dmarc_report" tool called manually (e.g. via cron or systemd timers) to send reports, this should be done either daily or hourly depending on traffic.

Kind regards Michael

PHPGangsta
PHPGangsta

@slavkoja Thanks for your confirmation of the problems. I guess @vstakhov will find a solution for calculating the start-timestamp and end-timestamp in UTC.

You are right that the data in redis seems to be stored with YYYYMMDD, but I hope that the used date is UTC when calculating YYYYMMDD.

You are also right, when the reports have been sent today morning rspamd wrote to the logfile: Process date 20220403 and the last 2 lines were:

set last report date to 1649113200
Reporting collection has finished 1 dates processed, 13 reports: 13 completed, 0 failed

With the timestamp being 04.04.2022 23:00 UTC.

I did not check if rspamd fetched the data of 20220403 or 20220404 when generating the reports, you might be right that it has used the redis-data of 20220403.

Activity icon
issue

PHPGangsta issue comment rspamd/rspamd

PHPGangsta
PHPGangsta

[BUG] Run "rspamadm dmarc_report" as cronjob without date parameter

Hi,

I'm using rspamd 3.1-1~bionic.

I had a cronjob each day to send DMARC reports, like this:

17 9 * * * /usr/bin/rspamadm dmarc_report

@RealSebFox and I were confiused because sometimes we received DMARC-reports from each other, sometimes not. It looked like not all DMARC reports were sent, but we were not able to find out why.

After hours of investigation and checking Redis-contents (SMEMBERS dmarc_idx;20220201, SMEMBERS dmarc_idx;20220202) we found the solution inside the "--help":

$ rspamadm dmarc_report --help
Usage: rspamadm dmarc_report [-h] [-c <cfg>] [-v] [-n] [-b <number>]
       [<YYYYMMDD>] ...

Dmarc reports sending tool

Arguments:
   date                       Date to process (today by default)

Options:
   -h, --help                 Show this help message and exit.
         -c <cfg>,            Path to config file (default: /etc/rspamd/rspamd.conf)
   --config <cfg>
   -v, --verbose              Enable dmarc specific logging
   -n, --no-opt               Do not reset reporting data/send reports
             -b <number>,     Send reports in batches up to <batch-size> messages (default: 10)
   --batch-size <number>

Date to process (today by default)

If you just call rspamadm dmarc_report in your cronjob, it sends the reports for the current day, which means if you run it at 09:17, it only sends reports for mails between 00:00 and 09:17...

We both were expecting that by default it sends the reports of the day before (that makes the most sense in a cronjob, then you cover the whole day).

With the current behaviour you have 2 possibilities:

  1. Run the Cronjob at 23:59 to cover the whole day... But it's ugly if all people in this world send emails during one minute, It should be spread over the whole day (everyone should choose a random time), so the recipients don't have problems with their "receive-rate-limit".
  2. Run the cronjob with the date of yesterday as parameter, like this: 17 2 * * * /usr/bin/rspamadm dmarc_report -v $(date --date yesterday "+\%Y\%m\%d") >> /tmp/dmarc_report.log 2>&1

This strange behaviour of rspamadm dmarc_report explains the problem in Issue #4053 .

I guess most people who have a cronjob for sending rspamd DMARC reports don't know about this behaviour, and only send for a few hours per day (because they just run rspamadm dmarc_report without a date parameter)

If the default date ("today") will not be changed, then I would definitely recommend to add this important information to the documentation, and even provide an example of a correct cronjob with the date of yesterday (see above).

Currently in the documentation it says:

From Rspamd 3.0 you should use "rspamadm dmarc_report" tool called manually (e.g. via cron or systemd timers) to send reports, this should be done either daily or hourly depending on traffic.

Kind regards Michael

PHPGangsta
PHPGangsta

I updated to 3.2 two days ago and removed the "date" parameter from the cronjob, now it's just:

17 2 * * * /usr/bin/rspamadm dmarc_report -v >> /tmp/dmarc_report.log 2>&1

But: The date-range is a bit wrong:

    <date_range>
      <begin>1648940400</begin>
      <end>1649026800</end>
    </date_range>

According to the RFC it should be from 00:00 UTC to 00:00 UTC. But now it's from 23:00 UTC to 23:00 UTC.

My server is running in CEST timezone at the momemt, which is GMT+2... Not sure if it has to do with my selected timezone in the Operating System.

Mar
18
2 months ago
Activity icon
issue

PHPGangsta issue bigbluebutton/docker

PHPGangsta
PHPGangsta

files.freeswitch.org 401 error: folder is password-protected

During installation I'm getting the following error:

--2022-03-18 15:33:14--  https://files.freeswitch.org/repo/deb/debian-release/freeswitch-archive-keyring.gpg
Resolving files.freeswitch.org (files.freeswitch.org)... 190.102.98.174, 2803:d000:fffe::174
Connecting to files.freeswitch.org (files.freeswitch.org)|190.102.98.174|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
ERROR: Service 'freeswitch' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends subversion curl wget ca-certificates gnupg gnupg2 lsb-release unzip && wget -O /usr/share/keyrings/freeswitch-archive-keyring.gpg https://files.freeswitch.org/repo/deb/debian-release/freeswitch-archive-keyring.gpg && echo 'deb [signed-by=/usr/share/keyrings/freeswitch-archive-keyring.gpg] http://files.freeswitch.org/repo/deb/debian-release/ bullseye main' > /etc/apt/sources.list.d/freeswitch.list' returned a non-zero code: 6

The folder https://files.freeswitch.org/repo/deb/ is password protected...

Mar
17
2 months ago
Mar
11
2 months ago
Activity icon
delete

PHPGangsta in PHPGangsta/zf1-future delete branch php-lint-action

deleted time in 2 months ago
Mar
10
2 months ago
pull request

PHPGangsta pull request Shardj/zf1-future

PHPGangsta
PHPGangsta

Added GitHub Action for running PHP lint with supported PHP versions

Run PHP lint on every Push or Pull Request prevents syntax errors in the future (like #210 for example).

Activity icon
created branch

PHPGangsta in PHPGangsta/zf1-future create branch php-lint-action

createdAt 2 months ago
Activity icon
created branch

PHPGangsta in PHPGangsta/zf1-future create branch phplint-action

createdAt 2 months ago
push

PHPGangsta push PHPGangsta/zf1-future

PHPGangsta
PHPGangsta

Using Prestashop PHP lint Action instead of StephaneBour because Prestashop supports excluding folders

commit sha: 601796de1ceff99313b90014ab2f7ec47d79230f

push time in 2 months ago
Activity icon
created branch

PHPGangsta in PHPGangsta/zf1-future create branch github-action-lint

createdAt 2 months ago
Activity icon
fork

PHPGangsta forked Shardj/zf1-future

⚡ PHP 8.0 compatible version of ZF1
PHPGangsta Updated
fork time in 2 months ago
Mar
4
2 months ago
Activity icon
issue

PHPGangsta issue comment domainaware/parsedmarc

PHPGangsta
PHPGangsta

Add support for analysing SMTP TLS reports

Hi

Have you planed that your tool can analyze the report from mta-sts (TLSRPTv1) too?

Or do you know another software for this?

Thank you for help

PHPGangsta
PHPGangsta
Mar
1
2 months ago
Activity icon
issue

PHPGangsta issue comment rspamd/rspamd

PHPGangsta
PHPGangsta

[BUG] DMARC Reporting is playing ping pong

Prerequisites

Describe the bug I've enabled dmarc reporting on my mailcow instance, and I've noticed its playing DMARC ping pong, where my server and another email server is sending dmarc reports back and forth everyday even though no actual emails are being sent. So their server is reporting back my dmarc deliveries and rspamd is doing the same to them. Unless I do something this will go on forever, until one side does something to stop it.

I personally believe this is a bug, as I can't see why you would want this ping pong of dmarc reporting to be happening.

Steps to Reproduce

  1. Setup mailcow or your own rspamd environment.
  2. Enable DMARC Reporting LINK
  3. Send an email to [email protected] which should start the ping pong.

Expected behavior rspamd to only report non Report Domain emails, or some form of excluded emails list on the reporting config.

Versions

Docker Image: mailcow/rspamd:1.79 Rspamd daemon version 3.1 Debian 11 VM running on Proxmox 7.1

Additional Information

my reporting config

reporting {
    enabled = true;
    email = '[email protected]';
    domain = 'mydomain.com';
    org_name = 'myorg';
    helo = 'rspamd';
    smtp = 'postfix';
    smtp_port = 25;
    from_name = 'myorg DMARC Report';
    msgid_from = 'rspamd.mail.mydomain.com';
    max_entries = 2k;
    keys_expire = 2d;
}

my rua address is [email protected]

PHPGangsta
PHPGangsta

@FingerlessGlov3s Your idea is also a good idea, and is easier for most people I guess. But rspamd cannot detect "DMARC report mails" via the Subject or so. For example a new configuration line like this might make sense:

reporting {
  skip_reporting_for_addrs = ["[email protected]"] # don't send reports for emails arriving at these addresses
}

If you are using a separate email address for sending the DMARC reports, you could (or should) add that email address to the array. Then rspamd could skip collecting DMARC data for emails arriving at these addresses.

That's easier than doing the "heavy stuff" like setting up a separate (sub)domain, creating a DMARC record without a rua address, and so on. But easier doesn't mean better 😄 Sending DMARC reports from a separate (sub)domain or separate IP address might be a good idea anyway because of domain+IP reputation.

Activity icon
issue

PHPGangsta issue comment rspamd/rspamd

PHPGangsta
PHPGangsta

[BUG] DMARC Reporting is playing ping pong

Prerequisites

Describe the bug I've enabled dmarc reporting on my mailcow instance, and I've noticed its playing DMARC ping pong, where my server and another email server is sending dmarc reports back and forth everyday even though no actual emails are being sent. So their server is reporting back my dmarc deliveries and rspamd is doing the same to them. Unless I do something this will go on forever, until one side does something to stop it.

I personally believe this is a bug, as I can't see why you would want this ping pong of dmarc reporting to be happening.

Steps to Reproduce

  1. Setup mailcow or your own rspamd environment.
  2. Enable DMARC Reporting LINK
  3. Send an email to [email protected] which should start the ping pong.

Expected behavior rspamd to only report non Report Domain emails, or some form of excluded emails list on the reporting config.

Versions

Docker Image: mailcow/rspamd:1.79 Rspamd daemon version 3.1 Debian 11 VM running on Proxmox 7.1

Additional Information

my reporting config

reporting {
    enabled = true;
    email = '[email protected]';
    domain = 'mydomain.com';
    org_name = 'myorg';
    helo = 'rspamd';
    smtp = 'postfix';
    smtp_port = 25;
    from_name = 'myorg DMARC Report';
    msgid_from = 'rspamd.mail.mydomain.com';
    max_entries = 2k;
    keys_expire = 2d;
}

my rua address is [email protected]

PHPGangsta
PHPGangsta

Hello,

it looks like you are not sending your DMARC reports from a (sub)domain where you deactivated DMARC reporting in your DNS entry?

One solution (or best practice) is to disable DMARC reporting for the subdomain you are sending from. If you for example send from [email protected], you set a DMARC record for that subdomain without a rua address. Then the loop is stopped.

It looks like neither you or "the other one" has done this, that's why there is a loop :-) Only one of you both has to disabled DMARC reporting for the subdomain used for sending, then the problem is solved.

Of cause the subdomain and the mailbox you are using for sending the reports has to exist, so you can receive bounces and process them if you need to. For example some mailboxes where you will send DMARC reports will be full, or don't exist, or they forbid attachments, or they detect your mails as spam (because there are "bad" IP addresses in it). That's why you want (or should) check the bounces and stop sending report mails to them.

Because you are sending emails with "bad IP addresses" in them, you might also consider to use a separate IP address or a separate domain for sending the DMARC reports, so the reputation of your IP address and your important domain does not decrease.