Re: pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Viktor Dukhovni
On Wed, Dec 21, 2016 at 05:00:19PM +0100, Stéphane MERLE wrote: > lemail=$(cat) Instead of buffering the message into a shell variable, buffer it into a temporary file (and set a "trap" command to delete the file). You can then inspect the file content before sending the right message. It is po

Re: pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Stéphane MERLE
Hi Wietse, Le 21/12/2016 à 16:46, Wietse Venema a écrit : St?phane MERLE: at the top of my bash script I got : lemail=$(cat) Aaeeiigghh. Why not let the sendmail command read stdin. see more explanations below sendmail -i "$@" "$additional_recipient" < "$msg" will it work without the "-f

Re: pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Wietse Venema
St?phane MERLE: > at the top of my bash script I got : > > lemail=$(cat) Aaeeiigghh. Why not let the sendmail command read stdin. > sendmail -i "$@" "$additional_recipient" < "$msg" > > will it work without the "-f" ? If you invoke the script via pipe ... argv=/path/to/script -f ${sender}

Re: pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Stéphane MERLE
Hi Viktor, Le 21/12/2016 à 15:02, Viktor Dukhovni a écrit : On Wed, Dec 21, 2016 at 10:42:37AM +0100, Stéphane MERLE wrote: when I send the mail content via sendmail : sendmail -t $nouveau_destinataire <<< $lemail This is wrong on many levels. 1. It revives *header* recipients, possibl

Re: request improved logging for postfix.

2016-12-21 Thread Larry Kuenning
On 12/21/2016 5:42 AM, L.P.H. van Belle wrote: Hello Noel, Would you please stop say that im labeling.. im not. Noel n'a pas dit que vous êtes "labeling" quelque chose. Il a dit quand Postfix marque ("labels") une addresse IP comme "unknown". Le mot anglais "label" n'est pas toujours une ac

Re: pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Viktor Dukhovni
> On Dec 21, 2016, at 9:10 AM, Ansgar Wiechers wrote: > >>3. I has a mysterious "<<<", instead of "<". > > `... <<< $var` is bash 4 syntactic sugar for `echo $var | ...`. An exceedingly bad way to handle message content, especially sans quotes around "$var". -- Viktor.

Re: pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Viktor Dukhovni
On Wed, Dec 21, 2016 at 10:42:37AM +0100, Stéphane MERLE wrote: > when I send the mail content via sendmail : > > sendmail -t $nouveau_destinataire <<< $lemail This is wrong on many levels. 1. It revives *header* recipients, possibly creating mail loops and/or double deliveries. NEV

RE: request improved logging for postfix.

2016-12-21 Thread L . P . H . van Belle
Hello Noel, Would you please stop say that im labeling.. im not. Sorry im so bad in explaining things in english. I just trying to explain something based on what i did read here: http://www.postfix.org/postconf.5.html#reject_unknown_helo_hostname reject_unknown_helo_hostname (with Postfix < 2.

pipe and resend mail. was [noob question on filtering and sending mail to bdd or rest request]

2016-12-21 Thread Stéphane MERLE
Hi, I did manage to pipe my emails to a bash script which filter and push to an api some emails, but I would like to "forward" some of them to an email address. when I send the mail content via sendmail : sendmail -t $nouveau_destinataire <<< $lemail or sendmail $nouveau_destinataire <<< $