Discussion:
Bug in simcsan.c (empty From/To)
Lutz Petersen
2011-11-07 19:19:49 UTC
Permalink
Please give me a hint - isn't this wrong in simscan.c code ?
This produces bounces/failures if there is no from but an recipient
(instead of bounce only if there are neither both):


if ( MailFrom[0] == 0 && RcptTo[0][0] == 0 ) {
if ( DebugFlag > 0 ) {
fprintf(stderr, "simscan: no envelope information, deferred exit\n");
}
exit_clean(EXIT_454);
}

I mean this:

-- if ( MailFrom[0] == 0 && RcptTo[0][0] == 0 ) {
++ if ( MailFrom[0] == 0 && RcptTo[0] == 0 ) {


!DSPAM:4eb82f5c32711741710881!
Tom Collins
2011-12-02 18:18:47 UTC
Permalink
If no one emailed you back, here's my quick thought.

Look at the definition of RcptTo -- it's probably an array of character buffers to hold multiple email addresses.

If the first character ([0]) of the first address (RcptTo[0]) is a null byte ('\0'), then the address is empty.

That code shouldn't generate bounces for null senders, since there will be at least one email address in RcptTo[].

-Tom
Post by Lutz Petersen
Please give me a hint - isn't this wrong in simscan.c code ?
This produces bounces/failures if there is no from but an recipient
if ( MailFrom[0] == 0 && RcptTo[0][0] == 0 ) {
if ( DebugFlag > 0 ) {
fprintf(stderr, "simscan: no envelope information, deferred exit\n");
}
exit_clean(EXIT_454);
}
-- if ( MailFrom[0] == 0 && RcptTo[0][0] == 0 ) {
++ if ( MailFrom[0] == 0 && RcptTo[0] == 0 ) {
!DSPAM:4ed9168f32711403019570!

Loading...