aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/getfetchmail
blob: bcac9d3e6eb1c2dd3599febbd586857269dd87bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash 
RH=ftp.ccil.org
p=`\
echo dir /pub/esr/fetchmail/f\*src.rpm \
   | ftp $RH \
   | grep /pub/esr/fetchmail/fetchmail-[45] \
   | tail -1`
#p='-rw-r--r-- 1 23 wheel 478424 Dec 18 03:54 /pub/esr/fetchmail/fetchmail-4.7.1-1.src.rpm'
#echo $p | sed -e "s=^.^/pub=pub="
p1=`echo $p | sed -e "s=^.*/pub=pub="`
#echo $p1
#basename  $p1
#dirname $p1
d=`dirname $p1`
f=`basename $p1`
cd /work/incoming
email=$LOGNAME\@`hostname`
ftp -n <<ZZ
open $RH
user anonymous $email
cd /$d
get $f
bye
ZZ
rpm -K $f >/dev/null 2>&1 \
   || {
         rpm -K $f 2>&1 | mail $email -s "error getting $f"
         exit 
      }
rpm --rebuild  $f 2>&1 |\
   mail $email -s "Rebuilding $f"
must be followed by true name of host to poll # interval -- must be followed by an interval skip count # protocol (or proto) -- must be followed by a protocol ID # uidl # no uidl # port -- must be followed by a TCP/IP port number # authenticate (or auth) -- must be followed by an authentication type # timeout -- must be followed by a numeric timeout value # envelope -- must be followed by an envelope header name # qvirtual -- must be followed by a name prefix # no envelope # aka -- must be followed by one or more server aliases # localdomains -- must be followed by one or more domain names # interface -- must be followed by device/IP address/mask # monitor -- must be followed by device # plugin -- must be followed by a string command name # plugout -- must be followed by a string command name # dns # no dns # checkalias -- do multidrop address comparison by IP address # no checkalias -- do multidrop address comparison by name # # username (or user) -- must be followed by a name # is -- must be followed by one or more names # folder -- must be followed by remote folder names # password (or pass) -- must be followed by a password string # smtphost (or smtp) -- must be followed by host names # smtpaddress -- must be followed by a host name # antispam -- must be followed by a numeric response value # mda -- must be followed by an MDA command string # bsmtp -- must be followed by a filename or - # lmtp # preconnect (or pre) -- must be followed by an executable command # postconnect (or post) -- must be followed by an executable command # # keep # flush # fetchall # rewrite # forcecr # stripcr # pass8bits # dropstatus # mimedecode # no keep # no flush # no fetchall # no rewrite # no forcecr # no stripcr # no pass8bits # no dropstatus # no mimedecode # limit -- must be followed by numeric size limit # warnings -- must be followed by numeric size limit # fetchlimit -- must be followed by numeric msg fetch limit # batchlimit -- must be followed by numeric SMTP batch limit # expunge -- must be followed by numeric delete count # properties -- must be followed by a string # # Legal protocol identifiers are # pop2 (or POP2) # pop3 (or POP3) # imap (or IMAP) # imap-k4 (or IMAP-K4) # apop (or APOP) # rpop (or RPOP) # kpop (or KPOP) # etrn (or ETRN) # # Legal authentication types are # login # kerberos # kerberos_v5 # # Legal global option statements are # # set logfile -- must be followed by a string # set idfile -- must be followed by a string # set postmaster -- must be followed by a string # set daemon -- must be followed by a number # set syslog # set invisible # # The noise keywords `and', `with', `has', `wants', and `options' are ignored # anywhere in an entry; they can be used to make it resemble English. The # punctuation characters `,' `:' `;' are also ignored. # # The run control file format is fully described (with more examples) on the # fetchmail manual page. # # This is what the developer's .fetchmailrc looks like: set daemon 300 # Poll at 5-minute intervals defaults interface "sl0/10.0.2.15" # SLIRP standard address user esr is esr fetchmail-friends magic-numbers here fetchall # Use this for production poll imap.ccil.org protocol IMAP: no dns, aka snark.thyrsus.com thyrsus.com locke.ccil.org ccil.org password my_remote_password; # Use this to test POP3 skip pop3.ccil.org with protocol APOP: no dns, aka snark.thyrsus.com thyrsus.com locke.ccil.org ccil.org password my_apop_secret; # Use this to test against a different server skip pop3.netaxs.com: password my_netaxs.password;