[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] DNS query på MX record.



Henrik Brix Andersen wrote:
> > Det er dog som regel bedre bare at aflevere brevet til
> > /usr/lib/sendmail
> Hvordan gøres dette? Jeg står tilfældigvis med samme problem her...

Tja. Du kan save dit brev til en fil og system("/sbin/sendmail
<brevfil")
det er ikke ret stilfuldt, men virker hurtigt at kode.
Exec* mængden af funktioner udfører programmer med forskellige input
m.m. Men du skal være opmærksom på at disse ikke returnere til 
programmet der udførte exec' kaldet. Alternativt kunne man
fork() sit program med en pipe mellem de to, således at stdout
fra det ene program ender som stdin på den anden fork, og så
få sendmail til at spise dette som input. Endeligt så sidder
sendmail sikkert som port 25 på localhost. Dvs. at du kan 
åbne en socket til sendmail og bruge smtp protokollen til at
sende post med, og lade sendmail om at finde ud af hvordan du
for sendt brevet til modtageren. Well jeg har ikke prøvet, men
det var sådan jeg ville angribe sagen.

-- 
	Sometimes it's better to light a       Carsten Svaneborg
      flamethrower than curse the darkness.      sslug@sslug
	-- (Terry Pratchett, Men At Arms)    Fight Bill - use Linux


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *