ok..
all you have to do is look at fetchmail file conf (on google for example), then customize your file according to your needs.. there are no references to port? well, you could do everything you wish..
I've changed my 90fetchmail to use with freepops..
thisi is the modified part
foreach my $FetchMailAcount ( @FetchMailAccounts )
{
$i++ ;
my ( $mserv, $mtype, $mname, $mpass ) = split FS, $FetchMailAcount ;
if(not defined $mserv ) { $mserv='';}
if(not defined $mname ) { $mname='';}
if(not defined $mpass ) { $mpass='';}
if(not defined $mtype ) { $mtype='';}
my $mport = '';
my $dnstyp = " and options no dns ";
if ($mserv ne '')
{
$dnstyp = " and options no dns ";
if ($mserv eq "my.lan") {
$mport=' port 2000';
$mserv=' 192.168.0.90';
}
if($mtype eq "IMAP") { $dnstyp= ""; }
my $mdbg="-d0 --silent --syslog ";
if($Debug eq "YES") { $mdbg="-d0 --verbose --syslog "; }
my $staticvalue = "/usr/bin/fetchmail " . $mdbg . "--fetchmailrc - <<EOF\n" ;
$staticvalue .= "set postmaster \"postmaster\"\n" ;
$staticvalue .= "set bouncemail\nset properties \"\"\n" ;
# we need to convert the name and the password from HEX to text
$mname = pack( "H*", $mname ) ;
$mpass = pack( "H*", $mpass ) ;
# special case : the \ must be changed to \x5c !
$mname =~ s/[\\]/\\x5c/g ;
$mpass =~ s/[\\]/\\x5c/g ;
# escape some odd characters by \ (just add them between the [] if needed
$mname =~ s/([\^\$\@\'\"\`])/\\$1/g ;
$mpass =~ s/([\^\$\@\'\"\`])/\\$1/g ;
# special case : the ' must be quoted another way
$mname =~ s/[\']/\\x27/g ;
$mpass =~ s/[\']/\\x27/g ;
$OUT .= "#\n";
$OUT .= "# Mail N".$i." Account for : ".$comment."\n";
$OUT .= "logger -p mail.info ".$comment." ".$mname."\n";
$OUT .= $staticvalue;
$OUT .= "poll ".$mserv." with proto ".$mtype."".$mport."".$dnstyp." user '" ;
$OUT .= $mname."' smtpaddress ".$dom." with password '" ;
$OUT .= $mpass."' is ".$name." here".$keep." \n" ;
$OUT .="EOF\n";
}
}
}
}
NOTE this is only a part of the file
as you can see, I use a non standard port and ip if I use "my.lan" as the remote server..
HTH
Ciao
Stefano