Procmail logging

Discussion in 'Tips/Tricks/Mods' started by Morons, Feb 12, 2007.

  1. Morons

    Morons Member

    I added logging of procmail to /ispconfig/isp/conf/procmailrc.master with VERBOSE=off

    If the user gets created and I need to debug I change the relevant lines in /var/www/webx/user/zone.tld_test/.procmailrc to VERBOSE=on

    Code:
    VERBOSE=off
    LOGABSTRACT=yes
    LOGFILE=/var/log/procmail.log
    COMSAT=no
    {MAILDIR_COMMENT}MAILDIR=$HOME/Maildir/
    {MAILDIR_COMMENT}DEFAULT=$MAILDIR
    {MAILDIR_COMMENT}ORGMAIL=$MAILDIR
    {QUOTA}
    INCLUDERC={PMDIR}/.mailsize.rc
    {QUOTA_COMMENT}INCLUDERC={PMDIR}/.quota.rc
    {ANTIVIRUS_COMMENT}INCLUDERC={PMDIR}/.antivirus.rc
    {MAILSCAN_COMMENT}INCLUDERC={PMDIR}/.local-rules.rc
    {MAILSCAN_COMMENT}INCLUDERC={PMDIR}/.html-trap.rc
    {SPAMASSASSIN_COMMENT}INCLUDERC={PMDIR}/.spamassassin.rc
    {AUTORESPONDER_COMMENT}INCLUDERC={PMDIR}/.autoresponder.rc
    Also give /var/log/procmail.log some rights chmod 666 /var/log/procmail.log, this might be tweeked!
    now you can follow the procmail process by issuing the command
    Code:
    tail -vf /var/log/procmail.log
    and scannig fo errors as it happens!

    P.S. I'm working on spamassasin logging as the default spamd logs but ISPC seem not to log spam results.
    I need someone to please post me an script to "retro-fit" these lines to the existing user .procmailrc files that does not already have the settings please.:cool:
     
    Last edited: Feb 12, 2007
  2. falko

    falko Super Moderator ISPConfig Developer

    You must modify a setting for each user in ISPConfig (e.g. change quota, enable/disable Mailscan, etc.). This will make ISPConfig rewrite the .procmailrc files.
     
  3. Morons

    Morons Member

    There are 975 users already :( but no fear this is only needed to look for trouble, if it exist! I can enable an an need basis by enabling mailscan. It would be nice to have an "global" write config files, someware in the system along with "recreate users" as these will help tremendous with moving and transfering from one server to another. It mean you can migrate from an server with (as a sample) Mandriva to ubuntu by only moving the mysql data then press the button to re-populate all the config files controlled by ISPC [Über controll mode] the only missing part will be the passwords that need to be stored also on mysql :)
    On that sunject I have had much trouble re-building group files from samples and passwd files as a result of missig the /etc/group in previous backups. It would be a nice feature to either globally backup and recreate the config files or per system like dns, or virtusertable, apache or any crucial system.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Another way would be to update the status field of each user in the isp_isp_user table to u and then run
    Code:
    touch /home/admispconfig/ispconfig/.run
     
  5. Morons

    Morons Member

    Inside phpmyadmin select the database and
    Code:
    UPDATE `db_ispconfig`.`isp_isp_user` SET `status` = 'u' ;
    will do it!
     

Share This Page