postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: postfix doubling emails and spam!

Re: postfix doubling emails and spam!

From: Noel Jones <njones_at_nospam>
Date: Wed Oct 27 2010 - 22:15:00 GMT
To: postfix-users@postfix.org

On 10/27/2010 4:44 PM, Al Zick wrote:
> Hi,
>
> On Oct 27, 2010, at 12:38 PM, Noel Jones wrote:
>
>> On 10/27/2010 10:37 AM, Al Zick wrote:
>>> Hi,
>>>
>>> I hope that someone can help me. Last night I had a strange
>>> problem. Every email that came in was there twice. Emails that
>>> I would normally get 2 copies of, I received 4 copies of. Any
>>> ideas on what could cause this?
>>
>> Careful examination of the logs will probably enlighten you.
>> With no information, speculation is pointless.
>
> I have been looking at the logs.
>
> I have never seen this before:
> Oct 27 15:10:03 agnus postfix[27341]: dict_eval: expand
> $myhostname, $mydomain, localhost.$mydomain ->
> agnus.datazap.net, datazap.net, localhost.datazap.net
> Oct 27 15:10:03 agnus postfix[27341]: dict_eval: expand
> $mydestination -> agnus.datazap.net, datazap.net,
> localhost.datazap.net
> Oct 27 15:10:03 agnus postfix[27341]: dict_eval: expand
> $relay_domains -> agnus.datazap.net, datazap.net,
> localhost.datazap.net

Turn off verbose logging. That may help your CPU usage too.

>> Not likely. A broken alias is the first guess. What did you
>> change?
>
> I didn't change anything and I can't find any duplicates in
> the log. I have to wonder if the problem didn't occur after it
> was delivered to procmail.

A procmail delivery problem wouldn't surprise me.

>>> I then have postfix pass the email to procmail where it is
>>> filtered with bogofilter. I keep giving bogofilter more spam
>>> to look at, but it doesn't seem to block all the spam anymore,
>>> although it blocks some spam. When I first installed it,
>>> bogofilter worked very well.
>>
>> Sounds as if bogofilter is poorly trained. Ask for help on a
>> bogofilter forum, or just delete the database and start over.
>
>
> I have deleted the database many times and started over. If I
> delete the older spam and the spam that is out of order being
> sorted by date it will work again for a while.

If bogofilter isn't working for you, try another tool. But
remember that nothing will work long term without some attention.

> problems lately have been with email. I feel like I need to
> get postfix to stop using so much cpu.

Show some evidence. Postfix shouldn't use very much CPU.

> each mail server sending 100's of emails. When I used to use
> postgray (I gave that up years ago), postgray would use all
> the cpu.

So you have a 200MHz 386 or something?

> The problem is these same emails continue to be bounced by my
> mail server. If I just let them be delivered then it does

Sounds as if you've foolishly set "soft_bounce = yes"

This would be a good time to share your "postconf -n" output
and the contents of master.cf

> lower the amount of mail attempted to be sent to it by like
> 90%. I would have never though of this idea, but I read an
> ariticle online on how to stop fighting the battle on spam and
> winning the war. This is one of the things they recommend.

This is bad advice. Not everything you read on the internet
is helpful.

>> Very bad idea. Reject mail you don't intend to deliver.
>
> I thought that someone would say that and really I am not sure
> how to deal with the over flow of spam. Although, I can see
> how just letting it go through and not fighting it only to
> have a filter look at it later may work.

Nothing is more efficient than rejecting the mail before it's
accepted. Period.

> I would really like to filter email after the mail server
> passes it to procmail, because I have noticed email that is
> forwarded from another mail server the filtering in Postfix
> doesn't seem to do anything for it, it may just as well
> immediately give it to procmail for filtering. Also, I have
> considered using something like fetchmail to get the mail from
> other mail servers and then passing it through procmail for
> filtering. The forwarded emails seem to be one of the reasons

So get rid of the forwarded accounts.

   -- Noel Jones