[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e-smith-devinfo
Subject:    re: templates
From:       stephen noble <stephen7 () bigfoot ! com>
Date:       2001-03-10 0:41:10
[Download RAW message or body]


>On the whole, packages should add features, and thus should put their
>fragments in the templates directory. If you really need an override 
>for an existing feature, I'd suggest:
>         - Create an empty file of the same name in templates-custom
>         - Create a new file with the required features
>
>And if you can see a way that we can modify the standard template to 
>make your life easier (for example, add a property to the service to 
>disable a feature), suggest the change.

thanks gordon

you could consider breaking up 50multi-pop, 
this works for now

[ i was going to ask you to make /etc/startmail a template but you 
already have :-) ]

i created a blank template-custom/fetchmail/50multi-drop
then split the existing file up 
you can see what i did from this example,  50multi-dropD
i did this to 
* insert a 'set daemon 60' fragment between A and D 
* allow for multiple pop3 mail collection

the files must be in order so i called them 
50multi-drop
50multi-dropA 
50multi-dropB
..
50multi-dropZ


regards
stephen noble


#this is common 
{
    use esmith::config;
    use esmith::db;

    $OUT = '';

    local %services = (fetchmail => $fetchmail);

    my $status = db_get_prop(\%services, "fetchmail", "status")
							|| 'disabled';
    my $method = db_get_prop(\%services, "fetchmail", "Method")
							|| 'standard';

    if ($status eq "enabled" && $method eq 'multidrop')
    {
	# Write a fetchmail command which connects to a POP
	# server, retrieves all mail from a single account,
	# and feeds it to the local SMTP server.

	my $envelopeSpec =
	    db_get_prop(\%services, "fetchmail", "SecondaryMailEnvelope");
	my $SecondaryMailServer =
	    db_get_prop(\%services, "fetchmail", "SecondaryMailServer");
	my $SecondaryMailAccount =
	    db_get_prop(\%services, "fetchmail", "SecondaryMailAccount");
	my $SecondaryMailPassword =
	    db_get_prop(\%services, "fetchmail", "SecondaryMailPassword");
	$envelopeSpec = defined $envelopeSpec ?
		"envelope \"$envelopeSpec\"\n" : "";

	my $verbosity = db_get_prop(\%services, "fetchmail", "Verbosity")
		    || "";

 	local %domains;
 	tie %domains, 'esmith::config', '/home/e-smith/domains';

 	my $locals = join(' ',
			    ("$DomainName",
				grep
				    {db_get_type(\%domains, $_) eq 'domain'}
					keys %domains));

#A
#	$OUT .= "# multi-drop configuration; fetchmail ";
#	$OUT .= "retrieves all mail from a remote POP mailbox:\n";
#	$OUT .= "\n";
#	$OUT .= "/usr/bin/fetchmail --syslog $verbosity ";
#	$OUT .= "--fetchmailrc - <<EOF\n";
#	$OUT .= "\n";
#	$OUT .= "set postmaster \"postmaster\"\n";
#	$OUT .= "set bouncemail\n";

#D
	$OUT .= "set properties \"\"\n";
	$OUT .= "\n";

#G
#          $OUT .= "poll $SecondaryMailServer\n";
#	$OUT .= $envelopeSpec;
#	$OUT .= "    protocol POP3\n";
#	$OUT .= "    localdomains $locals\n";
#	$OUT .= "       username $SecondaryMailAccount ";
#	$OUT .= "password $SecondaryMailPassword to * here\n";
#	$OUT .= "           smtphost localhost\n";
#	$OUT .= "           smtpaddress $DomainName\n";
#	$OUT .= "           fetchall\n";
#	$OUT .= "           forcecr\n";
#	$OUT .= "\n";


#S
#duplicate G except hard code your values for multiple pop3 fetching

#Z
#	$OUT .= "EOF";

    }
}




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic