Articles April 11, 2008 at 7:00 am

What’s weird using Server Admin for managing Amavis in Leopard Server

Leopard server brings us a new interface for managing amavis in Server Admin. But, using some of the options of Server Admin's GUI doesn't modify correctly /etc/amavisd.conf and brings some weird issues

  1. Be careful with notification
    • the defaults notification address is :
    • $mailfrom_notify_spamadmin = "spam.police@$mydomain"; # notifications sender
    • defaults quarantine addresses are :
    • #&#36;virus_admin = &#39;[email protected]&#39;;<br />#&#36;spam_admin = &#39;[email protected]&#39;;<br />#&#36;spam_quarantine_to = &#39;[email protected]&#39;;<br />#&#36;virus_quarantine_to = &#39;[email protected]&#39;;
    • only the following addresses will be modified with Server Admin's GUI :
    • #&#36;virus_admin = &#39;[email protected]&#39;;<br />#&#36;spam_quarantine_to = &#39;[email protected]&#39;;<br />#&#36;virus_quarantine_to = &#39;[email protected]&#39;; 
    • if you activate notification and quarantine, without editing /etc/amavid.conf, every incoming spam will be sent to:
      &#39;[email protected]&#39;
    • example.com is an existing domain but has no MX record, all mails will stay in the 'deferred' postfix queue!
    • An
      the result is : a lot of mails staying in the queue, a lot of attempts
      for redistribution, a big slow down of your server and big logs with a
      lot of the folowing lines !
    • Mar 31 04:07:35 mail postfix/smtp[13211]: connect to example.com[208.77.188.166]: Operation timed out (port 25)<br />Mar 31 04:07:35 mail postfix/smtp[13211]: C401511A59D: to=&lt;[email protected]&gt;,<br />  relay=none, delay=30, delays=0.01/0.01/30/0, dsn=4.4.1, status=deferred<br /> (connect to example.com[208.77.188.166]: Operation timed out)
  2. What's to do with this :
    • I'd rather prefer trashing spam and virus, but if you don't :
    • edit /etc/amavisd.conf to replace @example.com with @$mydomain
    • create the needed mailing boxes (virus, junk-admin, etc…
    • #&#36;virus_admin = &#39;virus@&#36;mydomain&#39;;<br />#&#36;spam_admin = &#39;junk-admin@&#36;mydomain&#39;;<br />#&#36;spam_quarantine_to = &#39;junk-quarantine@&#36;mydomain&#39;;<br />#&#36;virus_quarantine_to = &#39;virus-quarantine@&#36;mydomain&#39;; <br />&#36;mailfrom_notify_admin     = &quot;virusalert@&#36;mydomain&quot;;  # notifications sender<br />&#36;mailfrom_notify_recip     = &quot;virusalert@&#36;mydomain&quot;;  # notifications sender<br />&#36;mailfrom_notify_spamadmin = &quot;spam.police@&#36;mydomain&quot;; # notifications sender<br />&#36;mailfrom_to_quarantine = &#39;&#39;; # null return path; uses original sender if undef<br />
    • Empty the deferred queue if you're late reading this 😉
    • mail:etc root# mailq        &lt;-- to see what&#39;s in the queues<br /><br />mail:etc root# postsuper -d ALL deferred  &lt;-- to delete the queue content<br />postsuper: Deleted: 4946 messages<br /><br />Be careful, thhis command delete ALL the &#39;deferred&#39; queue content<br />
    • if you want to verify what was sent to this queue before, you can grep the log :

    • mail:~ root# cat /var/log/mail.log |grep &#39;status=deferred&#39;<br /><br />Mar 31 04:07:35 mail postfix/smtp[13211]: C401511A59D: to=&lt;[email protected]&gt;,<br /> relay=none, delay=30, delays=0.01/0.01/30/0, dsn=4.4.1, status=deferred<br /> (connect to example.com[208.77.188.166]: Operation timed out) 

Leave a reply

You must be logged in to post a comment.