Commit Graph

105 Commits

Author SHA1 Message Date
Jon
7261769a95 feat(build): dockerfile for compiling dovecot
!10
2023-05-21 12:06:39 +09:30
Jon
1c6b3a3617 refactor(dockerfile): use global var
!10
2023-05-21 11:59:46 +09:30
Jon
88bfc64940 refactor(dockerfile): use args for apt software versions
!10
2023-05-21 11:58:18 +09:30
Jon
a866bd82b8 feat(arm64): build arm64 image using compiled bins
both dovecot and pigeonhole is compiled in ci pipeline

!10
2023-05-21 11:49:50 +09:30
Jon
676546f71c feat(amd64): use dovecot apt repo to install
this change is in preperation for supporting arm64, which will
use bins that are compiled as part of CI/CD

!10
2023-05-21 11:47:06 +09:30
Jon
2b497fd2cf feat(build): specify architecture
!10
2023-05-21 11:38:15 +09:30
Jon
de72f0e74d chore(ci): clean commented code
!10
2023-05-21 11:33:42 +09:30
Jon
300961aaff refactor(ci): update template path
!10
2023-05-21 11:33:12 +09:30
Jon
c30efc8bd6 fix(publish): must specify docker publish details
!3
2023-05-16 15:09:21 +09:30
Jon
29c6d6f730 fix: lock debian base image
!3
2023-05-16 14:58:47 +09:30
Jon
840e2ad5ae fix(versions): update postfix
!3
2023-05-16 14:58:38 +09:30
Jon
d6b2b5b40e fix(repo): lock dovecot repo to specified version
!3
2023-05-16 14:42:06 +09:30
Jon
64093a6aad build: 'v' no longer a suffix on version/tag
!3
2023-05-16 14:34:45 +09:30
Jon
e2e704c545 ci(gitlab-ci): use dev branch and type docker container
!3
2023-05-16 14:31:43 +09:30
42cf518c80 build(version): bump version 0.1.0rc1 → 0.1.0rc2 v0.1.0rc2 0.1.0rc2 2022-02-19 05:35:03 +00:00
Jon
2fdd4a8411 Merge branch '1-tracing-features' into 'development'
feat: ensure tracing is possible and lock down ssl ciphers

See merge request nofusscomputing/projects/docker-mail!9
2022-02-19 05:25:24 +00:00
e8eb6f906f fix(backup.sh): exclude unix sockets from backup
MR !9
2022-02-19 12:52:23 +09:30
acccf24774 fix(backup): ssl dir renamed to certs
MR !9
2022-02-19 12:51:51 +09:30
22a987a513 feat(docker_container): Ensure amavis data is a volume
The amavis data is required to be kept between containers.
set '/var/lib/amavis' as a docker volume.

MR !9
2022-02-19 12:32:50 +09:30
9f7ccabfa5 feat(amavis): don't allow user to send banned email
This configuration blocks the user from sending an email that w
would otherwise be blocked. in this instance the user is notified.

MR !9
2022-02-19 12:23:20 +09:30
c3739c4f19 feat(amavis): Don't allow user to send spam/virus
With this configuration if the user attempts to send spam or a
virus, the message will be quarantined and the user will be
notified of the issue.

MR !9
2022-02-19 12:16:20 +09:30
f6b7bae3eb feat(amavis): move policy bank to own config file
MR !9
2022-02-19 12:14:58 +09:30
7ec9750216 feat(amavis): Add received header to message
For tracing purposes, added the amavis received header to the message.

MR !9
2022-02-19 11:47:04 +09:30
93378dee86 fix(backup): /var/spool/postfix needs to be backed up
As this folder contains the mta folders and queue. It must be
backed up as mail could be lost that is awaiting delivery.

MR !9
2022-02-19 11:29:44 +09:30
43f6a356bd fix(sa-learn): amavis can't do bayes check if not mask 777
Service amavis even though part of group vmail who has mark 770
on '/var/spool/spamassassin', can't write lockfile to do a bayes
check.

Set '/var/spool/spamassassin' mask to be `777` with owner
`debian-spamd:vmail` recursive. so that amavis bayes check works.

MR !9
2022-02-19 11:21:04 +09:30
e9fb4123e9 fix(dovecot): sieve extensions debug error.
Sieve extensions set to:
    -vacation
        Remove vaction extension as this has the potential to leak to
        external users. this could be re-enabled if it could be blocked
        from leaving the server and only being available within the
        same domain
    -enotify
        Remove enotify extension as this has the potential to leak to
        external users. this could be re-enabled if it could be blocked
        from leaving the server and only being available within the
        same domain
    -editheader
        editheader disabled, as the user should not be able to edit
        message headers as this could remove message validity.
    imap4flags
        Enable imap4flags so that the user can flag messages as they
        desire.

MR !9
2022-02-19 11:02:36 +09:30
2a222df778 feat(ssl_tls): updated dovecot and postfix accepted ciphers
used https://ssl-config.mozilla.org/ to generate recommended
ciphers config for dovecot and postfix.

postfix set to use medium ciphers due to possibility of smtp
servers not being updated to latest.

MR !9
2022-02-19 10:41:53 +09:30
3741b92606 ci(docker_hub): fix rc release must be tagged 'dev'
A release candidate is not a stable release and therefore not
suitable for the 'latest' tag.
Tag a release candidate as 'dev'.

MR !9
2022-02-19 10:26:52 +09:30
396cb15add feat(dovecot): Disable SSL/TLS protocol logging
Disabled due to no actual output being useful. if required by an
end user, they can enable.

MR !9
2022-02-19 10:16:40 +09:30
e9718c97a6 fix(cron): sa-learn must run as spamd user
MR !9
2022-02-19 10:12:26 +09:30
967fd04fe7 fix(bayes_learn): ensure journal is synced after scan
MR !9
2022-02-19 10:11:31 +09:30
fbdf6efab7 fix(file_permission): set spamd to own spamassassin folder
Folder belongs to spamd user. this was required so that amavis spam bayes learning could read the files.

MR !9
2022-02-19 10:10:46 +09:30
7f7a259a82 fix(local_group): amavis and opendkim added to vmail
users require access to vmail group data.

MR !9
2022-02-19 10:07:41 +09:30
24f10af6d6 feat(postfix): prevent anonymous users on submission
Users are required to login to send an E-Mail. Prevented
anonymous user access

MR !9
2022-02-19 09:00:10 +09:30
274ade2d84 feat(dovecot): log SSL/TLS porotocol errors
Visibility is required to view and fault find SSL/TLS errors.

MR !9
2022-02-19 08:50:01 +09:30
478336ca68 feat(dovecot): log failed authentication attempts
Visibility is required for failed authentication attempts. Provides
an ability to use fail2ban and to fault find an end user auth issue.

MR !9
2022-02-19 08:49:06 +09:30
Jon
1581d45d89 Merge branch 'fix-dockerfile-syntax-error' into 'development'
fix(build): corrected syntax error in dockerfile

See merge request nofusscomputing/projects/docker-mail!8
2022-02-18 05:30:21 +00:00
Jon
db03fc2efa fix(build): corrected syntax error in dockerfile
MR !8
2022-02-18 05:25:59 +00:00
Jon
08d9a9efc1 Merge branch '1-lock-down' into 'development'
fix: lock down access to mail server

See merge request nofusscomputing/projects/docker-mail!7
2022-02-18 05:03:03 +00:00
3bca896c29 ci: Add dockerhub url to environment
MR !7
2022-02-18 14:25:56 +09:30
4554e9e66d feat(postfix): specify my_networks as localhost ONLY
mynetworks set to only be localhost as accepted/trusted.

MR !7
2022-02-18 14:16:28 +09:30
5f7095f274 fix(postfix): only use the servers order of tls ciphers
Don't allow a client to specify which TLS ciphers to use. They may
pick a less secure one.
MR !7
2022-02-18 14:08:38 +09:30
41e03936cc feat(postfix): no compression or renegotiation
Client should not attempt to rengotiation of TLS.
MAN states that compression during tls not nessacarly benificial.

MR !7
2022-02-18 13:49:39 +09:30
3120ecf2f5 fix(logrotate): ensure log rotate runs
Deleted the standard logrotate job from cron.daily and created
a new cron job to force run logrotate at `00:01`

MR !7
2022-02-18 13:46:27 +09:30
6625d72a48 fix(logrotate): don't specify log extension
MR !7
2022-02-18 13:42:00 +09:30
edadc4779e fix(dovecot): ensure quota syntax is correct
removed extra brace left from previous quota fix commit.

MR !7
2022-02-18 13:15:35 +09:30
f636c45681 test: add netstat to docker container for debugging
MR !7
2022-02-18 13:11:20 +09:30
b3d80b41ca fix(mailbox_quota): ensure user quota visible.
Mail quota was not visible in Thunderbird. bug was havinf two
`quota =` rules. adjusted to `quota2=` for shared quota to diplay,
however, had no effect in display shared quota.

Disabled shared in the meantime.

MR !7
2022-02-18 13:11:20 +09:30
4c37932bf7 feat(submission): check user quota recipient restriction
Check the users quota before accepting the mail for delivery.
If the user belongs to the server, the user wont send the message,
nor save it for it only to be rejected at a later stage.

Current rules and order as follows:
    1. reject_non_fqdn_recipient
        Require recipient to be in FQDN format so the message can
        be routed.
    2. reject_unknown_recipient_domain
        Prevent mail from being sent to a random location that can't
        be found.
    3. check_policy_service,unix:private/quota
        If the mail is for a local user and their mailbox is full, reject
        the mail.
        This allows the sender not to recieve a bounce message for
        a message that wasn't actually sent.
    4. permit_sasl_authenticated
        A user of the mail server can send E-Mail to anyone as long as
        it passes the filters above.
    5. reject
        Reject any further mail, as they clearly are not a user of the
        mail server.

MR !7
2022-02-18 13:11:20 +09:30
f90daea454 feat(postfix): enforce only reaying mail for auth destination
Mail server should only relay mail for domains and users it hosts. default is to reject.

Rules and order as follows:
    1. reject_non_fqdn_recipient
        Require the recipient to be in FQDN format for relaying
        and routing reasons including locating user.
    2. permit_auth_destination
        Only accept mail to be routed if authorized.
    3. reject
        Don't accept any further mail for relaying.

MR !7
2022-02-18 13:11:20 +09:30