Re: How to copy all outgoing mails based on sender definition
On Mon, 7 Jun 2021, Hagen Bauer wrote: is this really not possible or planed? No way? I really like the way opensmtpd is configured and I would hate to move back to postfix but this is really critical Any ideas or hints? On sendmail, I use the milter API. The filter API on opensmtpd might be able to do it. If the filter program gets a copy of the message to analyze - it can write it somewhere. Sorry, I haven't written an opensmtpd filter yet.
Re: How to copy all outgoing mails based on sender definition
Sorry for spamming the list, but noticed that part of the script was missing for some reason. line 66 should be concluded with Edgar On 6/8/21 4:31 PM, Edgar Pettijohn wrote: On 6/7/21 6:52 PM, Edgar Pettijohn wrote: On 6/7/21 6:35 PM, Thomas Bohl wrote: So I have a list of users defined on a server and I want to copy all mails of users with a specific mail domain. I don't think that is possible without writing a custom filter or mda. Do you need a copy of all: a) incoming mails b) outgoing mails c) all of the above Edgar Attached is a barely tested archive script. filter archive proc-exec "/path/to/script.pl" listen on egress port 587 auth filter "archive" Edgar
Re: How to copy all outgoing mails based on sender definition
On 6/7/21 6:52 PM, Edgar Pettijohn wrote: On 6/7/21 6:35 PM, Thomas Bohl wrote: So I have a list of users defined on a server and I want to copy all mails of users with a specific mail domain. I don't think that is possible without writing a custom filter or mda. Do you need a copy of all: a) incoming mails b) outgoing mails c) all of the above Edgar Attached is a barely tested archive script. filter archive proc-exec "/path/to/script.pl" listen on egress port 587 auth filter "archive" Edgar filter-archive.pl Description: Perl program
Re: How to copy all outgoing mails based on sender definition
As a workaround I will use postfix as a "filter" I created a seperate jail with postfix. This postfix configuration is very simple. Just relayhost, sender_bcc list and hostname. Within opensmtp config I am forwarding all mails that are sent from users to this postfix. This postfix is using the sender_bcc list and forwarding all mails to the archive server and then relaying all mails back to opensmtpd. This is certainly no solution for all organisational sizes but for me it should work. The configuration overhead is very low and I can combine the simplicity of opensmtpd with the function of postfix. On Mon, Jun 07, 2021 at 08:52:39AM +0200, Hagen Bauer wrote: is this really not possible or planed? No way? I really like the way opensmtpd is configured and I would hate to move back to postfix but this is really critical Any ideas or hints? Regards Hagen Hi Due to german laws all businesses are required to implement a long term archiv of business related mails. A majority of mail archiving software is integrated vie a simple mail forward of all mails. In postfix this can be done via sender_bcc_maps / receiver_bcc_maps I have found a way to forward all incoming mails based on the receiver but I am failing to find a way to do this for outgoing mails So I have a list of users defined on a server and I want to copy all mails of users with a specific mail domain. Any way to implement this in opensmtpd without routing all mails through postfix? Regards Hagen
Re: How to copy all outgoing mails based on sender definition
On 6/7/21 6:35 PM, Thomas Bohl wrote: So I have a list of users defined on a server and I want to copy all mails of users with a specific mail domain. I don't think that is possible without writing a custom filter or mda. Do you need a copy of all: a) incoming mails b) outgoing mails c) all of the above Edgar
Re: How to copy all outgoing mails based on sender definition
So I have a list of users defined on a server and I want to copy all mails of users with a specific mail domain. I don't think that is possible without writing a custom filter or mda.
Re: How to copy all outgoing mails based on sender definition
is this really not possible or planed? No way? I really like the way opensmtpd is configured and I would hate to move back to postfix but this is really critical Any ideas or hints? Regards Hagen Hi Due to german laws all businesses are required to implement a long term archiv of business related mails. A majority of mail archiving software is integrated vie a simple mail forward of all mails. In postfix this can be done via sender_bcc_maps / receiver_bcc_maps I have found a way to forward all incoming mails based on the receiver but I am failing to find a way to do this for outgoing mails So I have a list of users defined on a server and I want to copy all mails of users with a specific mail domain. Any way to implement this in opensmtpd without routing all mails through postfix? Regards Hagen