Re: MDA exited prematurely when using custom script

2024-03-09 Thread Simon Hoffmann
Philipp wrote: > [2024-03-05 17:07] Simon Hoffmann > > hmm... Based on Philipps idea I have modified my script as follows: > > > > > > > > #!/bin/bash > > > > cat - > /tmp/notfallemail > > Have you notice that this is racy? A better (not elegant solution) is > something like: > > mail=`cat` Ye

Re: MDA exited prematurely when using custom script

2024-03-07 Thread Philipp
[2024-03-05 17:07] Simon Hoffmann > hmm... Based on Philipps idea I have modified my script as follows: > > > > #!/bin/bash > > cat - > /tmp/notfallemail Have you notice that this is racy? A better (not elegant solution) is something like: mail=`cat` > from=`cat /tmp/notfallemail | head -n 50 |

Re: MDA exited prematurely when using custom script

2024-03-05 Thread Simon Hoffmann
hmm... Based on Philipps idea I have modified my script as follows: #!/bin/bash cat - > /tmp/notfallemail from=`cat /tmp/notfallemail | head -n 50 | grep -i ^From` from=${from// /+} subject=`cat /tmp/notfallemail | head -n 50 | grep -i ^Subject` subject=${subject// /+} out=`curl -g "https

Re: MDA exited prematurely when using custom script

2024-03-05 Thread gilles
March 5, 2024 4:19 PM, "Simon Hoffmann" wrote: > gil...@poolp.org wrote: > >> Does your script exit with 0 ? > > If the curl output is "OK", then I exit with "exit 0". I have even removed > the "if" > and have just set a static "exit 0" at the end no matter if the curl before > was > successf

Re: MDA exited prematurely when using custom script

2024-03-05 Thread Simon Hoffmann
Philipp wrote: > Hi Simon > > [2024-03-05 10:49] Simon Hoffmann > > in my virtual users file, I have specified an external script additionally > > to > > delivery to mailboxes. > > > > > > emerge...@domain.tlduser1,user2,|/etc/smtpd/send_sms.sh > > > > Local delivery to the mailboxes w

Re: MDA exited prematurely when using custom script

2024-03-05 Thread Simon Hoffmann
gil...@poolp.org wrote: > Does your script exit with 0 ? If the curl output is "OK", then I exit with "exit 0". I have even removed the "if" and have just set a static "exit 0" at the end no matter if the curl before was successful or not. This did not work as well. However, Philipp might be

Re: MDA exited prematurely when using custom script

2024-03-05 Thread Philipp
Hi Simon [2024-03-05 10:49] Simon Hoffmann > in my virtual users file, I have specified an external script additionally to > delivery to mailboxes. > > > emerge...@domain.tlduser1,user2,|/etc/smtpd/send_sms.sh > > Local delivery to the mailboxes works fine. > The script itself is called

Re: MDA exited prematurely when using custom script

2024-03-05 Thread gilles
Does your script exit with 0 ? March 5, 2024 10:49 AM, "Simon Hoffmann" wrote: > Hey list, > > in my virtual users file, I have specified an external script additionally to > delivery to mailboxes. > > emerge...@domain.tld user1,user2,|/etc/smtpd/send_sms.sh > > Local delivery to the mailb