Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 队列内容筛选器之后的后缀不存在';行不通_Linux_Bash_Ubuntu_Mail Server_Postfix - Fatal编程技术网

Linux 队列内容筛选器之后的后缀不存在';行不通

Linux 队列内容筛选器之后的后缀不存在';行不通,linux,bash,ubuntu,mail-server,postfix,Linux,Bash,Ubuntu,Mail Server,Postfix,我在postfix master.cf中添加了以下行 filter unix - n n - 10 pipe flags=Rq user=filter null_sender= argv=/tmp/filter.sh -f ${sender} -- ${recipient} 我的测试脚本filter.sh代码如下所示: #!/bin/sh SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here. export

我在postfix master.cf中添加了以下行

filter unix - n n - 10 pipe flags=Rq user=filter null_sender= argv=/tmp/filter.sh -f ${sender} -- ${recipient}
我的测试脚本filter.sh代码如下所示:

#!/bin/sh
SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here.
export HOME=/home/filter
SENDER="$2" #sender
shift
shift
shift
EMPFAENGER="$@" #empfaenger
#echo "SENDER=$SENDER" >> /tmp/logging.log
#echo "EMPFAE=$EMPFAENGER" >> /tmp/logging.log
touch itworked
cat | $SENDMAIL -f $SENDER -- $EMPFAENGER
当我发送电子邮件时,它将被发送,但我认为它不是通过脚本传输的

有人知道我配置错了什么吗

附言:

  • 用户“筛选器”存在,并且他拥有脚本的所有权限
  • Ubuntu 16.04.1
  • 已安装的最新Mailcow仅在本地使用
问候
克里斯,你错过了一步。在配置文件
master.cf
中,第一个服务是:

smtp      inet  n       -       -       -       -       smtpd 
你必须告诉
postfix
你想使用你的
过滤器,所以:

smtp      inet  n       -       -       -       -       smtpd -o content_filter=filter
编辑此文件后,不要忘记执行
postfix-reload