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

haraka / Haraka / 26986574221

04 Jun 2026 11:50PM UTC coverage: 72.062% (-0.3%) from 72.328%
26986574221

Pull #3596

github

web-flow
Merge 5785afddb into 733e5f73a
Pull Request #3596: meta: change .name from Haraka -> haraka

1726 of 2288 branches covered (75.44%)

7591 of 10534 relevant lines covered (72.06%)

26.63 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
6✔
2

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

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

×
12
exports.load_flat_ini = function () {
6✔
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) {
6✔
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

3✔
40
exports.get_plain_passwd = function (user, connection, cb) {
6✔
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