On 7/2/2012 10:24 AM, Marko Weber wrote: > > hello list, > is there a way to give postfix a fallback if amavid-new is not > reachable? > > situation: when amavis is down or not reachable, postfix should skip > to deliver to amavis > and skip this step. > > is there a way for this? >
Depends on how you're calling amavisd-new... - If you're using amavisd-new as an SMTP content_filter, you can edit your amavis master.cf entry something like: # master.cf amavis ... smtp ... -o smtp_fallback_relay=[127.0.0.1]:10025 where the destination is the same as your postfix reinjection interface. - If you're using amavisd-new as an smtpd_proxy_filter, you'll need to use some external process to see if amavisd-new is working, and if it fails, use "postconf -e ..." to turn off smtpd_proxy_filter and reload postfix. The "monit" tool can do this fairly easily; there are many other third-party monitor tools or build a little script yourself. - If you're using amavisd-new as a milter, just simply set # main.cf milter_default_action = accept And some unsolicited advice: Amavisd-new is very reliable and really shouldn't go down if the rest of the system is working properly. Might be better to monitor amavisd-new and raise an alarm (send an SMS via email or something) if there's a problem. If you're concerned about amavisd-new availability, you can set up a fallback amavisd-new server and point to it with smtp_fallback_relay. If you're willing to deliver unfiltered mail, why use a filter at all? -- Noel Jones