Please, help on how to setup an internal mail server with special requirements.
I already installed opensuse leap 15 with KDE and Samba. I use it with btrfs for backup storage.
I thought, maybe I could use the programs postfix+dovecot+getmail for this purpose.
But I don’t know much about this programs and maybe others are better suited?
The mail server must not be reachable from the internet. It must get all mails by POP.
[li]This way, the local recipients will be in the “envelope-to” header.[/li][/ul]
[li]Sometimes I recieve multiple mails with the same “message-id” header, but different “envelope-to”. [/li]So if possible the mail server must identify double mails using both the “message-id” + “envelope-to” header.
If this is not possible, it must not delete double mails at all.
Then the mails must be checked with spamassassin (I already have many rules) and write the result and report into the mail header.
[li]Which else methods are available to check and modify mails?[/li][li]Like: remove all attachments that are not allowed?[/li][/ul]
Then the mail server should put all mails in a single mailbox or folder, no matter who they are addressed to.
[li]Mailbox name = “incoming”.[/li][li]Each mail must be a single file in RFC-mail-format.[/li][/ul]
I want to check the files in this “incoming” folder with a python script I want to write.
[li]Every mail that is classified as “good” according to certain criteria, will get moved to a second mailbox (name = “goodmails”).[/li][/ul]
[li]IMAP access to this mailboxes is necessary to check the result of the filter process and to manually move good messages.[/li][/ul]
A DMS-program on another server will periodically retrieve all mails from “goodmails” via POP and distribute them to its own mailboxes.
[li]But this DMS doesn’t have mail server functionality. [/li]It is even sending mails to other internal users to the external mail server.
This internal mail server must accept mails from the DMS-program (SMTP) and:
[li]forward mails, that are adressed to external recipients, to the mail server of my webspace provider.[/li][LIST]
[li]If a mail is adressed to internal and external recipients, will the providers mail server send a copy back?[/li][/ul]
[li]and put mails that are adressed to internal recipients into the “goodmails” mailbox.[/li]In this case the filters should be bypassed.
But since I sometimes recieve malware mails with sender address RealUser@MyDomain.com, this bypass must be smart enough to distinguish between them.
[li]Is it possible to authenticate mailbox users with linux user authentication, but only for 2 of 4 linux users, and the other 2 do not have a mailbox?[/li][li]And in this case, both mailbox folders should be in an common folder and not in the users home folder.[/li][/ul]