The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove mail according to date.

Discussion in 'E-mail Discussions' started by khoonchee, Aug 27, 2003.

  1. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I noticed that /var/spool/exim/input contain lots of mails since 31 March 2003.

    How do I remove them according to the ls -l command date?

    Thanks,

    cPanel.net Support Ticket Number:
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    exiqgrep -f '^<>$' -o NNN -i | xargs exim -Mrm

    NNN = messages that are older than the given time. (i.e. replacing NNN with 86400 would remove all messages older than 24 hours)

    cPanel.net Support Ticket Number:
     
  3. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hi ,

    Thanks but I am getting the below error :

    exiqgrep -f '^<>$' -o 172800 -i | xargs exim -Mrm

    Line mismatch: 6d 19q0CH-0008Ke-Ry <> *** frozen ***
    exim: no message ids given after -Mrm option

    Thanks,

    cPanel.net Support Ticket Number:
     
  4. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    exiqgrep -f '^<>$' -o 172800 -i -x | xargs exim -Mrm

    cPanel.net Support Ticket Number:
     
  5. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Thanks,but ....

    exiqgrep -f '^<>$' -o 172800 -i -x | xargs exim -Mrm
    Line mismatch: 6d 19q0CH-0008Ke-Ry <> *** frozen ***
    exim: no message ids given after -Mrm option

    Hitting ls -l | more in /var/spool/exim/input produce the below output :

    -rw------- 1 mailnull mail 2829 Mar 31 11:00 1903a3-00051E-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:00 1903a4-00051T-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:00 1903a6-00051r-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:00 1903aN-00052z-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:01 1903aS-00053L-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:01 1903au-00055N-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:01 1903b0-00055k-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:01 1903b6-00056D-00-D
    -rw------- 1 mailnull mail 2829 Mar 31 11:01 1903bE-00056e-00-D

    I wish to remove mails according to the date Mar 31 , Apr 1 and ......

    Thanks,

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page