Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Status Deferred when Junk Filter Turned On?

Hi,

I've been running Apple's mail server for a while now and decided to try Junk filtering after upgrading to 10.4.5. I've been reading posts here and thought that I had done everything right. (Setup Spamtrainer to do nightly training, did the symlink fix.) When I finally turned the filter on, it stopped all mail going through the server. The SMTP log says...

"relay=none, delay=431189, status=deferred (connect to 127.0.0.1[127.0.0.1]:Connection refused".

As soon as I turn Junk filtering off, mail starts flowing again, but messages sent while it was on appear to be stuck until they fail a couple of days later. They bounce back saying "delivery temporarily suspended: transport is unavailable"

From other posts, it seems like the postconf output is a good place to start troubleshooting, so I've copied it below. (This was done when Junk filtering was turned off. If it is different when it is on and that is needed, I can do it after hours.)

Can someone please point me in the right troubleshooting direction?

Thanks.


alias_maps = hash:/etc/aliases
always_bcc =
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/libexec/postfix
debug peerlevel = 2
enable serveroptions = yes
inet_interfaces = all
luser_relay =
mail_owner = postfix
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps rbldomains =
message sizelimit = 20480000
mydestination = $myhostname,localhost.$mydomain,sn.net,kd.net,kd.com,kd.org
mydomain_fallback = localhost
myhostname = manta.sn.net
mynetworks = 127.0.0.1/32,10.10.10.11/32
mynetworks_style = host
newaliases_path = /usr/bin/newaliases
owner requestspecial = no
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd clientrestrictions =
smtpd enforcetls = no
smtpd pw_server_securityoptions = login
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = yes
smtpd tls_certfile = /etc/postfix/server.pem
smtpd tlsloglevel = 0
smtpd use_pwserver = yes
smtpd usetls = no
unknown local_recipient_rejectcode = 550

XServe

XServe

XServe

Posted on May 10, 2006 9:39 AM

Reply
6 replies

May 10, 2006 11:01 AM in response to Ronald Langley

Your configuration looks ok.
Probably, amavisd (the content filter) is not running and thus it fails once you turn content filtering on in Postfix.

The question is, why doesn't it run.

After you activate content filtering again, do the following:
Quit Server Admin
Open Terminal and issue the following commands:
sudo serveradmin stop mail
(wait till it stops)
sudo serveradmin start mail
Then issue:
ps -U clamav and check if amavisd is running
If it is you are probably all set, if it isn't report back and post the contents of potconf -n with the activated content filter.

May 11, 2006 8:00 AM in response to pterobyte

Thanks for the reply (and the great scripts).

I followed your instructions and after typing ps -U clamav, I received this...

PID TT STAT TIME COMMAND

There was no other info. Does that mean it is not running? This is the postconf output when the Junk filter was on...

alias_maps = hash:/etc/aliases
always_bcc =
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug peerlevel = 2
enable serveroptions = yes
inet_interfaces = all
luser_relay =
mail_owner = postfix
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps rbldomains =
message sizelimit = 20480000
mydestination = $myhostname,localhost.$mydomain,sn.net,kd.net,kd.com,kd.org
mydomain_fallback = localhost
myhostname = manta.sn.net
mynetworks = 127.0.0.1/32,10.10.10.11/32
mynetworks_style = host
newaliases_path = /usr/bin/newaliases
owner requestspecial = no
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost =
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd clientrestrictions =
smtpd enforcetls = no
smtpd pw_server_securityoptions = login
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = yes
smtpd tls_certfile = /etc/postfix/server.pem
smtpd tlsloglevel = 0
smtpd use_pwserver = yes
smtpd usetls = no
unknown local_recipient_rejectcode = 550

Thanks.



May 11, 2006 8:54 AM in response to Ronald Langley

Ronald,

it looks like amavisd is not running at all. Did you manually change something with regards to amavisd? Manual update or anything?

In Server Admin, did you check junk mail and virus scanning?

Let's see if we can start it manually:
Open terminal and issue:
su
su clamav
/usr/bin/amavisd start
give it a moment and check:
ps -U clamav

If it still doesn't run, check you system, amavis and mail log.

Alex

May 14, 2006 7:04 PM in response to pterobyte

Hi Alex,

Sorry for the slow reply. I had to wait until the weekend to start working on the server again. The only thing that I think I did out of the ordinary was that I created a user_prefs file in /var/amavis/.spamassassin to do a manual white list. I just checked that directory and it is gone. Not sure why.

I ran the commands you listed and when I issue the start command I received this response...

Scalar found where operator expected at /etc/amavisd.conf line 204, near "$unix_socketname"
(Missing semicolon on previous line?)
Error in config file /etc/amavisd.conf: syntax error at /etc/amavisd.conf line 204, near "$unix_socketname "

...so I'll be sifting through amavisd.conf to try to figure that one out. Thanks for your help.

May 17, 2006 7:42 AM in response to pterobyte

Alex,

Thanks for your help. I was able to find the problem in the amavisd.conf. If anyone else has the same problem, I had to add a ; after the line...

@local domainsmaps = ( 1 )

After that it came up fine.

The user_prefs file was missing because it had been in the .spamassassin folder that was removed during the symlink fix. It is now back in the correct folder.

I have two last questions...1) What is a good start setting for the "Minimum Junk Mail Score" and 2) should "Update the Junk mail and virus database <1> time(s) every day be turned on or will that conflict with the setup I did with Spamtrainer? Thanks.

May 17, 2006 7:49 AM in response to Ronald Langley

@local domainsmaps = ( 1 )

This is not present in a standard config, but was probably added later by yourself forgetting the semi-colon 😉

1) What is a good start setting for the "Minimum Junk Mail Score"

4-5 while training
Once you are confident that it works well, lower it to 3 and set a kill setting of 5-10 in amavisd.conf.
This will make sure that mail which is 99.9% sure to be spam gets discarded rather than marked.

2) should "Update the Junk mail and virus database <1> time(s)
every day be turned on or will that conflict with the setup I did
with Spamtrainer? Thanks.

Has nothing to do with Spamtrainer. Should definitely be on! Once a day is enough.

Alex

Status Deferred when Junk Filter Turned On?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.