µ±Ç°Î»ÖãºLinux½Ì³Ì - Linux×ÊѶ - Óʼþ¹ýÂËÆ÷ maildropµÄ»ù±¾Ó÷¨

Óʼþ¹ýÂËÆ÷ maildropµÄ»ù±¾Ó÷¨

    ×î½ü¿´µ½ÂÛ̳ÀïһЩÈËרÃÅÎʵ½maildropµÄÓ÷¨ÎÊÌ⣬¶ø¶ÔÓÚÓʼþ¹ýÂËÕâÒ»·½ÃæÒ²ÊDZȽϹØ×¢µÄ¡£ÎҾͰÑÎÒʹÓÃmaildropµÄÒ»µãÐĵÃд³öÀ´¡£ÆäʵÎÒÒ²ÊÇ´Ósqwebmail»òÕßwmailµÄʹÓÃÖÐÕÒµ½µÄ£¨ÕâÒ²ÊÇΪʲôÎÒ֮ǰ»Ø¸´¶¼ÊÇÈôó¼Ò×°Ò»ÏÂwmail»òsqwebmailʹÓÃһϵÄÔ­Òò£©£¬ËùÒÔÖ»Éæ¼°µ½ÁËmaildropµÄÒ»µãµã»ù±¾Ó÷¨£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£

    Ê×ÏÈ°²×°maildrop£¬Õâ¸öºÜ¼òµ¥£¬ÏÈÈ¥ÏÂÔØhttp://class.868cn.com/download/maildrop-1.5.2.20030423.tar.gz

    È»ºó½âѹ£¬½øÈëĿ¼Àï¡£/configure make make install

    Ò»°ã¾Í¿ÉÒÔ°²×°³É¹¦¡££¨µ±È»Ö®Ç°Òª°²×°ÁËqmail£¬vpopmail£©°²×°³É¹¦ºó»áÔÚ/usr/local/binĿ¼ÏÂÉú³ÉÒ»¸ömaildropÎļþ¡£¾ÍÊÇʹÓÃËüÀ´×ö¹ýÂ˵Ä

    ÎÒ»¹ÊǼÙʹwangxu.comΪÐéÄâÓò£¬[email protected]ΪÆäÖÐÒ»¸öÓû§¡£ÏÂÃæ¾Í¶Ô[email protected]ËùÊÕµ½µÄÓʼþ½øÐÐһЩ¹ýÂ˹æÔò¡£

    ½øÈëÓû§µÄÓʼþĿ¼cd /home/vpopmail/domains/wangxu.com/wangxu

    ½¨Á¢¡£qmailÎļþ¡£

    vi .qmail

    ÄÚÈÝΪ£º

    ´úÂ룺/usr/local/bin/maildrop ./.mailfilter

    ×¢Òâ¡£qmailÎļþµÄÊôÐÔ

    chmod 600 .qmail

    chown vpopmail£ºvchkpw .qmail

    ÔÙ½¨Á¢¡£mailfilterÎļþvi .mailfilterÄÚÈÝΪ£º

    ´úÂ룺##Op£ºcontains ##Header£ºFROM ##Value£º[email protected] ##Folder£º*ÊÕÐÅÈ˾ÜÊÕÄúµÄÓʼþ##From£º##PlainString ##Name£º¹ýÂË·¢¼þÈË°üº¬[email protected]µÄÐżþ

    if £¨£¨/^FROM£º¡£*test\@test\.com/£©£©

    { echo ¡°ÊÕÐÅÈ˾ÜÊÕÄúµÄÓʼþ¡±

    EXITCODE=77 exit }

    ##Op£ºcontains ##Header£ºFROM ##Value£º[email protected] ##Folder£º¡£Trash ##From£º##PlainString ##Name£º½«·¢¼þÈË°üº¬[email protected]µÄÐżþ±£´æÔÚÀ¬»øÏä

    if £¨£¨/^FROM£º¡£*test\@test\.com/£©£©

    { to ¡°¡£/Maildir/.Trash/.¡±

    }

    to ¡°¡£/Maildir/.¡±

    ÆäÖÐ##ºóÃæµÄ¶¼Îª×¢ÊͲ¿·Ö£¬¿ÉÒÔ²»È¥¹ÜËü¡£

    if £¨£¨/^FROM£º¡£*test\@test\.com/£©£©

    { echo ¡°ÊÕÐÅÈ˾ÜÊÕÄúµÄÓʼþ¡±

    EXITCODE=77 exit }ÕâÒ»¶Î±íʾ·¢ÐÅÈ˵ØÖ·Öаüº¬[email protected]µÄ¾Í¾Ü¾ø½ÓÊÜ£¬²¢»Ø¸´·¢ÐÅÈËÒ»·â¾ÜÊÕÐżþ£¬ÄÚÈÝ˵Ã÷Ô­Òò¡°ÊÕÐÅÈ˾ÜÊÕÄúµÄÓʼþ¡±¡£ÆäÖеÄEXITCODE=77²»¼ÓÒ²¿ÉÒÔ£¨¹ýÂËÕû¸öÓòµÄÐżþÒ²¿ÉÒÔÕâÑùÓ㬴ó¼Ò×Ô¼ºÏëÏ룩

    if £¨£¨/^FROM£º¡£*test\@test\.com/£©£©

    { to ¡°¡£/Maildir/.Trash/.¡±

    }ÕâÒ»¶Î±íʾ·¢ÐÅÈ˵ØÖ·°üº¬[email protected]µÄ¾Í×Ô¶¯×ªÒƵ½À¬»øÏä¡£

    ×¢Òâ×îºóÒ»¾äto ¡°¡£/Maildir/.¡±

    Ëü±íʾµ±²»·ûºÏÉÏÃæËùÌáµ½µÄ¹ýÂ˹æÔòʱµÄÓʼþ¾ÍÕý³£µÄ·¢µ½[email protected]µÄÐÅÏäÀï¡£

    Õâ¾äÒ»¶¨ÒªÓУ¬²»È»»áÊÕ²»µ½Ðŵġ£

    ͬʱҲҪעÒâ¡£mailfilterµÄÊôÐԺ͡£qmailÊÇÒ»ÑùµÄ

    chmod 600 .mailfilter

    chown vpopmail£ºvchkpw .mailfilter

    ÏÂÀ´¾Í·¢²âÊÔÐÅÊÔÊÔ°É¡£

    ÕâÖ»ÊÇmaildropµÄÒ»µã»ù±¾µÄÓ÷¨¡£±È½ÏÍêÕûµÄÓ÷¨´ó¼Ò¿ÉÒÔÈ¥ÕâÀïhttp://www.flounder.net/~mrsam/maildrop/maildropfilter

£¨³ö´¦£ºhttp://www.sheup.com£©


[1] 

    Ëü±íʾµ±²»·ûºÏÉÏÃæËùÌáµ½µÄ¹ýÂ˹æÔòʱµÄÓʼþ¾ÍÕý³£µÄ·¢µ½[email protected]µÄÐÅÏäÀï¡£

    Õâ¾äÒ»¶¨ÒªÓУ¬²»È»»áÊÕ²»µ½Ðŵġ£

    ͬʱҲҪעÒâ¡£mailfilterµÄÊôÐԺ͡£qmailÊÇÒ»ÑùµÄ

    chmod 600 .mailfilter

    chown vpopmail£ºvchkpw .mailfilter

    ÏÂÀ´¾Í·¢²âÊÔÐÅÊÔÊÔ°É¡£

    ÕâÖ»ÊÇmaildropµÄÒ»µã»ù±¾µÄÓ÷¨¡£±È½ÏÍêÕûµÄÓ÷¨´ó¼Ò¿ÉÒÔÈ¥ÕâÀïhttp://www.flounder.net/~mrsam/maildrop/maildropfilter

£¨³ö´¦£ºhttp://www.sheup.com£©


ÉÏÒ»Ò³ [1] [2]