You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by D CATALIN BADIRCA <ba...@yahoo.com> on 2016/01/11 21:12:14 UTC
problem integrating spamassasin into postfix
Hi,
I am using with Postfix 10.2-RELEASE-p7 with Postfix 3.0.3 and I am trying to configure Spamassassin into my system.
After I create the spam filter.sh :
#!/bin/bash
SENDMAIL=/usr/local/sbin/sendmail
SPAMASSASSIN=/usr/local/bin/spamc
logger <<<"Spam filter piping to SpamAssassin, then to: $SENDMAIL $@"
${SPAMASSASSIN} | ${SENDMAIL} "$@"
exit $?
My master.cf looks like:
smtp inet n - n - - smtpd
-o content_filter=spamfilter
spamfilter unix - n n - - pipe
flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender} ${recipient}
I get the following error in maillog when I try to send email from outside my domain:
an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9: to=<ca...@domain.com>, relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0, status=deferred (te mporary failure. Command output: pipe: fatal: pipe_command: execvp /home/spamd/spamfilter.sh: No such file or directory )
Has anyone seen this and can help me out with an idea ?
Thank you very much !
Re: problem integrating spamassasin into postfix
Posted by D CATALIN BADIRCA <ba...@yahoo.com>.
Initially it was into /usr/local/bin but I changed the location and owner to spamd:spamd thinking it was a user rights error. Now it’s back to root:root 0755. I can copy it back into /usr/local/sbin and have the same result.
I followed the documentation from spamassasin wiki to get this script. Is is something wrong with it ?
Thank you !
On 11 Jan 2016, at 22:18, Reindl Harald <h....@thelounge.net> wrote:
>
>
> Am 11.01.2016 um 21:12 schrieb D CATALIN BADIRCA:
>> Hi,
>>
>> I am using with Postfix 10.2-RELEASE-p7 with Postfix 3.0.3 and I am
>> trying to configure Spamassassin into my system.
>>
>> After I create the spam filter.sh :
>>
>> #!/bin/bash
>> *SENDMAIL*=/usr/local/sbin/sendmail
>> *SPAMASSASSIN*=/usr/local/bin/spamc
>>
>> logger <<<"Spam filter piping to SpamAssassin, then to: $SENDMAIL $@"
>> ${SPAMASSASSIN} | ${SENDMAIL}"$@"
>>
>> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
>> to=<catalin.badirca@domain.com <ma...@domain.com>>,
>> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
>> status=deferred (temporary failure. Command output: pipe: fatal:
>> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or directory )
>>
>> Has anyone seen this and can help me out with an idea ?
>
> * since when are such scripts placed in /home
> * why using shell-scripts at all for such tasks
>
> only over my dead body i would pass possible amlware through shellscripts that way
>
> milter exists
> spamass-milter exists
>
> http://linux.die.net/man/1/spamass-milter
>
Re: problem integrating spamassasin into postfix
Posted by Reindl Harald <h....@thelounge.net>.
Am 11.01.2016 um 21:12 schrieb D CATALIN BADIRCA:
> Hi,
>
> I am using with Postfix 10.2-RELEASE-p7 with Postfix 3.0.3 and I am
> trying to configure Spamassassin into my system.
>
> After I create the spam filter.sh :
>
> #!/bin/bash
> *SENDMAIL*=/usr/local/sbin/sendmail
> *SPAMASSASSIN*=/usr/local/bin/spamc
>
> logger <<<"Spam filter piping to SpamAssassin, then to: $SENDMAIL $@"
> ${SPAMASSASSIN} | ${SENDMAIL}"$@"
>
> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
> to=<catalin.badirca@domain.com <ma...@domain.com>>,
> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
> status=deferred (temporary failure. Command output: pipe: fatal:
> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or directory )
>
> Has anyone seen this and can help me out with an idea ?
* since when are such scripts placed in /home
* why using shell-scripts at all for such tasks
only over my dead body i would pass possible amlware through
shellscripts that way
milter exists
spamass-milter exists
http://linux.die.net/man/1/spamass-milter
Re: problem integrating spamassasin into postfix
Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 12.01.16 14:28, Badirca Dorian-Catalin wrote:
>Thank you very much for your help! It was indeed the fact that bash was not
> the default shell. Who works on tcsh :)
thgis has nothing to do with "default" shell.
if your scripts contains "#!/bin/bash", tou must have executable /bin/bash,
otherwise you get "no such file or directory" error when trying to run a
script.
btw, I recommend using "#!/bin/sh" and avoid bash syntax whenever possible.
>Am 11.01.2016 um 22:04 schrieb Jari Fredriksson:
>>> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
>>> to=<catalin.badirca@domain.com <ma...@domain.com>>,
>>> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
>>> status=deferred (temporary failure. Command output: pipe: fatal:
>>> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or
>>> directory )
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
On the other hand, you have different fingers.
Re: problem integrating spamassasin into postfix
Posted by Badirca Dorian-Catalin <ba...@yahoo.com>.
Thank you very much for your help! It was indeed the fact that bash was not the default shell. Who works on tcsh :)
Sent from my BlackBerry 10 smartphone on the Orange network.
Original Message
From: Reindl Harald
Sent: Monday, 11 January 2016 23:16
To: users@spamassassin.apache.org
Subject: Re: problem integrating spamassasin into postfix
Am 11.01.2016 um 22:04 schrieb Jari Fredriksson:
>> My master.cf looks like:
>>
>> smtp inet n - n - - smtpd
>>
>> -o content_filter=spamfilter
>>
>> spamfilter unix - n n - - pipe
>> flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender}
>> ${recipient}
>>
>> I get the following error in maillog when I try to send email from
>> outside my domain:
>>
>> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
>> to=<catalin.badirca@domain.com <ma...@domain.com>>,
>> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
>> status=deferred (temporary failure. Command output: pipe: fatal:
>> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or
>> directory )
>>
>> Has anyone seen this and can help me out with an idea ?
>
>
> This might be because of the postfix chroot. Maybe it should be in
> /var/spool/postfix/home/spamd?
where do you see a chroot above?
column 5 is "n"
Re: problem integrating spamassasin into postfix
Posted by Jari Fredriksson <ja...@iki.fi>.
On 11.1.2016 23.16, Reindl Harald wrote:
>
>
> Am 11.01.2016 um 22:04 schrieb Jari Fredriksson:
>>> My master.cf looks like:
>>>
>>> smtp inet n - n - - smtpd
>>>
>>> -o content_filter=spamfilter
>>>
>>> spamfilter unix - n n - - pipe
>>> flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender}
>>> ${recipient}
>>>
>>> I get the following error in maillog when I try to send email from
>>> outside my domain:
>>>
>>> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
>>> to=<catalin.badirca@domain.com <ma...@domain.com>>,
>>> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
>>> status=deferred (temporary failure. Command output: pipe: fatal:
>>> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or
>>> directory )
>>>
>>> Has anyone seen this and can help me out with an idea ?
>>
>>
>> This might be because of the postfix chroot. Maybe it should be in
>> /var/spool/postfix/home/spamd?
>
> where do you see a chroot above?
> column 5 is "n"
>
>
Ok. I did not understand how it works. Thanks!
--
jarif.bit
Re: problem integrating spamassasin into postfix
Posted by Reindl Harald <h....@thelounge.net>.
Am 11.01.2016 um 22:04 schrieb Jari Fredriksson:
>> My master.cf looks like:
>>
>> smtp inet n - n - - smtpd
>>
>> -o content_filter=spamfilter
>>
>> spamfilter unix - n n - - pipe
>> flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender}
>> ${recipient}
>>
>> I get the following error in maillog when I try to send email from
>> outside my domain:
>>
>> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
>> to=<catalin.badirca@domain.com <ma...@domain.com>>,
>> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
>> status=deferred (temporary failure. Command output: pipe: fatal:
>> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or
>> directory )
>>
>> Has anyone seen this and can help me out with an idea ?
>
>
> This might be because of the postfix chroot. Maybe it should be in
> /var/spool/postfix/home/spamd?
where do you see a chroot above?
column 5 is "n"
Re: problem integrating spamassasin into postfix
Posted by Jari Fredriksson <ja...@iki.fi>.
On 11.1.2016 22.12, D CATALIN BADIRCA wrote:
> Hi,
>
> I am using with Postfix 10.2-RELEASE-p7 with Postfix 3.0.3 and I am
> trying to configure Spamassassin into my system.
>
> After I create the spam filter.sh :
>
> #!/bin/bash
> *SENDMAIL*=/usr/local/sbin/sendmail
> *SPAMASSASSIN*=/usr/local/bin/spamc
>
> logger <<<"Spam filter piping to SpamAssassin, then to: $SENDMAIL $@"
> ${SPAMASSASSIN} | ${SENDMAIL}"$@"
>
> exit$?
>
>
> My master.cf looks like:
>
> smtp inet n - n - - smtpd
>
> -o content_filter=spamfilter
>
> spamfilter unix - n n - - pipe
> flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender}
> ${recipient}
>
> I get the following error in maillog when I try to send email from
> outside my domain:
>
> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
> to=<catalin.badirca@domain.com <ma...@domain.com>>,
> relay=spamfilter, delay=3908, delays=3907/0.04/0/0.47, dsn=4.3.0,
> status=deferred (temporary failure. Command output: pipe: fatal:
> pipe_command: execvp /home/spamd/spamfilter.sh: No such file or directory )
>
> Has anyone seen this and can help me out with an idea ?
>
> Thank you very much !
This might be because of the postfix chroot. Maybe it should be in
/var/spool/postfix/home/spamd?
--
jarif.bit
Re: problem integrating spamassasin into postfix
Posted by Jesse Norell <je...@kci.net>.
On Mon, 2016-01-11 at 13:32 -0700, Jesse Norell wrote:
> On Mon, 2016-01-11 at 22:12 +0200, D CATALIN BADIRCA wrote:
> > Hi,
> >
> >
> > I am using with Postfix 10.2-RELEASE-p7 with Postfix 3.0.3 and I am
> > trying to configure Spamassassin into my system.
> >
> >
> > After I create the spam filter.sh :
> >
> >
> > #!/bin/bash
> > SENDMAIL=/usr/local/sbin/sendmail
> > SPAMASSASSIN=/usr/local/bin/spamc
> >
> >
> > logger <<<"Spam filter piping to SpamAssassin, then to: $SENDMAIL $@"
> > ${SPAMASSASSIN} | ${SENDMAIL} "$@"
> >
> >
> > exit $?
> >
> >
> >
> >
> > My master.cf looks like:
> >
> >
> > smtp inet n - n - - smtpd
> >
> >
> > -o content_filter=spamfilter
> >
> >
> > spamfilter unix - n n - - pipe
> > flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender}
> > ${recipient}
> >
> >
> > I get the following error in maillog when I try to send email from
> > outside my domain:
> >
> >
> > an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
> > to=<ca...@domain.com>, relay=spamfilter, delay=3908,
> > delays=3907/0.04/0/0.47, dsn=4.3.0, status=deferred (te mporary
> > failure. Command output: pipe: fatal: pipe_command:
> > execvp /home/spamd/spamfilter.sh: No such file or directory )
> >
> >
> > Has anyone seen this and can help me out with an idea ?
> >
> >
> > Thank you very much !
>
>
>
> /home/spamd/spamfilter.sh: No such file or directory
>
> sounds like you simply have the filename misspelled or in the wrong
> directory?
>
Also make sure you have bash installed at /bin/bash.
--
Jesse Norell
Kentec Communications, Inc.
970-522-8107 - www.kci.net
Re: problem integrating spamassasin into postfix
Posted by Jesse Norell <je...@kci.net>.
On Mon, 2016-01-11 at 22:12 +0200, D CATALIN BADIRCA wrote:
> Hi,
>
>
> I am using with Postfix 10.2-RELEASE-p7 with Postfix 3.0.3 and I am
> trying to configure Spamassassin into my system.
>
>
> After I create the spam filter.sh :
>
>
> #!/bin/bash
> SENDMAIL=/usr/local/sbin/sendmail
> SPAMASSASSIN=/usr/local/bin/spamc
>
>
> logger <<<"Spam filter piping to SpamAssassin, then to: $SENDMAIL $@"
> ${SPAMASSASSIN} | ${SENDMAIL} "$@"
>
>
> exit $?
>
>
>
>
> My master.cf looks like:
>
>
> smtp inet n - n - - smtpd
>
>
> -o content_filter=spamfilter
>
>
> spamfilter unix - n n - - pipe
> flags=Rq user=spamd argv=/home/spamd/spamfilter.sh -oi -f ${sender}
> ${recipient}
>
>
> I get the following error in maillog when I try to send email from
> outside my domain:
>
>
> an 11 22:05:17 mx postfix/pipe[2112]: 80E5A1695FF9:
> to=<ca...@domain.com>, relay=spamfilter, delay=3908,
> delays=3907/0.04/0/0.47, dsn=4.3.0, status=deferred (te mporary
> failure. Command output: pipe: fatal: pipe_command:
> execvp /home/spamd/spamfilter.sh: No such file or directory )
>
>
> Has anyone seen this and can help me out with an idea ?
>
>
> Thank you very much !
/home/spamd/spamfilter.sh: No such file or directory
sounds like you simply have the filename misspelled or in the wrong
directory?
--
Jesse Norell
Kentec Communications, Inc.
970-522-8107 - www.kci.net