Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

[PATCH] support normal user 'make install'

[PATCH] support normal user 'make install'

2009-08-04 by Kouhei Sutou

Hi,

I noticed that we can't run 'make install' as a normal user
even when we specify
  --prefix=$HOME/local
  --with-conffile=$HOME/local/etc/mail/greylist.conf
  --with-dumpfile=$HOME/local/var/milter-greylist/greylist.db
options.

It's a problem that 'make install' tries to create
${DESTDIR}/etc/mail directory even when configuration file
is not in ${DESTDIR}/etc/mail.

Thanks,
--
kou

Re: [milter-greylist] [PATCH] support normal user 'make install' [1 Attachment]

2009-08-15 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> It's a problem that 'make install' tries to create
> ${DESTDIR}/etc/mail directory even when configuration file
> is not in ${DESTDIR}/etc/mail.

Despite the [PATCH] in the subject line, I found no patch attached to
your message. Did I miss something?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-08-15 by Petar Bogdanovic

On Sat, Aug 15, 2009 at 12:36:00PM +0200, manu@... wrote:
> Kouhei Sutou <kou@...> wrote:
> 
> > It's a problem that 'make install' tries to create
> > ${DESTDIR}/etc/mail directory even when configuration file
> > is not in ${DESTDIR}/etc/mail.
> 
> Despite the [PATCH] in the subject line, I found no patch attached to
> your message. Did I miss something?

On Tue, Aug 04, 2009 at 10:17:19PM +0900, Kouhei Sutou wrote:
> (...)
>
>

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-08-15 by Petar Bogdanovic

Yahoogroups sanitized my first message.
Show quoted textHide quoted text
On Sat, Aug 15, 2009 at 12:36:00PM +0200, manu@... wrote:
> Kouhei Sutou <kou@...> wrote:
> 
> > It's a problem that 'make install' tries to create
> > ${DESTDIR}/etc/mail directory even when configuration file
> > is not in ${DESTDIR}/etc/mail.
> 
> Despite the [PATCH] in the subject line, I found no patch attached to
> your message. Did I miss something?

On Tue, Aug 04, 2009 at 10:17:19PM +0900, Kouhei Sutou wrote:
> ...[Attachment(s) from Kouhei Sutou included below]
>
> (...)
>
> ...Attachment(s) from Kouhei Sutou:
>
>
> ... 1 of 1 File(s) http://groups.yahoo.com/group/milter-greylist/attachments/folder/230503751/item/list
>   ... milter-greylist-support-normal-user-make-install.diff

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-04 by Kouhei Sutou

Hi,

In <1j4howc.2yxmxudjoneoM%manu@...>
  "Re: [milter-greylist] [PATCH] support normal user 'make install'" on Sat, 15 Aug 2009 12:36:00 +0200,
  manu@... wrote:

>> It's a problem that 'make install' tries to create
>> ${DESTDIR}/etc/mail directory even when configuration file
>> is not in ${DESTDIR}/etc/mail.
> 
> Despite the [PATCH] in the subject line, I found no patch attached to
> your message. Did I miss something?

I uploaded the same patch to here:
  http://www.clear-code.com/~kou/patches/milter-greylist-support-normal-user-make-install.diff

Thanks,
--
kou

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-04 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> I uploaded the same patch to here:

I'm a bit concerned with that:
CONFFILE="\${SYSCONFDIR}/mail/greylist.conf"
(...)
-       ${INSTALL} -d -m 755 ${DESTDIR}/etc/mail
-       ${TEST} -f ${DESTDIR}/etc/mail/greylist.conf -o         \
+       ${INSTALL} -d -m 755 ${DESTDIR}`dirname ${CONFFILE}`

So we move from default installation into /etc/mail to
${SYSCONFDIR}/mail. 

While I agree it is better practice, I beleive this will break some
setups at upgrade time: without specific configure options, the patched
milter-greylist is likely to look for its configuration file in
/usr/local/etc/mail instead of /etc/mail, which is the current behavior.

True, milter-greylist should not use /etc/mail by default, but I'd
rather not fix this kind of oddities if it is at the price of making
upgrades more troublesome.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-04 by Bill Levering

Would it be worth looking for an existing /etc/mail/greylist.conf file  
in the configuration run?
That way NEW installs would be 'a better practice'?

Bill

Bill Levering
idbill@...
KFP: 6C0A 067C 7E03 58C3 C2F7  8278 6DFD 55A8 108B ED2F
Show quoted textHide quoted text
On Sep 3, 2009, at 9:29 PM, manu@... wrote:

> Kouhei Sutou <kou@...> wrote:
>
>> I uploaded the same patch to here:
>
> I'm a bit concerned with that:
> CONFFILE="\${SYSCONFDIR}/mail/greylist.conf"
> (...)
> -       ${INSTALL} -d -m 755 ${DESTDIR}/etc/mail
> -       ${TEST} -f ${DESTDIR}/etc/mail/greylist.conf -o         \
> +       ${INSTALL} -d -m 755 ${DESTDIR}`dirname ${CONFFILE}`
>
> So we move from default installation into /etc/mail to
> ${SYSCONFDIR}/mail.
>
> While I agree it is better practice, I beleive this will break some
> setups at upgrade time: without specific configure options, the  
> patched
> milter-greylist is likely to look for its configuration file in
> /usr/local/etc/mail instead of /etc/mail, which is the current  
> behavior.
>
> True, milter-greylist should not use /etc/mail by default, but I'd
> rather not fix this kind of oddities if it is at the price of making
> upgrades more troublesome.
>
> -- 
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu@...
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-07 by Kouhei Sutou

Hi,

In <98ACD341-8529-4C60-B825-89DEB94D0DF2@...>
  "Re: [milter-greylist] [PATCH] support normal user 'make install'" on Fri, 4 Sep 2009 10:18:38 -0700,
  Bill Levering <idbill@...> wrote:

> Would it be worth looking for an existing
> /etc/mail/greylist.conf file in the configuration run?
> That way NEW installs would be 'a better practice'?

It seems good for me.

Emmanuel, what do you think about it?
If it seems good for you too, I will update a patch.


Thanks,
--
kou

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-07 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> > Would it be worth looking for an existing
> > /etc/mail/greylist.conf file in the configuration run?
> > That way NEW installs would be 'a better practice'?
> 
> It seems good for me.
> 
> Emmanuel, what do you think about it?

You'd look for /etc/mail/greylist.conf, use it if found, or use
$(sysconfdir)/mail/greylist.conf otherwhise? It will break on setups
where you build on a different machine than the one you actually run the
software on (binary packages), but you can take care of that by a run
time test instead of a configure test

configure would use $(DESTDIR)$(sysconfdir)/mail/greylist.conf, and in
milter-geylist.c, we would check for a $(DESTDIR)/etc/mail/greylist.conf
and useit if found (with an annoying warning)

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-08 by Kouhei Sutou

Hi,

In <1j5npbb.1b6j1xq9atjqqM%manu@...>
  "Re: [milter-greylist] [PATCH] support normal user 'make install'" on Mon, 7 Sep 2009 04:59:46 +0200,
  manu@... wrote:

> configure would use $(DESTDIR)$(sysconfdir)/mail/greylist.conf, and in
> milter-geylist.c, we would check for a $(DESTDIR)/etc/mail/greylist.conf
> and useit if found (with an annoying warning)

I created a patch for it:
  http://www.clear-code.com/~kou/patches/milter-greylist-legacy-conf.diff

Thanks,
--
kou

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-08 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> I created a patch for it:
>   http://www.clear-code.com/~kou/patches/milter-greylist-legacy-conf.diff

But if you do that you must install in ${sysconfdir}/mail instead of
/etc/mail, don't you?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] [PATCH] support normal user 'make install'

2009-09-08 by Kouhei Sutou

In <1j5pnp5.1tm7gg61fs1u8bM%manu@...>
  "Re: [milter-greylist] [PATCH] support normal user 'make install'" on Tue, 8 Sep 2009 06:09:11 +0200,
  manu@... wrote:

>> I created a patch for it:
>> http://www.clear-code.com/~kou/patches/milter-greylist-legacy-conf.diff
> 
> But if you do that you must install in ${sysconfdir}/mail instead of
> /etc/mail, don't you?

(partially) yes.
We should install a configuration file into --with-conffile
path (that is ${SYSCONFDIR}/mail/greylist.conf by default in
the current configure.in).

I thought that we should help people who already installed
milter-greylist without --with-conffile option. And they
must use /etc/mail/greylist.conf. Do I misunderstand about
it?

If I misunderstand what you want, please ignore the patch...

Thanks,
--
kou

Feature concept

2009-09-11 by Paul Venezia

I've been using milter-greylist for awhile now in several different  
mail relays, and I'd like to propose an idea for consideration: a CLI  
object injector.

I'd love to be able to add list entries on the fly, without having to  
edit the configuration file. Something like pfctl, whereby I could run  
'mgctl -l bldomains -t add somedomain.com' or similar. These entries  
may not have state in the config file, but could be dumped out to the  
greylist.db and picked up again on restart. Naturally, there would  
have to be a remove function and a list function. This would go a long  
way towards implementation of some of the features I wrote into  
relaydelay a long time ago, specifically code that would automatically  
blacklist domains and relays that exceeded a certain threshold of  
dictionary spam attempts, among a bevy of other red flags. It would  
also allow for a simple Web interface to list, add, and remove list  
entries. It's somewhat possible to do this now by automating an edit  
of the configuration file, but a simple control app would be far, far  
simpler.

Also, this could possibly be accompanied by adding support for file  
include in the configuration file.

Thoughts?

-Paul

Re: [milter-greylist] Feature concept

2009-09-11 by manu@netbsd.org

Paul Venezia <pvenezia@...> wrote:

> Also, this could possibly be accompanied by adding support for file  
> include in the configuration file.

File include tend to kill the ability to auto-reload on change.

> Thoughts?

I have been thinking about it for a while. The path of least resistance
would be to improve the mxsync protocol, and write a command line tool
for sending commands to it.

For now mxsync is just able to add greylist and autowhitelist tuples.
Since the databases have been merged, now tuples have a type. You could
add blacklist tuples, and commands to remove tuples.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Feature concept

2009-09-11 by Paul Venezia

True on the auto-reload, but it might be worth it for some -- if not,  
then they don't need to use includes.

Also, adding tuples would be nice, but I had a very capable scheme  
going where every 10 minutes, an IMAP mailbox named "block" would be  
polled, and any messages found in that mailbox would be parsed and the  
offending relay would be used to add a blacklist entry by IP address.  
For those servers that do retry and push through the greylist, this  
effectively blocks them after they've come through once. There is a  
manual step, but a minor one -- dragging a spam message into this  
mailbox does the deed automatically.

Without the ability to modify lists (not just tuples) directly, this  
isn't really workable for milter-greylist without lots of config file  
parsing/modifying, or using a template file or other options. With  
includes, this could be done by sending an interrupt to the milter- 
greylist process to reload, or directly with a CLI tool...

-Paul
Show quoted textHide quoted text
> On Sep 11, 2009, at 2:51 PM, manu@... wrote:
> Paul Venezia <pvenezia@...> wrote:
> > Also, this could possibly be accompanied by adding support for file
> > include in the configuration file.
>
> File include tend to kill the ability to auto-reload on change.
>
> > Thoughts?
>
> I have been thinking about it for a while. The path of least  
> resistance
> would be to improve the mxsync protocol, and write a command line tool
> for sending commands to it.
>
> For now mxsync is just able to add greylist and autowhitelist tuples.
> Since the databases have been merged, now tuples have a type. You  
> could
> add blacklist tuples, and commands to remove tuples.
>
>

Re: [milter-greylist] Feature concept

2009-09-11 by manu@netbsd.org

Paul Venezia <pvenezia@...> wrote:

> Without the ability to modify lists (not just tuples) directly, this
> isn't really workable for milter-greylist without lots of config file
> parsing/modifying, or using a template file or other options. With  
> includes, this could be done by sending an interrupt to the milter- 
> greylist process to reload, or directly with a CLI tool...

IMO the CLI tool is a much better way of doing it than hacking with file
reloads.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.