aboutsummaryrefslogtreecommitdiffstats
path: root/src/lmtp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-25 14:03:42 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-25 14:03:42 +0300
commitb9a9496cc4cd6619fc1a7c6a59d39e7147a9f20e (patch)
tree43b692bdccc08ae8672ae0b576fbf1e1baaa6a79 /src/lmtp.c
parent1cd34f5283bcf1d4973a351dc5235094608e3d2d (diff)
downloadrspamd-b9a9496cc4cd6619fc1a7c6a59d39e7147a9f20e.tar.gz
rspamd-b9a9496cc4cd6619fc1a7c6a59d39e7147a9f20e.zip
* Fix memory corruption and lmtp handling
* Add e-mail address validation in lmtp
Diffstat (limited to 'src/lmtp.c')
-rw-r--r--src/lmtp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lmtp.c b/src/lmtp.c
index ba03cd93d..f7aec0bdf 100644
--- a/src/lmtp.c
+++ b/src/lmtp.c
@@ -260,6 +260,12 @@ start_lmtp_worker (struct rspamd_worker *worker)
init_signals (&signals, sig_handler);
sigprocmask (SIG_UNBLOCK, &signals.sa_mask, NULL);
+ /* Ignore SIGPIPE for further use in LDA delivery */
+ sigemptyset (&signals.sa_mask);
+ sigaddset (&signals.sa_mask, SIGPIPE);
+ signals.sa_handler = SIG_IGN;
+ sigaction (SIGPIPE, &signals, NULL);
+ sigprocmask (SIG_UNBLOCK, &signals.sa_mask, NULL);
/* SIGUSR2 handler */
signal_set (&worker->sig_ev, SIGUSR2, sigusr_handler, (void *) worker);