<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>DIYMacServer &#187; Tag: filter - Recent Posts</title>
<link>http://diymacserver.com/forum/</link>
<description>DIYMacServer &#187; Tag: filter - Recent Posts</description>
<language>en</language>
<pubDate>Wed, 08 Feb 2012 06:01:34 +0000</pubDate>

<item>
<title>Priz on "/usr/local/bin/maildrop: Cannot have world/group permissions"</title>
<link>http://diymacserver.com/forum/topic/usrlocalbinmaildrop-cannot-have-worldgroup-permissions#post-326</link>
<pubDate>Mon, 26 Feb 2007 00:04:10 +0000</pubDate>
<dc:creator>Priz</dc:creator>
<guid isPermaLink="false">326@http://diymacserver.com/forum/</guid>
<description>&#60;p&#62;Hello,&#60;br /&#62;
I had an error when the postfix server received an email :&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;&#60;code&#62;postfix/pipe[1692]: 8699098029C:to=&#38;lt;xxxxxxx@xxxxxxxx.net&#38;gt;,relay=maildrop, delay=3100, delays=3100/0.02/0/0.04, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maildrop: Cannot have world/group permissions on the filter file - for your own good. )&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Answer from Richard :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;The rights should be:
-rw-------  vmail  wheel  /etc/maildroprc&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and I complete :&#60;/p&#62;
&#60;p&#62;&#60;code&#62;Don&#38;#39;t forget to restart services authdaemond, maildrop and postfix&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Thank's Richard&#60;/p&#62;&#60;/blockquote&#62;</description>
</item>
<item>
<title>Richard on "Regexp instead of PCRE in postfix access?"</title>
<link>http://diymacserver.com/forum/topic/regexp-instead-of-pcre-in-postfix-access#post-281</link>
<pubDate>Sat, 27 Jan 2007 09:05:20 +0000</pubDate>
<dc:creator>Richard</dc:creator>
<guid isPermaLink="false">281@http://diymacserver.com/forum/</guid>
<description>The thing is that you are mixing up two seperate functions into one.&#60;br /&#62;
&#60;br /&#62;
The listing of the PCRE filter &#60;p&#62;&#60;code&#62;/./&#38;nbsp; &#38;nbsp; &#38;nbsp;FILTER dspam&#38;#58;dspam&#60;/code&#62;&#60;/p&#62; in the option &#38;quot;smtpd_recipient_restrictions&#38;quot;. Is only there to filter incoming mail only. If you leave out this option all outgoing mail will be filtered as well which is not something you would want.&#60;br /&#62;
&#60;br /&#62;
The retraining transports are there for another reason, you want to feed dspam with incorrect identified emails and you don't want it delivered to a users mailbox. Therefore you define a separate transport.&#60;br /&#62;
&#60;br /&#62;
In main.cf you add the following lines to do that&#60;br /&#62;
&#60;p&#62;&#60;code&#62;recipient_delimiter = - &#60;/code&#62;&#60;/p&#62; (to separate the username from the -spam in the mail address)&#60;br /&#62;
&#60;br /&#62;
and &#60;br /&#62;
&#60;p&#62;&#60;code&#62;transport_maps = hash&#38;#58;/etc/postfix/transport&#60;br /&#62;
local_recipient_maps = proxy&#38;#58;unix&#38;#58;passwd.byname $alias_maps $transport_maps &#60;/code&#62;&#60;/p&#62;&#60;br /&#62;
to define the transports:&#60;br /&#62;
&#60;br /&#62;
and then you ceate a file called transport and add:&#60;br /&#62;
&#60;p&#62;&#60;code&#62;&#60;a href=&#34;mailto:spam@mydomain.tld&#34;&#62;spam@mydomain.tld&#60;/a&#62;&#38;nbsp; &#38;nbsp; dspam-retrain&#38;#58;spam&#60;br /&#62;
&#60;a href=&#34;mailto:ham@mydomain.tld&#34;&#62;ham@mydomain.tld&#60;/a&#62;&#38;nbsp; &#38;nbsp; &#38;nbsp;dspam-retrain&#38;#58;innocent &#60;br /&#62;
&#60;a href=&#34;mailto:notspam@mydomain.tld&#34;&#62;notspam@mydomain.tld&#60;/a&#62;&#38;nbsp; &#38;nbsp; &#38;nbsp;dspam-retrain&#38;#58;innocent &#60;/code&#62;&#60;/p&#62;&#60;br /&#62;
&#60;br /&#62;
do a &#60;p&#62;&#60;code&#62;sudo postmap transport&#60;/code&#62;&#60;/p&#62; to convert it.&#60;br /&#62;
&#60;br /&#62;
and add&#60;br /&#62;
&#60;p&#62;&#60;code&#62;dspam-retrain&#38;nbsp; &#38;nbsp;unix&#38;nbsp; &#38;nbsp; -&#38;nbsp; &#38;nbsp; &#38;nbsp; &#38;nbsp;n&#38;nbsp; &#38;nbsp; &#38;nbsp; &#38;nbsp;n&#38;nbsp; &#38;nbsp; &#38;nbsp; &#38;nbsp;-&#38;nbsp; &#38;nbsp; &#38;nbsp; &#38;nbsp;10&#38;nbsp; &#38;nbsp; &#38;nbsp; pipe&#60;br /&#62;
&#38;nbsp; flags=Ru user=dspam argv=/usr/local/bin/dspam-retrain $nexthop $sender $recipient &#60;/code&#62;&#60;/p&#62;&#60;br /&#62;
as a transport in our master.cf for retraining purposes !&#60;br /&#62;
&#60;br /&#62;
The retraining shell script you can download from &#60;a href=&#34;http://switch.richard5.net/serverinstall/dspam-retrain&#34;&#62;here.&#60;/a&#62;&#60;br /&#62;
&#60;br /&#62;
Hope this helps !</description>
</item>
<item>
<title>grgcombs on "Regexp instead of PCRE in postfix access?"</title>
<link>http://diymacserver.com/forum/topic/regexp-instead-of-pcre-in-postfix-access#post-279</link>
<pubDate>Fri, 26 Jan 2007 23:53:09 +0000</pubDate>
<dc:creator>grgcombs</dc:creator>
<guid isPermaLink="false">279@http://diymacserver.com/forum/</guid>
<description>Oh ... I think I see what you're saying.  my users won't be able to use those transports at all will they ..... can you show me how to setup the retraining as tranport maps instead?&#60;br /&#62;
&#60;br /&#62;
g</description>
</item>
<item>
<title>grgcombs on "Regexp instead of PCRE in postfix access?"</title>
<link>http://diymacserver.com/forum/topic/regexp-instead-of-pcre-in-postfix-access#post-278</link>
<pubDate>Fri, 26 Jan 2007 23:50:40 +0000</pubDate>
<dc:creator>grgcombs</dc:creator>
<guid isPermaLink="false">278@http://diymacserver.com/forum/</guid>
<description>I figured it out ... I went back and redid things since I last posted to be more like yours&#60;br /&#62;
&#60;br /&#62;
in main.cf I added:&#60;br /&#62;
&#60;br /&#62;
check_client_access regexp:/etc/postfix/dspam_regexp&#60;br /&#62;
&#60;br /&#62;
instead of the &#38;quot;pcre:&#38;quot; business...&#60;br /&#62;
&#60;br /&#62;
at the bottom I put:&#60;br /&#62;
dspam_destination_recipient_limit =1 &#60;br /&#62;
dspam-add_destination_recipient_limit = 1 &#60;br /&#62;
dspam-del_destination_recipient_limit = 1 &#60;br /&#62;
&#60;br /&#62;
and then this went in my dspam_regexp file:&#60;br /&#62;
/^spam-(.*)/ FILTER dspam-add:${1} &#60;br /&#62;
/^ham-(.*)/ FILTER dspam-del:${1} &#60;br /&#62;
/^(.*)/ FILTER dspam:${1} &#60;br /&#62;
&#60;br /&#62;
This way it's more like yours, but I don't have to worry about a retraining script, since I can just use these other transport methods for training.&#60;br /&#62;
&#60;br /&#62;
The other part of my problem is that since I'm doing my own parsing of the user names, I had to turn off the parsing in the dspam.conf file.&#60;br /&#62;
&#60;br /&#62;
g</description>
</item>
<item>
<title>Richard on "Regexp instead of PCRE in postfix access?"</title>
<link>http://diymacserver.com/forum/topic/regexp-instead-of-pcre-in-postfix-access#post-276</link>
<pubDate>Fri, 26 Jan 2007 23:31:01 +0000</pubDate>
<dc:creator>Richard</dc:creator>
<guid isPermaLink="false">276@http://diymacserver.com/forum/</guid>
<description>where did you put the FILTER stuff in in main.cf. If you put it in the same section as the documented filter stuff than it won't work as that filter is only hit by mail coming from the outside world and not for authenticated users !&#60;br /&#62;
&#60;br /&#62;
You should put the retrain stuff in transport maps !</description>
</item>
<item>
<title>grgcombs on "Regexp instead of PCRE in postfix access?"</title>
<link>http://diymacserver.com/forum/topic/regexp-instead-of-pcre-in-postfix-access#post-273</link>
<pubDate>Fri, 26 Jan 2007 17:49:12 +0000</pubDate>
<dc:creator>grgcombs</dc:creator>
<guid isPermaLink="false">273@http://diymacserver.com/forum/</guid>
<description>So I think I've found some sample regular expression code that *might* work in getting dspam running with postfix without PCRE...  Granted I'm not sure what's happening, but I think this will break out &#60;a href=&#34;mailto:spam-person@whoever.com&#34;&#62;spam-person@whoever.com&#60;/a&#62;, &#60;a href=&#34;mailto:ham-person@whoever.com&#34;&#62;ham-person@whoever.com&#60;/a&#62;, and &#60;a href=&#34;mailto:person@whoever.com&#34;&#62;person@whoever.com&#60;/a&#62; ... and send them off to different parts of postfix to do handle training for dspam....&#60;br /&#62;
&#60;br /&#62;
/^spam-(.*)/ FILTER dspam-add:${1} &#60;br /&#62;
/^ham-(.*)/ FILTER dspam-del:${1} &#60;br /&#62;
/(.*)/ FILTER dspam:${1}&#60;br /&#62;
&#60;br /&#62;
I'm not sure if the last one is necessary...&#60;br /&#62;
&#60;br /&#62;
And then here's what goes in master.cf:&#60;br /&#62;
&#60;br /&#62;
dspam-add unix - n n - - pipe &#60;br /&#62;
    flags=Rhq user=dspam argv=/usr/bin/dspam --user ${user}@${nexthop} --class=spam --source=error &#60;br /&#62;
dspam-del unix - n n - - pipe &#60;br /&#62;
    flags=Rhq user=dspam argv=/usr/bin/dspam --user ${user}@${nexthop} --class=innocent --source=error &#60;br /&#62;
&#60;br /&#62;
Now I'm not sure if this regexp needs to go in transport_maps, or access, or what...&#60;br /&#62;
&#60;br /&#62;
Anyone do anything like this yet?</description>
</item>

</channel>
</rss>

