From: Noel Jones on
On 9/29/2009 6:08 AM, michel(a)casa.co.cu wrote:
> Wietse Venema <wietse(a)porcupine.org> escribi=F3:
>
>> michel(a)casa.co.cu:
>>> Hello
>>>
>>> I'm trying to integrate bogofilter with postfix, I followed the steps=
in
>>> the documentation for installation and configuration:
>>
>> Except that you also use MailScanner, which interferes with
>> Postfix content filtering.
>>
>
> You tell me that MailScanner is responsible for all this?
>

From your original message:

> Sep 28 17:36:14 mailserver sendmail[12738]: n8SLaEwa012738:
> from=3Dmichel(a)casa.co.cu, size=3D936, class=3D0, nrcpts=3D1,
> msgid=3D<1254174126.25419.108.camel(a)michel.home.com>,
> relay=3Dfilter(a)localhost

So the main problem is that you need to uninstall or disable=20
sendmail. That's what is causing the loop.

But MailScanner uses a non-standard and unsupported interface=20
to postfix, and is likely to cause other problems when=20
combined with a standard content_filter, such as processing=20
mail multiple times and other strange problems.

If you really want to use MailScanner, you shouldn't use any=20
other content filters or milters, and don't expect to get any=20
support for postfix + MailScanner on this list.

But a better solution is to drop MailScanner and use something=20
with a standard, supported interface to postfix.

-- Noel Jones

From: michel on
Wietse Venema <wietse(a)porcupine.org> escribi=F3:

> michel(a)casa.co.cu:
>> Wietse Venema <wietse(a)porcupine.org> escribi?:
>>
>> > michel(a)casa.co.cu:
>> >> Hello
>> >>
>> >> I'm trying to integrate bogofilter with postfix, I followed the steps =
in
>> >> the documentation for installation and configuration:
>> >
>> > Except that you also use MailScanner, which interferes with
>> > Postfix content filtering.
>> >
>> > =09Wietse
>> >
>>
>> Hi Wietse
>>
>> Thank you for responding so quickly.
>>
>> As commented in my previous message, in my transport table for each
>> domain declared on my network server to which I give you my email so
>> that it reaches its final destination, when I apply the filter ignores
>> the table, never comes out.
>>
>> You tell me that MailScanner is responsible for all this?
>
> I support Postfix. If the Postfix content filter mis-behaves
> WITHOUT MailScanner, then I will fix it.
>
> =09Wietse
>
>> What can I do here?
>>
>> I can not remove it, as do the virus check each message to reach me??
>>
>> What can I do?
>>
>> mailserver.home.com local
>> home.com virtual:[192.168.25.8]
>> home.cu dovecot:[192.168.25.8]
>>

I will make a test , without the mailscanner and feedback to you

so with amavis you can think the loops problem disappear?



----------------------------------------------
Webmail, servicio de correo electronico
Casa de las Americas - La Habana, Cuba.

From: "/dev/rob0" on
On Monday 28 September 2009 22:33:08 michel(a)casa.co.cu wrote:
> I'm trying to integrate bogofilter with postfix, I followed the
> steps in the documentation for installation and configuration:

Bogofilter documentation, probably. Questions regarding that might
belong on a list specific to that project.

> I'm using CentOS 5.3 with postfix-2.3.3-2.1, my users are virtuals,
> they are in the active directory in windows.

That's a complex setup. First things first, you need to learn how to
manage your OS. RHEL is extensively documented. Next, consider
simpler alternatives. You're going to have a lot of frustration as
you try to understand what you have already done. It does not need to
be so complicated.

> When I send a message, my server must deliver the message to an
> external server, said earlier in the table of transport,
> following testing of the filter in the master.cf file the
> messages stop being delivered to the external server and the
> message fall into a cycle.

I think I understand all that. What I don't understand is WHY you
thought this was a good idea. :)

> I created the user under which the filter will work, given
> execution permissions to the script and the owner of it.
>
> The question is because the script is used to deliver these
> messages sendmail, postfix why not?

And this would be a CentOS/RHEL question. If you're going to have
Postfix as your MTA, get the sendmail.org MTA out of the way.

> This is my config in master.cf file:
snip

> Sep 28 17:36:13 mailserver postfix/smtpd[12730]: connect from
> michel.home.com[192.168.25.20]

Home.com is a real Internet domain. You should use a domain name that
would never appear on the Internet, for internal naming. I use
subdomains of my real domain, which I control, and also a made-up
TLD, .vpn.

> Sep 28 17:36:13 mailserver postfix/smtpd[12730]: 911B5E03B5:
> client=michel.home.com[192.168.25.20]
>
> Sep 28 17:36:13 mailserver postfix/cleanup[12733]: 911B5E03B5: hold:
> header Received: from [192.168.25.20] (michel.home.com
> [192.168.25.20])??by mailserver.home.com (Postfix) with ESMTP id
> 911B5E03B5??for <pepe(a)gmail.com>; Mon, 28 Sep 2009 17:36:13 -0400 (CDT)
> from michel.home.com[192.168.25.20]; from=<michel(a)casa.co.cu>
> to=<pepe(a)gmail.com> proto=ESMTP helo=<[192.168.25.20]>
>
> Sep 28 17:36:13 mailserver postfix/cleanup[12733]: 911B5E03B5:
> message-id=<1254174126.25419.108.camel(a)michel.home.com>
>
> Sep 28 17:36:13 mailserver postfix/smtpd[12730]: disconnect from
> michel.home.com[192.168.25.20]
>
> Sep 28 17:36:14 mailserver MailScanner[26203]: New Batch: Scanning 1
> messages, 1176 bytes
>
> Sep 28 17:36:14 mailserver MailScanner[26203]: Spam Checks: Starting
>
> Sep 28 17:36:14 mailserver MailScanner[26203]: Virus and Content
> Scanning: Starting
>
> Sep 28 17:36:14 mailserver MailScanner[26203]: Requeue: 911B5E03B5.B54EA
> to 60CA9E03C0
>
> Sep 28 17:36:14 mailserver MailScanner[26203]: Uninfected: Delivered 1
> messages

Mailscanner, as you know, is not recommended for Postfix, and will
not be supported on this list. But in this case it does not seem to
be the cause of the mail loop.

> Sep 28 17:36:14 mailserver postfix/qmgr[12728]: 60CA9E03C0:
> from=<michel(a)casa.co.cu>, size=856, nrcpt=1 (queue active)

Here's the post-Mailscanner message.

> Sep 28 17:36:14 mailserver sendmail[12738]: n8SLaEwa012738:
> Authentication-Warning: mailserver.home.com: filter set sender to
> michel(a)casa.co.cu using -f
>
> Sep 28 17:36:14 mailserver sendmail[12738]: n8SLaEwa012738:
> from=michel(a)casa.co.cu, size=936, class=0, nrcpts=1,
> msgid=<1254174126.25419.108.camel(a)michel.home.com>,
> relay=filter(a)localhost

Oops. That's not Postfix. Postfix logs all say "postfix" in them.

> Sep 28 17:36:14 mailserver postfix/smtpd[12730]: connect from
> localhost.localdomain[127.0.0.1]

And yet it submits mail back to Postfix.

> Sep 28 17:36:14 mailserver postfix/smtpd[12730]: C059CE03B5:
> client=localhost.localdomain[127.0.0.1]
>
> Sep 28 17:36:14 mailserver postfix/cleanup[12733]: C059CE03B5: hold:
> header Received: from mailserver.home.com (localhost.localdomain
> [127.0.0.1])??by mailserver.home.com (Postfix) with ESMTP id
> C059CE03B5??for <pepe(a)gmail.com>; Mon, 28 Sep 2009 17:36:14 -0400 (CDT
> from localhost.localdomain[127.0.0.1]; from=<michel(a)casa.co.cu>
> to=<pepe(a)gmail.com> proto=ESMTP helo=<mailserver.home.com>

There's your loop.

Best advice to proceed, spend some time getting to know how to work
with/in your OS. Mail administration is challenging for experienced
system administrators! Your problem here is that you're not an
experienced system administrator, so it's going to be much more
difficult for you.

Next, look at more sane and clean methods of spam control. Simple
HELO checks (specifically reject_non_fqdn_helo_hostname and
reject_invalid_helo_hostname) and Spamhaus Zen will get rid of the
vast majority of the spam.
--
Offlist mail to this address is discarded unless
"/dev/rob0" or "not-spam" is in Subject: header
From: Michel Bulgado on
On Tue, 2009-09-29 at 07:41 -0500, /dev/rob0 wrote:
> On Monday 28 September 2009 22:33:08 michel(a)casa.co.cu wrote:
> > I'm trying to integrate bogofilter with postfix, I followed the
> > steps in the documentation for installation and configuration:
>
> Bogofilter documentation, probably. Questions regarding that might
> belong on a list specific to that project.
>
> > I'm using CentOS 5.3 with postfix-2.3.3-2.1, my users are virtuals,
> > they are in the active directory in windows.
>
> That's a complex setup. First things first, you need to learn how to
> manage your OS. RHEL is extensively documented. Next, consider
> simpler alternatives. You're going to have a lot of frustration as
> you try to understand what you have already done. It does not need to
> be so complicated.
>
> > When I send a message, my server must deliver the message to an
> > external server, said earlier in the table of transport,
> > following testing of the filter in the master.cf file the
> > messages stop being delivered to the external server and the
> > message fall into a cycle.
>
> I think I understand all that. What I don't understand is WHY you
> thought this was a good idea. :)
>
> > I created the user under which the filter will work, given
> > execution permissions to the script and the owner of it.
> >
> > The question is because the script is used to deliver these
> > messages sendmail, postfix why not?
>
> And this would be a CentOS/RHEL question. If you're going to have
> Postfix as your MTA, get the sendmail.org MTA out of the way.
>
> > This is my config in master.cf file:
> snip
>
> > Sep 28 17:36:13 mailserver postfix/smtpd[12730]: connect from
> > michel.home.com[192.168.25.20]
>
> Home.com is a real Internet domain. You should use a domain name that
> would never appear on the Internet, for internal naming. I use
> subdomains of my real domain, which I control, and also a made-up
> TLD, .vpn.
>
> > Sep 28 17:36:13 mailserver postfix/smtpd[12730]: 911B5E03B5:
> > client=michel.home.com[192.168.25.20]
> >
> > Sep 28 17:36:13 mailserver postfix/cleanup[12733]: 911B5E03B5: hold:
> > header Received: from [192.168.25.20] (michel.home.com
> > [192.168.25.20])??by mailserver.home.com (Postfix) with ESMTP id
> > 911B5E03B5??for <pepe(a)gmail.com>; Mon, 28 Sep 2009 17:36:13 -0400 (CDT)
> > from michel.home.com[192.168.25.20]; from=<michel(a)casa.co.cu>
> > to=<pepe(a)gmail.com> proto=ESMTP helo=<[192.168.25.20]>
> >
> > Sep 28 17:36:13 mailserver postfix/cleanup[12733]: 911B5E03B5:
> > message-id=<1254174126.25419.108.camel(a)michel.home.com>
> >
> > Sep 28 17:36:13 mailserver postfix/smtpd[12730]: disconnect from
> > michel.home.com[192.168.25.20]
> >
> > Sep 28 17:36:14 mailserver MailScanner[26203]: New Batch: Scanning 1
> > messages, 1176 bytes
> >
> > Sep 28 17:36:14 mailserver MailScanner[26203]: Spam Checks: Starting
> >
> > Sep 28 17:36:14 mailserver MailScanner[26203]: Virus and Content
> > Scanning: Starting
> >
> > Sep 28 17:36:14 mailserver MailScanner[26203]: Requeue: 911B5E03B5.B54EA
> > to 60CA9E03C0
> >
> > Sep 28 17:36:14 mailserver MailScanner[26203]: Uninfected: Delivered 1
> > messages
>
> Mailscanner, as you know, is not recommended for Postfix, and will
> not be supported on this list. But in this case it does not seem to
> be the cause of the mail loop.
>
> > Sep 28 17:36:14 mailserver postfix/qmgr[12728]: 60CA9E03C0:
> > from=<michel(a)casa.co.cu>, size=856, nrcpt=1 (queue active)
>
> Here's the post-Mailscanner message.
>
> > Sep 28 17:36:14 mailserver sendmail[12738]: n8SLaEwa012738:
> > Authentication-Warning: mailserver.home.com: filter set sender to
> > michel(a)casa.co.cu using -f
> >
> > Sep 28 17:36:14 mailserver sendmail[12738]: n8SLaEwa012738:
> > from=michel(a)casa.co.cu, size=936, class=0, nrcpts=1,
> > msgid=<1254174126.25419.108.camel(a)michel.home.com>,
> > relay=filter(a)localhost
>
> Oops. That's not Postfix. Postfix logs all say "postfix" in them.
>
> > Sep 28 17:36:14 mailserver postfix/smtpd[12730]: connect from
> > localhost.localdomain[127.0.0.1]
>
> And yet it submits mail back to Postfix.
>
> > Sep 28 17:36:14 mailserver postfix/smtpd[12730]: C059CE03B5:
> > client=localhost.localdomain[127.0.0.1]
> >
> > Sep 28 17:36:14 mailserver postfix/cleanup[12733]: C059CE03B5: hold:
> > header Received: from mailserver.home.com (localhost.localdomain
> > [127.0.0.1])??by mailserver.home.com (Postfix) with ESMTP id
> > C059CE03B5??for <pepe(a)gmail.com>; Mon, 28 Sep 2009 17:36:14 -0400 (CDT
> > from localhost.localdomain[127.0.0.1]; from=<michel(a)casa.co.cu>
> > to=<pepe(a)gmail.com> proto=ESMTP helo=<mailserver.home.com>
>
> There's your loop.
>
> Best advice to proceed, spend some time getting to know how to work
> with/in your OS. Mail administration is challenging for experienced
> system administrators! Your problem here is that you're not an
> experienced system administrator, so it's going to be much more
> difficult for you.
>
> Next, look at more sane and clean methods of spam control. Simple
> HELO checks (specifically reject_non_fqdn_helo_hostname and
> reject_invalid_helo_hostname) and Spamhaus Zen will get rid of the
> vast majority of the spam.


Hello rob0

It is obvious that in order to implement bogofilter with postfix I had
to go to the official website of bogofilter, I have read documentation,
the FAQ, and even before making any post in the list of postfix I did in
theirs, I presented my problem to reach a solution. but I had the same
sort of tripping over a list as active as postfix, which is why I have
not yet received a reply from them.

home.com use as an example, and I know there is a domain registered by
someone else, I modified my logs, changing the hostname, as well as IP
address, such as domains, is a policy that before you use any post lists
on the Internet. problems?


MailScanner Maybe not the most recommended to work with postfix, I do
not know the reasons. It happens that when I started working here and
was already installed, I have had, seeing that it works well, detects
and removes viruses from messages.

if something works well, it is better not touch it, do not you think?

I have implemented in my external mail servers several mechanisms to
stop spammers, I am using postgrey + policy-weight and blacklists such
as Spamhaus (Zen) in addition
smtpd_helo_restrictions. with this slows down the spam, but I keep
getting spam messages. is therefore wish to implement bogofilter.

No offense, maybe not as genius as it is you, or have that much
experience you have. but I am interested in improving and maintaining my
system with the knowledge I possess

Regards

Michel


From: Stan Hoeppner on
Michel Bulgado put forth on 9/29/2009 9:22 AM:

> I have implemented in my external mail servers several mechanisms to
> stop spammers, I am using postgrey + policy-weight and blacklists such
> as Spamhaus (Zen) in addition
> smtpd_helo_restrictions. with this slows down the spam, but I keep
> getting spam messages. is therefore wish to implement bogofilter.
>
> No offense, maybe not as genius as it is you, or have that much
> experience you have. but I am interested in improving and maintaining my
> system with the knowledge I possess

Given your situation, may I humbly suggest you also join the spam-l
mailing list:

http://spam-l.com/mailman/listinfo/spam-l

Collective spam fighting experience there going back to pre-1996. There
are many Postfix users there, some who x-over to this list, including
mouss, /dev/rob0, and myself (apologies to others I missed).

Specifically, you may receive better attention there as to blocking the
"spams that are still getting through".

Adding to the choir, removing sendmail is the first step to solving your
immediate problem.

--
Stan