Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flags milter example with curl to remove headers #683

Open
ChandanChainani opened this issue Oct 4, 2023 · 0 comments
Open

Flags milter example with curl to remove headers #683

ChandanChainani opened this issue Oct 4, 2023 · 0 comments

Comments

@ChandanChainani
Copy link

ChandanChainani commented Oct 4, 2023

how to use milter to remove headers from /checkv2 response and calculated score

Request:

curl "http://localhost:11333/checkv2" -H "Subject: Test Subject" -d 'Some spam content'

Response:

{
    "is_skipped": false,
    "score": 10.4,
    "required_score": 15,
    "action": "add header",
    "thresholds": {
        "reject": 15,
        "add header": 6,
        "greylist": 4
    },
    "symbols": {
        "ARC_NA": {
            "name": "ARC_NA",
            "score": 0,
            "metric_score": 0,
            "description": "ARC signature absent"
        },
        "MISSING_FROM": {
            "name": "MISSING_FROM",
            "score": 2,
            "metric_score": 2,
            "description": "Missing From: header"
        },
        "MISSING_TO": {
            "name": "MISSING_TO",
            "score": 2,
            "metric_score": 2,
            "description": "To header is missing"
        },
        "MISSING_SUBJECT": {
            "name": "MISSING_SUBJECT",
            "score": 0.5,
            "metric_score": 2,
            "description": "Subject header is missing"
        },
        "MISSING_DATE": {
            "name": "MISSING_DATE",
            "score": 1,
            "metric_score": 1,
            "description": "Message date is missing"
        },
        "MIME_GOOD": {
            "name": "MIME_GOOD",
            "score": -0.1,
            "metric_score": -0.1,
            "description": "Known content-type",
            "options": [
                "text/plain"
            ]
        },
        "DMARC_NA": {
            "name": "DMARC_NA",
            "score": 0,
            "metric_score": 0,
            "description": "No DMARC record",
            "options": [
                "No From header"
            ]
        },
        "R_DKIM_NA": {
            "name": "R_DKIM_NA",
            "score": 0,
            "metric_score": 0,
            "description": "Missing DKIM signature"
        },
        "MIME_TRACE": {
            "name": "MIME_TRACE",
            "score": 0,
            "metric_score": 0,
            "options": [
                "0:+"
            ]
        },
        "HFILTER_HOSTNAME_UNKNOWN": {
            "name": "HFILTER_HOSTNAME_UNKNOWN",
            "score": 2.5,
            "metric_score": 2.5,
            "description": "Unknown client hostname (PTR or FCrDNS verification failed)"
        },
        "RCVD_COUNT_ZERO": {
            "name": "RCVD_COUNT_ZERO",
            "score": 0,
            "metric_score": 0,
            "description": "Message has no Received headers",
            "options": [
                "0"
            ]
        },
        "MISSING_MID": {
            "name": "MISSING_MID",
            "score": 2.5,
            "metric_score": 2.5,
            "description": "Message id is missing"
        }
    },
    "messages": {},
    "message-id": "undef",
    "time_real": 0.01236,
    "milter": {
        "remove_headers": {
            "X-Spam": 0
        }
    }
}

rspamd version: 3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant