Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how make a file copy of incoming email? #2364

Open
comsyspro opened this issue Feb 17, 2024 · 0 comments
Open

how make a file copy of incoming email? #2364

comsyspro opened this issue Feb 17, 2024 · 0 comments

Comments

@comsyspro
Copy link

comsyspro commented Feb 17, 2024

when postfix receives an incoming email to
info@test.net
it is saved into the directory
/home/user-data/mail/mailboxes/test.net/info/new
and the filename will become something like
1708161199.M378768P25198.mail.test.net,S=4323,W=4437
now i want to make a copy of this filename and save it to another folder for example to /home/copy.

i have 2 options to do this:

  1. make a filewatcher script which observes recursively /home/user-data/mail/mailboxes folder and detects new files arriving in */new folders and copy this file to /home/copy/myemail.eml
  2. piping the incoming email to a script which reads it over stdin and saves the complete content to /home/copy/myemail.eml

but i'm interested if there are also another options?

  1. does postfix have a setting how it will create the filename and can you change this?
  2. it seems that postfix uses a timestamp and a hashvalue and produces this 1708161199.M378768P25198.mail.test.net,S=4323,W=4437 as filename. where or in which config file is the creation of this naming convetion defined and can you somehow influence it?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant