Well now that biff works, (at one level) it doesn't (at the next one).
My comsat daemon expects a call in the form of
user(_at_)mailbox-offset
while procmail delivers in the form of
user(_at_)offset:mailbox
I've changed the : seperator to a - (fairly easy), but now I need to
rearrange offset and mailbox in the call. Here's the (probably) relevant
code snippet:
addr.sin_port=htons((short)s); /* network order */
cat(tgetenv(lgname),"@"); /* should always fit in buf */
if(lasttell>=0) /* was it a file? */
ultstr(0,(unsigned long)lasttell,buf2),catlim(buf2); /* yep */
catlim(COMSATxtrsep); /* custom seperator */
if(lasttell>=0&&!strchr(dirsep,*lstfolder)) /* relative filename? */
catlim(tgetenv(maildir)),catlim(MCDIRSEP_); /* prepend curdir */
catlim(lstfolder);s=socket(AF_INET,SOCK_DGRAM,UDP_protocolno);
sendto(s,buf,strlen(buf),0,(const void*)&addr,sizeof(addr));rclose(s);
yell("Notified comsat:",buf);
Somehow I have to get buf in the form of user(_at_)mailbox-offset(_dot_) Any
ideas?
Thanks,
Mark Miller