I added the debug and now I get :
root@:/home# postdrop -r -vvvvvvvv test_newmail.eml
[...]
postdrop: chdir /var/spool/postfix
postdrop: open maildrop/A331AC2F9D
postdrop: send attr queue_id = A331AC2F9D
postdrop: vstream_fflush_some: fd 1 flush 21
queue_idA331AC2F9Dpostdrop: rec_put: type T len 17 data 1447929059
it's stuck there
and create an empty file in /var/spool/postfix/maildrop
root@:/var/spool/postfix/maildrop# ll
total 8
drwxrwxrw- 2 postfix postdrop 4096 Nov 19 11:30 ./
drwxr-xr-x 20 root root 4096 Nov 13 11:55 ../
-rw-r--r-- 1 root postdrop 0 Nov 19 11:30 A331AC2F9D
root@returnmail:/var/spool/postfix/maildrop#
nothing more in logs .... no error ... nothing ...
Stéphane
Le 19/11/2015 10:48, Stéphane MERLE a écrit :
I found the folder : /var/spool/postfix/maildrop
I also found a postdrop example, but not very usefull ;)
http://www.empire-woodworks.com/running_trim/post_drop.html
if I use : postdrop mailname.eml
I got a queueid85E11C0212
but it stay stuck here .... no log in the mail.log
Stéphane
Le 19/11/2015 10:22, Stéphane MERLE a écrit :
Hi,
Thanks for your help !
can I just change the To header within the files and move the file in
a postfix folder for it to "resend" it ?
if so .. which folder ...
Stéphane
Le 18/11/2015 16:02, Noel Jones a écrit :
On 11/18/2015 2:53 AM, Stéphane MERLE wrote:
Hi,
Someone made a little mistake (wrong TO) and some email (few
thousand) were received on the wrong postfix server.
now, I have files within a vmail folder.
I need to forward those email to the correct smtp server
(no-postfix) ... so I tried to do a batch script that use mail to
send back the mail ... The problem is that I need to impersonate the
headers (from/subject) correctly ... (I don't care about spf or dkim
as the email will only travel in the private lan, and I have disable
the check on the private network)
Is there a way with postfix or any other tools to resend those mail
(I need to change the To) ?
Thanks for your help.
Stéphane
PS: I apologize if my english is not correct enough to be
understood, I stay at your service for more informations.
You should be able to do this with the procmail tool.
Alternately, you can set up a second postfix instance and use
header_checks to mangle the headers as needed.
-- Noel Jones