tm-code

Q: Lion Server junk filter blocking external mail

I just set up mail services on a Lion 10.7.5 Server.  This is a fully public MTA.  I have it working properly, with one exception.  When I turn on the junk filter (amavis) it blocks ALMOST all external mail.  Internal mail is delivered just fine.  Once in a blue moon an external mail gets through.  There is nothing of interest that I can see in the logs.  I have the server set to deliver mail whether or not it is to be marked as junk.

 

Since it was critical to get this mail server up and running, I ended up leaving off the junk filter.  My users are NOT happy, so any thoughts about where to look would be greatly appreciated.

 

As a side note, just in case it is realted.  I had to disable Postgres as the Apple install is completley broken (initdb is a different version than postgress executabel and so will not run).  So if amavis needs that, then I will have to fix postgres.  You would think it would throw and error if that was the case though.

Posted on Jun 1, 2013 11:24 AM

Close

Q: Lion Server junk filter blocking external mail

  • All replies
  • Helpful answers

  • by tm-code,

    tm-code tm-code Jun 1, 2013 12:09 PM in response to tm-code
    Level 1 (0 points)
    Jun 1, 2013 12:09 PM in response to tm-code

    Errr I meant spamassasin not amavis, but I have to admit this just is not my thing.

  • by tm-code,

    tm-code tm-code Jun 12, 2013 8:56 AM in response to tm-code
    Level 1 (0 points)
    Jun 12, 2013 8:56 AM in response to tm-code

    I'll answer my own question.

     

    This was because of greylisting which is now leveraged in Lion.  I got sporadic messages because SOME domains would retry the message quickly.  Others would wait longer.  I was too fearful that I had foobared mail so did not leave junk filters on long enought to realize that.

     

    Personally I am not fond of greylisting so I turned the feature off by editing the main.cf.

     

    Suggestions for turning off grelisting have suggested using servermanager as in

     

    serveradmin settings mail:postfix:greylist_disable = yes

     

    But this seems to be ML only.  Attempting the above fails, and 'serveradmin settings mail' does return this option.  so edting the config file directly seems to be the only way which of course means it will revert if you touch server admin app.

  • by Tenn_Surety,

    Tenn_Surety Tenn_Surety Jun 18, 2013 12:36 PM in response to tm-code
    Level 1 (0 points)
    Jun 18, 2013 12:36 PM in response to tm-code

    you can user the CLI serveradmin to remove the check policy from main.cf. 

     

    I had a similar issue to yours except when I turned on a blacklist such as spamhaus it would block all external mail.  I had a DNS problem.

     

    However Greylisting on LS would work ok after a reboot and then mail service would slowly degrade.  From what i've been reading (because I have several issues still on going) MLS seems easier to maintain and better documented here in discussions and other forums.

     

    I would turn off greylisting, Then modify /etc/dovecot/conf.d/90-sieve.conf and set a Before script.  you'll have to create the folder location referenced in the PigeonHole documentation because it doesn't exist. Actually none of the locations in that file existed except the pointer to the user scripts. I created /var/lib/dovecot/sieve and placed my before script there.  The script I used was ripped off from the Snow Leopard Server manual.  You will have to modify it because it's syntax won't work with sievec compiler in LS. So I saved mine as junkmail.sieve, compiled it (after reading the pigeonhole sieve manual) and then restarted dovecot.

     

    Of course this is a moot point if your amavis isn't running at the moment.

  • by tm-code,

    tm-code tm-code Jun 18, 2013 1:06 PM in response to Tenn_Surety
    Level 1 (0 points)
    Jun 18, 2013 1:06 PM in response to Tenn_Surety

    Thanks for the tips.  They were very timely as I just started looking into enabling the Sieve filters.