Hello
I have problem with sendmail -bs from postfix 2.9.0. It is killed by
segmentation fault when it is called by for example pine.
More precisely /usr/lib/postfix/smtpd is killed after reading MAIL FROM:
Log from this event:
Feb 16 18:45:34 main postfix/smtpd[15966]: connect from localhost[127.0.0.1]
Feb 16 18:45:34 main postfix/smtpd[15966]: smtp_stream_setup: maxtime=300
enable_deadline=0
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 220
main.bszx.eu.org ESMTP Postfix
Feb 16 18:45:34 main postfix/smtpd[15966]: watchdog_pat: (nil)
Feb 16 18:45:34 main postfix/smtpd[15966]: vstream_fflush_some: fd 1 flush 36
Feb 16 18:45:34 main postfix/smtpd[15966]: vstream_buf_get_ready: fd 0 got 16
Feb 16 18:45:34 main postfix/smtpd[15966]: < localhost[127.0.0.1]: EHLO
localhost
Feb 16 18:45:34 main postfix/smtpd[15966]: match_list_match: localhost: no match
Feb 16 18:45:34 main postfix/smtpd[15966]: match_list_match: 127.0.0.1: no match
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]:
250-main.bszx.eu.org
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]:
250-PIPELINING
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 250-SIZE
200000000
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 250-VRFY
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 250-ETRN
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]:
250-ENHANCEDSTATUSCODES
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 250-8BITMIME
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 250 DSN
Feb 16 18:45:34 main postfix/smtpd[15966]: watchdog_pat: (nil)
Feb 16 18:45:34 main postfix/smtpd[15966]: vstream_fflush_some: fd 1 flush 126
Feb 16 18:45:34 main postfix/smtpd[15966]: vstream_buf_get_ready: fd 0 got 6
Feb 16 18:45:34 main postfix/smtpd[15966]: < localhost[127.0.0.1]: RSET
Feb 16 18:45:34 main postfix/smtpd[15966]: > localhost[127.0.0.1]: 250 2.0.0 Ok
Feb 16 18:45:34 main postfix/smtpd[15966]: watchdog_pat: (nil)
Feb 16 18:45:34 main postfix/smtpd[15966]: vstream_fflush_some: fd 1 flush 14
Feb 16 18:45:34 main postfix/smtpd[15966]: vstream_buf_get_ready: fd 0 got 30
Feb 16 18:45:34 main postfix/smtpd[15966]: < localhost[127.0.0.1]: MAIL
FROM:<b...@bszx.eu.org>
Feb 16 18:45:34 main postfix/smtpd[15966]: extract_addr: input:
<b...@bszx.eu.org>
Feb 16 18:45:34 main postfix/smtpd[15966]: extract_addr: in:
<b...@bszx.eu.org>, result: b...@bszx.eu.org
I have done some debugging and I have found that smtpd had been killed in
smtpd_check_rewrite by access to uninitialized local_rewrite_clients
Attached patch fixes that problem but I don't know if it is correct
solution.
--
Pozdrawiam
Bartek Szady
--- postfix-2.9.0/src/smtpd/smtpd.c.orig 2012-02-16 19:55:40.000000000
+0100
+++ postfix-2.9.0/src/smtpd/smtpd.c 2012-02-16 20:49:02.000000000 +0100
@@ -2353,12 +2353,14 @@
return (-1);
}
}
- err = smtpd_check_rewrite(state);
- if (err != 0) {
- /* XXX Reset access map side effects. */
- mail_reset(state);
- smtpd_chat_reply(state, "%s", err);
- return (-1);
+ if (SMTPD_STAND_ALONE(state) == 0) {
+ err = smtpd_check_rewrite(state);
+ if (err != 0) {
+ /* XXX Reset access map side effects. */
+ mail_reset(state);
+ smtpd_chat_reply(state, "%s", err);
+ return (-1);
+ }
}
/*