Here's a strange thing; I have a couple of scripts; for flushing mail in
and out when my wife or I am dialled up. The fecthmail command in the
script fails, but the same command run from the command line works!
There's no I/O redirection (input or output) going on.
The details follow. At one point the script ends up doing this, below.
Note the extra read() after reading the whole of /etc/passwd. That seems to
be what causes the problem:
+ /usr/bin/strace /usr/bin/fetchmail -u kendall -p POP3 mail.zeta.org.au
.... leading to ...
lstat("/home/stella/.fetchmailrc", 0xbfffef10) = -1 ENOENT (No such file or directory)
open("/etc/passwd", O_RDONLY) = 3
brk(0x805a000) = 0x805a000
fstat(3, {st_mode=S_IFREG|0644, st_size=658, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
read(3, "root:<censored>:0:0:root:/roo"..., 4096) = 658
read(3, "", 4096) = 0 ** <--- The extra read() **
close(3) = 0
munmap(0x40007000, 4096) = 0
write(2, "fetchmail: can\'t set up default"..., 52fetchmail: can't set up default
delivery to kendall
) = 52
_exit(5) = ?
+ exit 0
Yet if the same command is run from the command line, it prompts for
the mail account password and works correctly:
execve("/usr/bin/fetchmail", ["/usr/bin/fetchmail", "-u", "kendall", "-p", "POP3",
"mail.zeta.org.au"], [/* 29 vars */]) = 0
....leading to ...
lstat("/home/stella/.fetchmailrc", 0xbfffeefc) = -1 ENOENT (No such file or directory)
open("/etc/passwd", O_RDONLY) = 3
brk(0x805a000) = 0x805a000
fstat(3, {st_mode=S_IFREG|0644, st_size=658, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
read(3, "root:<censored again>:0:0:root:/roo"..., 4096) = 658
close(3) = 0
munmap(0x40007000, 4096) = 0
lstat("/home/stella/.fetchids", 0xbfffef20) = -1 ENOENT (No such file or directory)
.... various other stuff and correctly prompts ...
write(2, "Enter password for kendall@mail."..., 45Enter password for
[EMAIL PROTECTED]: ) = 45
Any idea why this would be?! I'm (still!) running Red Hat 4.2 and
fetchmail v 2.2. Is there something simple/odd that I'm missing, or is this
too bizarre to be diagnosable?
luke
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text