How to use FUD daemon

Dave McMurtrie dave64 at andrew.cmu.edu
Tue Aug 3 08:01:54 EDT 2010


On 08/02/2010 10:56 PM, Lucas Zinato Carraro wrote:
>   Anyone knows where i can find examples and some documentation
> about the Cyrus Daemon FUD?
>
> I find only a man page in cyrus imap source.

There's not much to set up, so the man page tells you pretty much 
everything there is to know about fud.

 From a server perspective, to set it up you need to add an entry to 
cyrus.conf like so:

   fud           cmd="fud" listen="fud" prefork=0 proto="udp"

This assumes that you have a fud entry in /etc/services.  If not, add 
something like:

fud             4201/udp                        # Cyrus IMAP FUD Daemon

to your /etc/services file.

master will now start fud for you.


> There is a specific client for fud?

There might be, but nothing I'm aware of.  The finger client that runs 
on our public machines here at CMU knows how to do fud queries, but 
you'll notice in the man page that you have to assign 0 rights to the 
anonymous user for it to work.  We don't assign this right by default, 
so users would have to opt-in to make fud work for their mailbox.

The protocol is extremely simple, so if you wanted to test fud you could 
use something like:

#!/usr/bin/perl

use Socket;

print( "Enter fud hostname: " );
$hostname = <>;
chomp( $hostname );

print( "Enter username to query: " );
$username = <>;
chomp( $username );

socket( FUD, PF_INET, SOCK_DGRAM, getprotobyname( "udp" ) )
   or die( "failed to create udp socket: $!" );

$ipaddr = inet_aton( $hostname );
$portaddr = sockaddr_in( '4201', $ipaddr );

$fud_query = $username . '|user.' . $username;

send( FUD, "$fud_query", 0, $portaddr ) == length( $fud_query )
   or die( "failed to send fud query: $!" );

recv( FUD, $fud_response, 512, 0 )
   or die( "recv() failed: $!" );

print( "FUD responded: $fud_response\n" );

exit( 0 );

-- 
Dave McMurtrie, SPE
Email Systems Team Leader
Carnegie Mellon University,
Computing Services


More information about the Info-cyrus mailing list