Hello,
I use the emailrelay 2.4.1v.
I am making a filter to processing incoming emails by home users directory (in bash).
So incoming mails coming in $spooldirectory with ".new" file extension.
next my filter coming :
#!/bin/ash
envelope=$2
content=$1
path="/mnt/sdb1/spool/"
var=$(awk '{if ($1=="X-MailRelay-Authentication:"){print $2;exit}}' $envelope)
if [ -z "${var}" ];
then
exit 1;
else
file_envelope=$(basename $envelope .new)
#file_envelope=$envelope
cp -rp "$envelope" "$path""$var""/""$file_envelope"
if [ $? -ne 0 ]
then
exit 1;
else
rm "$file_envelope"
fi
cp -rp "$content" "$path""$var""/"
if [ $? -ne 0 ]
then
exit 1;
else
rm "$content"
fi
fi
exit 0;
It's copy mail.envelope and mail.content in home directory and remove them from spool, and clean the spool, but it's stay file.envelope cause emailrelay need to rename file.envelope.new in file.envelope at the end of the filter and so return a failed error (1).
(using openwrt 23.05.0-rc4)
Its not a bug but I don't know where is the place for this.
Hello, I use the emailrelay 2.4.1v. I am making a filter to processing incoming emails by home users directory (in bash).
So incoming mails coming in $spooldirectory with ".new" file extension. next my filter coming :
It's copy mail.envelope and mail.content in home directory and remove them from spool, and clean the spool, but it's stay file.envelope cause emailrelay need to rename file.envelope.new in file.envelope at the end of the filter and so return a failed error (1).
(using openwrt 23.05.0-rc4)
Its not a bug but I don't know where is the place for this.