1*64ef9f27Sschwarze.\" $OpenBSD: spamlogd.8,v 1.18 2013/09/15 20:02:34 schwarze Exp $ 21f68c1d4Sbeck.\" 31f68c1d4Sbeck.\" Copyright (c) 2004 Bob Beck. All rights reserved. 41f68c1d4Sbeck.\" 51f68c1d4Sbeck.\" Permission to use, copy, modify, and distribute this software for any 61f68c1d4Sbeck.\" purpose with or without fee is hereby granted, provided that the above 71f68c1d4Sbeck.\" copyright notice and this permission notice appear in all copies. 81f68c1d4Sbeck.\" 91f68c1d4Sbeck.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 101f68c1d4Sbeck.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 111f68c1d4Sbeck.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 121f68c1d4Sbeck.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 131f68c1d4Sbeck.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 141f68c1d4Sbeck.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 151f68c1d4Sbeck.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 161f68c1d4Sbeck.\" 17*64ef9f27Sschwarze.Dd $Mdocdate: September 15 2013 $ 181f68c1d4Sbeck.Dt SPAMLOGD 8 191f68c1d4Sbeck.Os 201f68c1d4Sbeck.Sh NAME 211f68c1d4Sbeck.Nm spamlogd 221f68c1d4Sbeck.Nd spamd whitelist updating daemon 231f68c1d4Sbeck.Sh SYNOPSIS 241f68c1d4Sbeck.Nm spamlogd 25e106bcd2Shenning.Op Fl DI 261f68c1d4Sbeck.Op Fl i Ar interface 2757aa41b6Sjmc.Op Fl l Ar pflog_interface 28607a4d95Sokan.Op Fl W Ar whiteexp 2998babcadSbeck.Op Fl Y Ar synctarget 301f68c1d4Sbeck.Sh DESCRIPTION 311f68c1d4Sbeck.Nm 321f68c1d4Sbeckmanipulates the 331f68c1d4Sbeck.Xr spamd 8 341f68c1d4Sbeckdatabase in 351f68c1d4Sbeck.Pa /var/db/spamd 369c8ee242Sjmcused for greylisting. 371f68c1d4Sbeck.Nm 381f68c1d4Sbeckupdates the 391f68c1d4Sbeck.Pa /var/db/spamd 401f68c1d4Sbeckwhitelist entries whenever a connection 411f68c1d4Sbeckto port 25 is logged to the 421f68c1d4Sbeck.Xr pflog 4 43726a8cd8Sjmcinterface. 44726a8cd8SjmcThe source addresses of inbound connections are whitelisted 45a574feadSbeckwhen seen by 46a574feadSbeck.Nm 47a574feadSbeckto ensure that their entries in 48a574feadSbeck.Pa /var/db/spamd 49a574feadSbeckdo not expire if the connecting host continues to send legitimate mail. 50a574feadSbeckThe destination addresses of outbound connections are whitelisted 51a574feadSbeckwhen seen by 52a574feadSbeck.Nm 53a574feadSbeckso that replies to outbound mail may be received without initial 549c8ee242Sjmcgreylisting delays. 559c8ee242SjmcGreylisting is explained more fully in 569c8ee242Sjmc.Xr spamd 8 . 571f68c1d4Sbeck.Pp 581f68c1d4SbeckThe options are as follows: 591f68c1d4Sbeck.Bl -tag -width Ds 60e106bcd2Shenning.It Fl D 61e106bcd2ShenningDebugging mode. 62e106bcd2Shenning.Nm 63e106bcd2Shenningdoes not disassociate from the controlling terminal. 64a574feadSbeck.It Fl I 65a574feadSbeckSpecify that 66a574feadSbeck.Nm 67726a8cd8Sjmcis only to whitelist inbound SMTP connections. 68a574feadSbeckBy default 69a574feadSbeck.Nm 70726a8cd8Sjmcwill whitelist the source of inbound SMTP connections, and the 71726a8cd8Sjmctarget of outbound SMTP connections. 721f68c1d4Sbeck.It Fl i Ar interface 731f68c1d4SbeckSpecify a network interface on which packets must arrive. 74859e7fb4SderaadtThe default is to watch for connections logged from all interfaces. 7557aa41b6Sjmc.It Fl l Ar pflog_interface 7657aa41b6SjmcSpecify a 7757aa41b6Sjmc.Xr pflog 4 7857aa41b6Sjmcinterface to listen for connection notifications. 7957aa41b6SjmcThe default is to watch for connections logged on 8057aa41b6Sjmc.Dq pflog0 . 81607a4d95Sokan.It Fl W Ar whiteexp 82607a4d95SokanAdjust the time for 83607a4d95Sokan.Ar whiteexp 84607a4d95Sokanin hours. 85607a4d95SokanThe default is 864 hours (approximately 36 days); maximum is 2160 hours 86607a4d95Sokan(approximately 90 days). 8798babcadSbeck.It Fl Y Ar synctarget 8898babcadSbeckAdd a target to receive synchronisation messages; see 8998babcadSbeck.Sx SYNCHRONISATION 9098babcadSbeckbelow. 9198babcadSbeckThis option can be specified multiple times. 921f68c1d4Sbeck.El 931f68c1d4Sbeck.Pp 940d1557d6SjmcIt is important to log any connections to and from the real 951f68c1d4SbeckMTA in order for 961f68c1d4Sbeck.Nm 971f68c1d4Sbeckto update the whitelist entries. 980d1557d6SjmcSee 990d1557d6Sjmc.Xr spamd 8 1000d1557d6Sjmcfor an example ruleset for logging such connections. 101a574feadSbeck.Pp 102a574feadSbeck.Nm 103a574feadSbecksends log messages to 104a574feadSbeck.Xr syslogd 8 105726a8cd8Sjmcusing facility 106726a8cd8Sjmc.Em daemon . 107a574feadSbeck.Nm 108a574feadSbeckwill log each connection it sees at level 109726a8cd8Sjmc.Dv LOG_DEBUG . 11098babcadSbeck.Sh SYNCHRONISATION 11198babcadSbeck.Nm 11298babcadSbecksupports realtime synchronisation of whitelist states by sending 1132458cccaSjmcthe information it updates to 11498babcadSbecka number of 11598babcadSbeck.Xr spamd 8 11698babcadSbeckdaemons running on multiple machines. 117ef9181b0SschwarzeTo enable synchronisation, use the command line option 11898babcadSbeck.Fl Y 11998babcadSbeckto specify the machines to which 12098babcadSbeck.Nm 12198babcadSbeckwill send messages when it updates the state information. 122ef9181b0SschwarzeFor more information, see 123ef9181b0Sschwarze.Xr spamd 8 . 1241f68c1d4Sbeck.Sh FILES 125*64ef9f27Sschwarze.Pa /var/db/spamd 1261f68c1d4Sbeck.Sh SEE ALSO 127726a8cd8Sjmc.Xr syslog 3 , 1281f68c1d4Sbeck.Xr pflog 4 , 1291f68c1d4Sbeck.Xr spamd.conf 5 , 1301f68c1d4Sbeck.Xr pflogd 8 , 1311f68c1d4Sbeck.Xr spamd 8 , 1321f68c1d4Sbeck.Xr spamd-setup 8 , 1331f68c1d4Sbeck.Xr spamdb 8 , 134726a8cd8Sjmc.Xr syslogd 8 , 1351f68c1d4Sbeck.Xr tcpdump 8 1361f68c1d4Sbeck.Sh HISTORY 1371f68c1d4SbeckThe 1381f68c1d4Sbeck.Nm 139726a8cd8Sjmccommand first appeared in 1401f68c1d4Sbeck.Ox 3.5 . 141