feat(fetchmail): added fetchmail

cron job to run fetchmail script to get fetchmail config from roundcube
mysql database.

MR !1
This commit is contained in:
2022-02-14 09:53:57 +09:30
parent a7c1ae052c
commit ace2493f66
4 changed files with 55 additions and 0 deletions

View File

@ -31,6 +31,8 @@ do
done
mkdir -p /var/lock/fetchmail
if [ "$1" == "setup" ]; then

View File

@ -0,0 +1,7 @@
#
# SpamAssassin Bayes learning from mailboxes
#
# m h dom mon dow user command
#1,31 * * * * root if [ "0$USE_FETCHMAIL_PL" != "0" ]; then /bin/fetchmail.pl 2>&1; fi
1,31 * * * * root if [ "0$USE_FETCHMAIL_PL" != "0" ]; then echo /bin/fetchmail.pl 2>&1; fi

View File

@ -0,0 +1,24 @@
# database settings
# database backend - uncomment one of these
our $db_type = 'mysql';
#my $db_type = 'mysql';
# host name
our $db_host="mysql";
# database name
our $db_name="roundcube";
# database username
our $db_username="roundcube";
# database password
our $db_password="roundcube";
# Where to create a lockfile; please ensure path exists.
our $run_dir="/var/lock/fetchmail";
# in case you want to use dovecot deliver to put the mail directly into the users mailbox,
# set "mda" in the fetchmail table to the keyword "dovecot".
# Where the delivery binary is located
$dovecot_deliver = "/usr/lib/dovecot/dovecot-lda";