On Fri, Jul 3, 2020 at 3:44 AM Matus UHLAR - fantomas <uh...@fantomas.sk> wrote: > > >> Stats Student: > >> > 1) in addition to sending the messages to a script, is there a way to > >> > store the messages in a real mailstore ( Maildir ) ? > > >On Wed, Jul 1, 2020 at 8:31 AM Wietse Venema <wie...@porcupine.org> wrote: > >> Add a recipient with virtual_alias_maps, sender_bcc_maps, > >> recipient_bcc_maps, etc., and use the existing local(8) or virtual(8) > >> delivery agent to deliver to a maildir. > > On 01.07.20 13:34, Stats Student wrote: > >As for your other suggestion, I am sorry I didn't follow what you > >recommended specifically. > > you can alias the recipient to two destinations, where one sends mail to > script, other delivers it to mail store. > > you can do this in virtual alias table, alias table, in .forward file etc. > > Note that with alias table or .forward, failure to deliver to the script can > result in multiple delivery. > > -- > Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ > Warning: I wish NOT to receive e-mail advertising to this address. > Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. > Enter any 12-digit prime number to continue.
Thank you, but I still do not understand why I need to provide additional user aliases. If my system receives a message for us...@example.com, that message needs to go to two places - 1) the script and 2) Maildir mailstore. I don't want that message to now get addressed to user2@, user3@, etc, the same way that one can have messages addressed to root be aliased to real users - root: user1, user2, etc. Maybe I am not understanding aliases correctly. If anything, I would think the solution would be to add another virtual_transport, or maybe even a transport_map (which I did look into but couldn't see how to make it work for my problem). Maybe my use case is very unusual and I should just enhance my script to save messages in separate files (they'll be used to enhance the parser, not be read by users), but I am hoping I can avoid that.