Rules on incoming mails ?

Discussion in 'Tips/Tricks/Mods' started by vincen, Dec 16, 2006.

  1. vincen

    vincen New Member

    Hi,

    My goal is the following: I created some subfolders of my incoming mailbox and I would like that server puts emails directly in folders depending of originating email adress. Is it possible to do that in ISPConfig ? Either through the admin interface or by modifying some files in system ?

    Thanks in advance for all your help

    Vincèn
     
  2. martinfst

    martinfst Member Moderator

    Procmail

    ISPConfig uses procmail to process messages and you can easily extend the procmail rules in the user directories. I'm not sure how this is handled in case of upgrades, but for starters search for procmail in these forums. General info on procmail is widely available in the Internet.

    The current rules can be found in each user directory of the domains on your system (the <xxx>.rc files).
     
  3. vincen

    vincen New Member

    Well I looked through FAQ of procmail but I still have an issue. I added a file named .subscriptions.rc with following content in home directory of an account:

    Code:
    :0:
    * ^Sender:.*@macfr.com
    IN-Macfr
    
    I created a folder in IMAP named Macfr under my INBOX but rule is not executed.

    An idea what's wrong ?

    Thanks

    Vincèn
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you include your new rule in the file .procmailrc in the users home directory? The .procmailrc file gets overridden when you edit the user in ISPConfig, to add it permanently, add the line to the master template file in /root/ispconfig/isp/conf/
     
  5. vincen

    vincen New Member

    yep I added my rule at .procmailrc file of account but still doesn't work :( Is there a way to know if the problem is that procmail doesn't execute my rule or that it gets an error during execution of rule ? as I looked at log in maillog but found nothing interesting :(

    Thanks

    Vince
     
  6. vincen

    vincen New Member

    I got finally it right that way ;)

    :0:
    * ^From:.*@macfr.com
    ${HOME}/Maildir/.INBOX.Macfr/

    Thanks

    Vincèn
     

Share This Page