Mfitler stops and still mail flows

  • This documentation is in reference to the problem encountered at AZB Mumbai where in mfilter had stopped and hence backup of mails was not taken.
  • In the right scenario when mfilter stops the entire mail flow should be stopped and no mails should be delivered
  • This is achieved by setting an option while
    configuring of mfilter
  • The 8th point describes the following
       INPUT_MAIL_FILTER(
       `filter1',
       `S=inet:1234@localhost, F=T, T=C:1m;S:30s;R:6m;E:1m'
       )dnl
      
  • F = T , this option sets failure equals true saying that when mfilter stops mail flow should also stop
  • This option was not set at AZB Mumbai and hence the problem
  • HOW TO FIX THIS
    1. Please check how mfilter is configured currently. Earlier configuration of mfilter involved making changes in /etc/mail/merce.mc but now it involves changes to be done to /etc/mail/merce-rx.mc
    2. CASE 1 : MFILTER WAS CONFIGURED TO RUN VIA /etc/merce-rx.mc and the option F=T was not set
      1. cd /etc/mail
      2. ci -l /etc/mail/merce-rx.mc
      3. vi /etc/mail/merce-rx.mc
      4. search for the line filter1
      5. The line for which filter1 is searched would have the next line as
                  `S=inet:1234@localhost, T=C:1m;S:30s;R:6m;E:1m'  
                   
      6. Please note that the option F = T is not set in this case. If it is then mfilter has been configured properly i.e. via merce-rx.mc and with option F=T.
      7. If the option is not set then set the same as per the earlier description
        and now the line should be as
                  `S=inet:1234@localhost, F=T, T=C:1m;S:30s;R:6m;E:1m'
                   
      8. Apart from changing this line check on the other change as described in configuring of mfilter
        CASE 2 : MFILTER WAS CONFIGURED TO RUN VIA /etc/merce.mc and the option F=T was not set
      1. cd /etc/mail
      2. ci -l /etc/mail/merce.mc
      3. vi /etc/mail/merce.mc
      4. search for the line filter1
      5. The search would show the following part
                 INPUT_MAIL_FILTER(
                `filter1', 
                `S=inet:1234@localhost, F=T, T=C:1m;S:30s;R:6m;E:1m'
                 )dnl
                
      6. Delete these 3 lines. Please remember that you should have already taken the backup of merce.mc file
      7. regenerate sendmail.cf from merce.mc
      8. m4 /etc/mail/merce.mc > /var/tmp/sendmail.cf
      9. Take a backup of sendmail.cf i.e. execute command
        ci -l /etc/sendmail.cf
      10. vimdiff /etc/sendmail.cf /var/tmp/sendmail.cf
      11. Note down the changes which are the parts that are present in /etc/sendmail.cf but not in /var/tmp/sendmail.cf. Make those changes to /var/tmp/sendmail.cf
      12. After making the changes please ensure that apart from commented lines there are no differences between the 2 files.
      13. As you have taken the backup of sendmail.cf replace it with /var/tmp/sendmail.cf
      14. mv /var/tmp/sendmail.cf /etc/sendmail.cf
      15. Configure mfilter