View Single Post
Old 12th March 2009, 16:16
airton airton is offline
Junior Member
Join Date: Jan 2009
Posts: 7
Thanks: 0
Thanked 10 Times in 4 Posts
Default Another bug? (solved)

getmail version 4.7.8 (Debian lenny)

If there is more than one retrive task (more .conf files in /etc/getmail) the mail isn't retrieved an is logged an error:

Error: unknown argument(s) ['/etc/getmail/mail.domain.tld_name@site.tld.conf'] ; try --help

For handling multiple task seem getmail require to be invoked with a different syntax:

/usr/bin/getmail -n -v -g /etc/getmail -r /etc/getmail/file1.conf -r /etc/getmail/file2.conf -r /etc/getmail/file3.conf

or with a single rcfile with configuration for multiple tasks.

I've solved in this way:

1 - in /etc/getmail create a file / (chown getmail + chmod 744)

set -e 
cd /etc/getmail 
for file in *.conf ; do 
  rcfiles="$rcfiles -r $file" 
#echo  $rcfiles
exec /usr/bin/getmail -n -v -g /etc/getmail $rcfiles
2 - edited crontab of user getmail to invoke this script
*/5 * * * * /etc/getmail/  > /dev/null 2>> /var/log/ispconfig/cron.log

Last edited by airton; 12th March 2009 at 16:29.
Reply With Quote