/* asprintf can't take const */
void *errmsgc = __DECONST(char **, errmsg);
+ if (fseek(it->mailf, it->hdrlen, SEEK_SET) != 0) {
+ asprintf(errmsgc, "can not seek: %s", strerror(errno));
+ return (-1);
+ }
+
host = strrchr(it->addr, '@');
/* Should not happen */
if (host == NULL) {
send_remote_command(fd, "DATA");
READ_REMOTE_CHECK("DATA", 3);
- if (fseek(it->mailf, it->hdrlen, SEEK_SET) != 0) {
- syslog(LOG_ERR, "remote delivery deferred: cannot seek: %s", neterr);
- return (1);
- }
-
error = 0;
while (!feof(it->mailf)) {
if (fgets(line, sizeof(line), it->mailf) == NULL)