Mailing List Archive

[Bug 670] imroved "spamd_address" syntax
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670

Johannes Berg <johannes@sipsolutions.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |johannes@sipsolutions.net




--- Comment #1 from Johannes Berg <johannes@sipsolutions.net> 2008-02-17 10:02:48 ---
Couldn't you do all that with string expansion now that spamd_address is
expanded?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670

Peter Bowyer <peter@bowyer.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |peter@bowyer.org




--- Comment #2 from Peter Bowyer <peter@bowyer.org> 2008-02-17 12:53:07 ---
What's the behaviour with the 'time' option when insane combinations of times
are configured (eg with gaps, overlaps)?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #3 from Roman <rommer@active.by> 2008-02-18 10:57:23 ---
(In reply to comment #1)
> Couldn't you do all that with string expansion now that spamd_address is
> expanded?
>
No. At least weight.

(In reply to comment #2)
> What's the behaviour with the 'time' option when insane combinations of times
> are configured (eg with gaps, overlaps)?
>
Time option calculated by the following formula (very simple):

time_start = hour_start * 3600 + minute_start * 60 + second_start
time_end = hour_end * 3600 + minute_end * 60 + second_end
time_now = hour_now * 3600 + minute_now * 60 + second_now

spamd_address match, when (time_now >= time_start && time_now < time_end).
By default time_start = 0, time_end = 86400.

So, for example, when time_start > time_end, the address never will match.
If time option contains incorrect data, exim writes to log warning and
ignores this address.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #4 from Johannes Berg <johannes@sipsolutions.net> 2008-02-18 11:14:58 ---
(In reply to comment #3)
> (In reply to comment #1)
> > Couldn't you do all that with string expansion now that spamd_address is
> > expanded?
> >
> No. At least weight.

Good point. Maybe it would make sense to have a generic select string expansion
that does a selection like that? Doesn't really matter to me, but I could see
people wanting similar things elsewhere.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670

Roman <rommer@active.by> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #228 is|0 |1
obsolete| |




--- Comment #5 from Roman <rommer@active.by> 2008-02-18 11:20:43 ---
Created an attachment (id=229)
--> (http://bugs.exim.org/attachment.cgi?id=229)
exim-4.69-spamd-improved.patch


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #6 from Roman <rommer@active.by> 2008-02-18 12:05:33 ---
> Good point. Maybe it would make sense to have a generic select string expansion
> that does a selection like that? Doesn't really matter to me, but I could see
> people wanting similar things elsewhere.
>
IMHO, it is impossible.
In any case, string expansion will be expanded as list of addresses or one
address. In case of list, exim's spam.c will try to use every spamd server,
listed
in spamd_address, with equal weights. In case of one server, exim's spam.c will
try only this server and defer message, if it will be unreachable.

If you have any suggestions, how to do it, I ready to try it.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #7 from Johannes Berg <johannes@sipsolutions.net> 2008-02-18 12:11:33 ---
(In reply to comment #6)

> In any case, string expansion will be expanded as list of addresses or one
> address. In case of list, exim's spam.c will try to use every spamd server,
> listed
> in spamd_address, with equal weights. In case of one server, exim's spam.c will
> try only this server and defer message, if it will be unreachable.

Oh you're right, it doesn't work the way I thought it could.

johannes


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #8 from Heiko Schlichting <heiko@fu-berlin.de> 2008-02-18 12:55:00 ---
It would be nice if all options for spamd_address and av_scanner are the same.
If the new parameters gets accepted for spamd_address, they should be
implemented for av_scanner as well.

Heiko


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #9 from Roman <rommer@active.by> 2008-02-18 15:19:13 ---
Created an attachment (id=230)
--> (http://bugs.exim.org/attachment.cgi?id=230)
exim-4.69-spamd-improved-v2.patch

(In reply to comment #8)
> It would be nice if all options for spamd_address and av_scanner are the same.
> If the new parameters gets accepted for spamd_address, they should be
> implemented for av_scanner as well.
>
> Heiko
>
av_scanner option don't support multiple servers.
My options is useless in this case.

I implemented new parameter - "backup":
example:

spamd_address = 10.0.0.1 783 weight=3 : \
10.0.0.2 783 weight=5 : \
10.0.0.3 783 backup

or
spamd_address = 10.0.0.1 783 weight=3 : \
10.0.0.2 783 weight=5 : \
10.0.0.3 783 time=11.00-17.00 backup : \
10.0.0.4 783 backup

This parameter marks spamd-server as "backup" server.
Requests to this server will be send only when all "non-backup"
servers fails to work.
It will be useful for bug #515:
http://bugs.exim.org/show_bug.cgi?id=515


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 670] imroved "spamd_address" syntax [ In reply to ]
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=670




--- Comment #10 from Roman <rommer@active.by> 2008-02-18 16:09:00 ---
Created an attachment (id=231)
--> (http://bugs.exim.org/attachment.cgi?id=231)
exim-4.69-spamd-improved-v3.patch

The same as v2, but accept hostnames instead of IP addresses only.

see bug #434
http://bugs.exim.org/show_bug.cgi?id=434


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##