mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
Other: Only listen on localhost and add send test
We should only listen on constants.Host when serving IMAP and SMTP. This change fixes that. It also adds a test that we can send over SMTP and receive over IMAP.
This commit is contained in:
@ -52,11 +52,25 @@ func NewDefaultProvider(name string) (*DefaultProvider, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &DefaultProvider{
|
||||
provider := &DefaultProvider{
|
||||
config: filepath.Join(config, name),
|
||||
data: filepath.Join(data, name),
|
||||
cache: filepath.Join(cache, name),
|
||||
}, nil
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(provider.config, 0o700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(provider.data, 0o700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(provider.cache, 0o700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return provider, nil
|
||||
}
|
||||
|
||||
// UserConfig returns a directory that can be used to store user-specific configuration.
|
||||
|
||||
Reference in New Issue
Block a user