Postscreen

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Postscreen

Phil Daws
Good evening,

have set up a new server with Postfix 2.10 and using PostScreen, but on every installation we end up with:

warning: btree:/var/lib/postfix/ps_cache is unavailable. open database /var/lib/postfix/ps_cache.db: No such file or directory

In our file we have :

memcache = inet:127.0.0.1:11211
key_format = postscreen:%s
backup = btree:/var/lib/postfix/ps_cache

and directory permissions look fine:

drwxr-x--- 2 postfix root 4096 Jul 20 23:55 /var/lib/postfix/

What are we doing wrong please as the cache is never being created ?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Glenn English

On Jul 21, 2013, at 12:51 PM, Phil Daws wrote:

> What are we doing wrong please as the cache is never being created ?

No Postmap??

--
Glenn English
Disclaimer: Any disclaimer attached to this message may be ignored.





smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Phil Daws
----- Original Message -----
From: "Glenn English" <[hidden email]>
To: [hidden email]
Sent: Sunday, 21 July, 2013 8:02:13 PM
Subject: Re: Postscreen


On Jul 21, 2013, at 12:51 PM, Phil Daws wrote:

> What are we doing wrong please as the cache is never being created ?

No Postmap??

--
Glenn English
Disclaimer: Any disclaimer attached to this message may be ignored.

Hi Glenn,

I have just created it that way but I thought it should automatically be created; the same as the scache files ?

Thanks.




Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Wietse Venema
In reply to this post by Phil Daws
Phil Daws:

> Good evening,
>
> have set up a new server with Postfix 2.10 and using PostScreen,
> but on every installation we end up with:
>
> warning: btree:/var/lib/postfix/ps_cache is unavailable. open database /var/lib/postfix/ps_cache.db: No such file or directory
>
> In our file we have :
>
> memcache = inet:127.0.0.1:11211
> key_format = postscreen:%s
> backup = btree:/var/lib/postfix/ps_cache

Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:

    smtp       inet  n       -       >>>n<<<       -       1       postscreen

Or access the map via the proxymap daemon:

/etc/postfix/main.cf:
    postscreen_cache_map = memcache:/etc/postfix/postscreen_memcache
    proxy_write_maps = proxy:btree:/var/lib/postfix/postscreen_cache

/etc/postfix/postscreen_memcache:
    backup = proxy:btree:/var/lib/postfix/postscreen_cache
    ...

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Phil Daws


----- Original Message -----
From: "Wietse Venema" <[hidden email]>
To: "Phil Daws" <[hidden email]>
Cc: [hidden email]
Sent: Sunday, 21 July, 2013 8:11:57 PM
Subject: Re: Postscreen

Phil Daws:

> Good evening,
>
> have set up a new server with Postfix 2.10 and using PostScreen,
> but on every installation we end up with:
>
> warning: btree:/var/lib/postfix/ps_cache is unavailable. open database /var/lib/postfix/ps_cache.db: No such file or directory
>
> In our file we have :
>
> memcache = inet:127.0.0.1:11211
> key_format = postscreen:%s
> backup = btree:/var/lib/postfix/ps_cache

Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:

    smtp       inet  n       -       >>>n<<<       -       1       postscreen

Or access the map via the proxymap daemon:

/etc/postfix/main.cf:
    postscreen_cache_map = memcache:/etc/postfix/postscreen_memcache
    proxy_write_maps = proxy:btree:/var/lib/postfix/postscreen_cache

/etc/postfix/postscreen_memcache:
    backup = proxy:btree:/var/lib/postfix/postscreen_cache
    ...

        Wietse

Good evening Wietse,

At present in master.cf I have:

smtp      inet  n       -       n       -       -       smtpd

will try setting the proxy for the cache.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Wietse Venema
Phil Daws:

> Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:
>
>     smtp       inet  n       -       >>>n<<<       -       1       postscreen
>
> Or access the map via the proxymap daemon:
>
> /etc/postfix/main.cf:
>     postscreen_cache_map = memcache:/etc/postfix/postscreen_memcache
>     proxy_write_maps = proxy:btree:/var/lib/postfix/postscreen_cache
>
> /etc/postfix/postscreen_memcache:
>     backup = proxy:btree:/var/lib/postfix/postscreen_cache
>     ...
>
> Wietse
>
> Good evening Wietse,
>
> At present in master.cf I have:
>
> smtp      inet  n       -       n       -       -       smtpd
>

That DOES NOT help without executing "postfix reload".

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Phil Daws
No reason to reload as it was ALREADY set at that ;)
----- Original Message -----
From: "Wietse Venema" <[hidden email]>
To: "Phil Daws" <[hidden email]>
Cc: "Wietse Venema" <[hidden email]>, [hidden email]
Sent: Sunday, 21 July, 2013 8:24:26 PM
Subject: Re: Postscreen

Phil Daws:

> Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:
>
>     smtp       inet  n       -       >>>n<<<       -       1       postscreen
>
> Or access the map via the proxymap daemon:
>
> /etc/postfix/main.cf:
>     postscreen_cache_map = memcache:/etc/postfix/postscreen_memcache
>     proxy_write_maps = proxy:btree:/var/lib/postfix/postscreen_cache
>
> /etc/postfix/postscreen_memcache:
>     backup = proxy:btree:/var/lib/postfix/postscreen_cache
>     ...
>
> Wietse
>
> Good evening Wietse,
>
> At present in master.cf I have:
>
> smtp      inet  n       -       n       -       -       smtpd
>

That DOES NOT help without executing "postfix reload".

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Stan Hoeppner
In reply to this post by Phil Daws
Wietse:
> Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:
>
>     smtp       inet  n       -       >>>n<<<       -       1       postscreen

Phil:
> At present in master.cf I have:
>     smtp       inet  n       -          n          -       -       smtpd


Phil do you see the discrepancy here?  It appears you are loading smtpd
instead of the postscreen daemon.  Might not be a bad idea at this point
to post your complete master.cf and 'postconf -n' output.


--
Stan

Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Wietse Venema
In reply to this post by Phil Daws
Phil Daws:
[ Charset UTF-8 unsupported, converting... ]

> No reason to reload as it was ALREADY set at that ;)
> ----- Original Message -----
> From: "Wietse Venema" <[hidden email]>
> To: "Phil Daws" <[hidden email]>
> Cc: "Wietse Venema" <[hidden email]>, [hidden email]
> Sent: Sunday, 21 July, 2013 8:24:26 PM
> Subject: Re: Postscreen
>
> Phil Daws:
> > Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:
> >
> >     smtp       inet  n       -       >>>n<<<       -       1       postscreen

That is POSTSCREEN.

> > At present in master.cf I have:
> >
> > smtp      inet  n       -       n       -       -       smtpd

That is NOT POSTSCREEN.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Phil Daws
----- Original Message -----
From: "Wietse Venema" <[hidden email]>
To: "Phil Daws" <[hidden email]>
Cc: "Wietse Venema" <[hidden email]>, [hidden email]
Sent: Monday, 22 July, 2013 1:19:43 AM
Subject: Re: Postscreen

Phil Daws:
[ Charset UTF-8 unsupported, converting... ]

> No reason to reload as it was ALREADY set at that ;)
> ----- Original Message -----
> From: "Wietse Venema" <[hidden email]>
> To: "Phil Daws" <[hidden email]>
> Cc: "Wietse Venema" <[hidden email]>, [hidden email]
> Sent: Sunday, 21 July, 2013 8:24:26 PM
> Subject: Re: Postscreen
>
> Phil Daws:
> > Turn OFF postscreen chroot in master.cf asn indicated with >>> <<<:
> >
> >     smtp       inet  n       -       >>>n<<<       -       1       postscreen

That is POSTSCREEN.

> > At present in master.cf I have:
> >
> > smtp      inet  n       -       n       -       -       smtpd

That is NOT POSTSCREEN.

        Wietse


Hi Wietse,

They were all set as non chroot:

smtpd     pass  -       -       n       -       -       smtpd
1025      inet  n       -       n       -       1       postscreen
tlsproxy  unix  -       -       n       -       0       tlsproxy
dnsblog   unix  -       -       n       -       0       dnsblog
smtp      inet  n       -       n       -       -       smtpd

In the end I followed what somebody else had said with:

touch /var/lib/postfix/ps_cache
postmap btree:/var/lib/postfix/ps_cache
chown postfix.postfix /var/lib/postfix/ps_cache
service postfix restart

That resolved the issue; though unsure why it was not being created when the smtpd_cache btree does.  Oh well, all working great now.  Really love the postscreen functionality :) Great work.
Reply | Threaded
Open this post in threaded view
|

Re: Postscreen

Wietse Venema
Phil Daws:
> In the end I followed what somebody else had said with:
>
> touch /var/lib/postfix/ps_cache
> postmap btree:/var/lib/postfix/ps_cache
> chown postfix.postfix /var/lib/postfix/ps_cache
> service postfix restart

For the record, this should not be necessary if redistributors could
resist the temptation to "improve" Postfix. When left unchanged,
Postfix is perfectly capable of creating the table by itself -
that's after all how I use it myself on a buch of different platforms.

All this tinkering with Postfix internals makes support like hell.

        Wietse