• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haraka / Haraka / 26933395052

04 Jun 2026 05:46AM UTC coverage: 72.437% (+0.05%) from 72.387%
26933395052

push

github

web-flow
add connection.ini [main] postel option (#3592)

- conn: use utils.sanitize instead of local regex

1678 of 2207 branches covered (76.03%)

10 of 11 new or added lines in 1 file covered. (90.91%)

34 existing lines in 4 files now uncovered.

7637 of 10543 relevant lines covered (72.44%)

26.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.45
/plugins/auth/flat_file.js
1
// Auth against a flat file
11✔
2

11✔
3
exports.register = function () {
11✔
UNCOV
4
    this.inherits('auth/auth_base')
×
UNCOV
5
    this.load_flat_ini()
×
UNCOV
6

×
UNCOV
7
    if (this.cfg.core.constrain_sender) {
×
UNCOV
8
        this.register_hook('mail', 'constrain_sender')
×
UNCOV
9
    }
×
UNCOV
10
}
×
UNCOV
11

×
12
exports.load_flat_ini = function () {
11✔
13
    this.cfg = this.config.get(
11✔
14
        'auth_flat_file.ini',
11✔
15
        {
11✔
16
            booleans: ['+core.constrain_sender'],
11✔
17
        },
11✔
18
        () => {
11✔
19
            this.load_flat_ini()
11✔
20
        },
×
21
    )
×
22

×
23
    if (this.cfg.users === undefined) this.cfg.users = {}
11!
24
}
×
25

×
26
exports.hook_capabilities = function (next, connection) {
11✔
27
    if (!connection.remote.is_private && !connection.tls.enabled) {
5!
28
        connection.logdebug(this, 'Auth disabled for insecure public connection')
5!
29
        return next()
1✔
30
    }
1✔
31

1✔
32
    const methods = this.cfg.core?.methods ? this.cfg.core.methods.split(',') : null
5✔
33
    if (methods && methods.length > 0) {
5!
34
        connection.capabilities.push(`AUTH ${methods.join(' ')}`)
5✔
35
        connection.notes.allowed_auth_methods = methods
3✔
36
    }
3✔
37
    next()
3✔
38
}
3✔
39

4✔
40
exports.get_plain_passwd = function (user, connection, cb) {
11✔
41
    if (this.cfg.users[user]) return cb(this.cfg.users[user].toString())
4✔
42

3✔
43
    cb()
3✔
44
}
3✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc