Receive mail and save attachment automatically.

Discussion in 'Server Operation' started by Mick27, Sep 25, 2007.

  1. Mick27

    Mick27 New Member

    (first : receiving mail sounds like desktop oriented, but no, in this case this is true server oriented)

    I'm looking for way to have my server checking a mail box every x mn (cron style) and extract attachment from mails and put them in a specified directory.

    I have looked after several mail clients and utilities like mutt fetchmail procmail etc but I didn't found any answer.

    Basically the mails will have a xml style file attached that need to be put in a directory for processing.

    I've been looking for a month now and still can't find any solution.

    If you have one, I'd like to know about it :)


  2. falko

    falko Super Moderator ISPConfig Developer

  3. cyanescent

    cyanescent New Member

    you can use munpack to extract attachments from single emails. If you are using Qmail maildir style mailboxes, then you can run a cron script over the relevant maildir directories. If you are using mbox, then you will need to convert it to maildir format first. Alternatively, you can simply pipe incoming emails from your MTA through procmail, call munpack from there, and bounce the old messages through your MTA again.

Share This Page