From: Matthias A. <mat...@gm...> - 2010-10-13 10:19:35
|
Am 12.10.2010 23:08, schrieb Jeffrey Shawn McKinzie: > > > On 10/12/10 12:28 PM, Matthias Andree wrote: >> Am 12.10.2010 19:40, schrieb Jeffrey Shawn McKinzie: >>> Good news. I was not able to download the test version with the link >>> you send. (seemed to just hang) >> The website uses a redirector and works for me - does your downloader follow >> redirects? It needs to. >> > *I used curl... I'm sure it had issues with the redirector.* Yup. You need to add -L to the curl command line. Sorry for not mentioning that. > *I need to have a catchall address for unlisted email to go to a single > address. I was thinking the postmaster option would work. Can it be set > for each host? The production RC polls about 25 accounts on different > servers. It would be ideal if I could set or reset the postmaster for > each server. Unfortunately, it is a global option. The - a bit awkward for 25 accounts - workaround would be to create 25 directories, with one fetchmailrc file per account, and use the FETCHMAILHOME environment variable to point to those directories. Perhaps you can script the generation of rcfiles. Say: basedir/account01/fetchmailrc # contains data/postmaster for account 1 basedir/account02/fetchmailrc # ditto for account 2 ... Then you'd run: env FETCHMAILHOME=basedir/account01 fetchmail --logfile ... env FETCHMAILHOME=basedir/account02 fetchmail --logfile ... > > Finally, the system is using a batch file to call fetchmail with the > command line switches: > > #!/bin/sh > /usr/bin/fetchmail -d 60 -t 45 -f /root/.fetchmailrc --logfile > /var/log/fetchmail.log > sleep 61 > > Wouldn't it be better to put the options in the RC file? I think I > could put daemon interval, timeout and the logfile location in the RC. > * Certainly possible. If you want to run fetchmail from inittab, runit, daemontools, Solaris's SMF, upstart, or similar supervisors, you can add "-N" or --nodetach to fetchmail's command line or rcfile. That keeps it in the foreground in spite of daemon mode and allows for reliable restarts. Also, if you're forwarding by SMTP, or your MDA is designed and documented to be safe in set-uid or set-gid mode, you don't need to and should not run fetchmail as root -- you can instead create a dedicated unprivileged fetchmail user and use that. HTH -- Matthias Andree |