日志轮转无法处理mailfirst

我已经在/etc/logrotation.d/custom目录下的名为custom Ubuntu服务器上configuration了日志轮转,条目如下

 /var/log/apache2/access.log { daily mailfirst [email protected] missingok rotate 52 compress delaycompress notifempty create 640 root adm sharedscripts postrotate /etc/init.d/apache2 reload > /dev/null endscript prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript } 

但是当我运行命令logrotate -f /etc/logrotate.d/custom时会出现以下错误。

 logrotate -f custom error: custom:3 unexpected text 

它在mailfirst [email protected]发出错误。 为什么? 请帮忙。

它应该是:

 var/log/apache2/access.log { daily mail [email protected] mailfirst missingok rotate 52 compress delaycompress notifempty create 640 root adm sharedscripts postrotate /etc/init.d/apache2 reload > /dev/null endscript prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript }