'Process an IHAVE command.  Arguments:
- id: message-id of the article
- f:  file containing the article
Returns:
- resp: server response if successful
Note that if the server refuses the article an exception is raised.'

def ihave(self, id, f):

    resp = self.shortcmd(('IHAVE    ' + id))
    if (resp[0] != '3'):
        raise NNTPReplyError(resp)
    while 1:
        line = f.readline()
        if (not line):
            break
        if (line[(-1)] == '\n'):
            line = line[:(-1)]
        if (line[:1] == '.'):
            line = ('.' + line)
        self.putline(line)
    self.putline('.')
    return self.getresp()
