In the file transports/smtp/smtp.c, near the end of the definition of the getmxrr routine, there's a line that should read: int l = ranny(len-1); instead of int l = ranny(len); That's all. Thanks, Eric Riehl Note: IMHO, you might also want to put the line: mx [0] . host = NULL at the beginning of the function instead of makeing the calling routing always do so.